我创建了新的maven项目并添加了2个不同的测试套件TS1和TS2
运行测试套件我在cmd提示符下使用以下命令 对于TS1- mvn -Dtest = TS1清洁测试 对于TS2 - mvn -Dtest = TS2清洁测试
并运行特定的测试方法我正在使用
mvn -Dtest = TS1#TestMethodName clean test
我的测试在命令提示符下正常运行..
现在我计划将我的测试集成到Jenkins中,但我为TS1创建了两个作业,为TS2创建了另一个作业
TS1运行正常,但对于 TS2,而不是运行TS2,它运行的是TS1
Jenkins日志:
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.ariveguru.tests:eserve:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 41, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 58, column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:selenium-maven-plugin is missing. @ line 49, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building eserve 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ eserve ---
[INFO]
[INFO] >>> maven-surefire-report-plugin:2.16:report (default-cli) @ eserve >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ eserve ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Automation-WorkSpace\workspace\Case creation\eserve\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ eserve ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ eserve ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Automation-WorkSpace\workspace\Case creation\eserve\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ eserve ---
[INFO] Compiling 24 source files to C:\Automation-WorkSpace\workspace\Case creation\eserve\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ eserve ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (copy-resources) @ eserve ---
[INFO] Tests are skipped.
[INFO]
[INFO] <<< maven-surefire-report-plugin:2.16:report (default-cli) @ eserve <<<
[INFO]
[INFO] --- maven-surefire-report-plugin:2.16:report (default-cli) @ eserve ---
[WARNING] Unable to locate Test Source XRef to link to - DISABLED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.955s
[INFO] Finished at: Mon Mar 17 18:14:30 IST 2014
[INFO] Final Memory: 19M/47M
[INFO] ------------------------------------------------------------------------
Parsing POMs
Modules changed, recalculating dependency graph
maven31-agent.jar already up to date
maven31-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[eserve] $ C:\Java\jdk1.7.0_01/bin/java -cp C:\Automation-WorkSpace\maven31-agent.jar;C:\Automation-WorkSpace\tools\hudson.tasks.Maven_MavenInstallation\maven\boot\plexus-classworlds-2.5.1.jar;C:\Automation-WorkSpace\tools\hudson.tasks.Maven_MavenInstallation\maven/conf/logging jenkins.maven3.agent.Maven31Main C:\Automation-WorkSpace\tools\hudson.tasks.Maven_MavenInstallation\maven C:\Users\USER\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\2\32f78882-1a0ca571 C:\Automation-WorkSpace\maven31-interceptor.jar C:\Automation-WorkSpace\maven3-interceptor-commons.jar 64798
<===[JENKINS REMOTING CAPACITY]===>channel started
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
Executing Maven: -B -f C:\Automation-WorkSpace\workspace\Case creation\eserve\pom.xml install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.ariveguru.tests:eserve:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 41, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 58, column 12
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:selenium-maven-plugin is missing. @ line 49, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[HUDSON] Collecting dependencies info
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building eserve 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ eserve ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Automation-WorkSpace\workspace\Case creation\eserve\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ eserve ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ eserve ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Automation-WorkSpace\workspace\Case creation\eserve\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ eserve ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ eserve ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (copy-resources) @ eserve ---
[INFO] Surefire report directory: C:\Automation-WorkSpace\workspace\Case creation\eserve\target\surefire-reports