0
私は単純なmaven Javaアプリケーションを作成しました。私はJunitテストを作成しました。プロジェクトをクリックしてセレンテストを実行すると、このエラーが表示されます。 これはこれは私がここで パブリッククラスNewEmptyJUnitTest {目標org.apache.maven.pluginsを実行できませんでした:maven-surefire-plugin:2.10:テストは実行されませんでした
@Test
public void hello() {
WebDriver driver = new FirefoxDriver();
driver.get("http://google.com");
driver.quit();
}
}
の私の階層であるpom.xmlファイル
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>SQEproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium</artifactId>
<version>2.0b1</version>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.ddavison</groupId>
<artifactId>conductor</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<scope>test</scope>
<version>2.44.0</version>
</dependency>
<dependency>
<groupId>com.chrome</groupId>
<artifactId>chromeriver</artifactId>
<scope>test</scope>
<version>1.5</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.11</version>
</dependency>
</dependencies>
</project>
である私はこれを得続けますエラー:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test
なお同じエラーです。 – puffles
エラーは何ですか?日食で走っている? –
ネットビーンはありません。ここにあります:このビルドの目標は指定されていません。有効なライフサイクルフェーズまたは目標をフォーマットで指定する必要があります。 – puffles