1
+日食我創建了一個Maven項目在Eclipse與下面的pom.xml運行Maven的命令行
<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.omniture.selenium</groupId>
<artifactId>Omniture</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.jbehave.web</groupId>
<artifactId>jbehave-web-selenium</artifactId>
<version>3.5.5</version>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-core</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0.11</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>2.0.11</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>2.0.11</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
我想通過命令行JUnit測試用例運行。 下面是JUnit測試案例的路徑:
/Users/support/Documents/Omniture/src/test/java/com/testOmnitureSelenium
在構建之前不運行'package'會自動運行JUnit測試嗎? – thatidiotguy
我是一隻新的蜜蜂。 :)所以請指導我運行這個 – user2649233
我告訴你,當你運行包時,maven會自動爲你運行單元測試。沒有更多的指導我可以做。 – thatidiotguy