我對Cucumber/Maven有點新,所以需要運行測試用例的幫助。 我使用Cucumber和Selenium在eclipse中開發了一個自動化套件。要運行特定的功能文件/ Junit runner類,請右鍵單擊Eclipse中的文件並運行它。如何通過命令提示符並通過jenkins使用Maven運行單個黃瓜功能文件?
但是,如何通過命令提示符或詹金斯運行它,通過提供特定命令來運行2-3個功能文件(或)2-3個Junit跑步者課程,比如說50個功能文件或JUnit類?
下面是我如何在Eclipse中構建的包瀏覽器。
下面是pom.xml中
<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.perspecsys</groupId>
<artifactId>salesforce</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>salesforce</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.48.2</version>
</dependency>
</dependencies>
</project>
感謝您的幫助。該命令在命令提示符下工作。但是,我如何在Jenkins中配置相同的?我只想運行包com.perspecsys.salesforce.featurefiles,以便所有功能文件都在其下執行。你能幫我在詹金斯一步一步的配置嗎? – Ronnie