我有一个maven黄瓜项目,当我运行Runner.java文件(作为junit测试运行)时,测试用例正常工作 .

我在Jenkins中配置了相同的项目,如下所示 . 它之前工作正常,但现在得到以下错误消息 .
enter image description here

当我构建这个项目时,我得到以下错误:有人可以帮助我克服这个问题 .

Started by user anonymous
Building in workspace C:\Users\user\.jenkins\workspace\LeninCukesMaven
FSSCM.checkout E:\Programming\Cucumber\LinenHousePOC to C:\Users\user\.jenkins\workspace\LeninCukesMaven
Modified file: target\cucumber\cucumber.json
Modified file: target\cucumber\formatter.js
Modified file: target\cucumber\index.html
Modified file: target\cucumber\jquery-1.8.2.min.js
Modified file: target\cucumber\report.js
Modified file: target\cucumber\style.css
Modified file: target\extent\ExtentResultReport.html
Modified file: target\surefire-reports\bullet_point.png
Modified file: target\surefire-reports\collapseall.gif
Modified file: target\surefire-reports\emailable-report.html
Modified file: target\surefire-reports\failed.png
Modified file: target\surefire-reports\index.html
Modified file: target\surefire-reports\jquery-1.7.1.min.js
Modified file: target\surefire-reports\navigator-bullet.png
Modified file: target\surefire-reports\old\index.html
Modified file: target\surefire-reports\old\runners.RunnerTest\classes.html
Modified file: target\surefire-reports\old\runners.RunnerTest\Command line test.properties
Modified file: target\surefire-reports\old\runners.RunnerTest\groups.html
Modified file: target\surefire-reports\old\runners.RunnerTest\index.html
Modified file: target\surefire-reports\old\runners.RunnerTest\main.html
Modified file: target\surefire-reports\old\runners.RunnerTest\methods-alphabetical.html
Modified file: target\surefire-reports\old\runners.RunnerTest\methods-not-run.html
Modified file: target\surefire-reports\old\runners.RunnerTest\methods.html
Modified file: target\surefire-reports\old\runners.RunnerTest\reporter-output.html
Modified file: target\surefire-reports\old\runners.RunnerTest\testng.xml.html
Modified file: target\surefire-reports\old\runners.RunnerTest\toc.html
Modified file: target\surefire-reports\passed.png
Modified file: target\surefire-reports\runners.RunnerTest\Command line test.html
Modified file: target\surefire-reports\runners.RunnerTest\Command line test.xml
Modified file: target\surefire-reports\runners.RunnerTest\testng-failed.xml
Modified file: target\surefire-reports\runners.RunnerTest.txt
Modified file: target\surefire-reports\skipped.png
Modified file: target\surefire-reports\TEST-runners.RunnerTest.xml
Modified file: target\surefire-reports\testng-failed.xml
Modified file: target\surefire-reports\testng-reports.css
Modified file: target\surefire-reports\testng-reports.js
Modified file: target\surefire-reports\testng-results.xml
Modified file: target\surefire-reports\testng.css
Modified file: target\test-classes\helpers\Hooks.class
Modified file: target\test-classes\helpers\utils$StepStatus.class
Modified file: target\test-classes\helpers\utils.class
Modified file: target\test-classes\pageobjects\DeliveryAndPaymentPage.class
Modified file: target\test-classes\pageobjects\HomePage.class
Modified file: target\test-classes\pageobjects\LoginPage.class
Modified file: target\test-classes\pageobjects\MyAccountPage.class
Modified file: target\test-classes\pageobjects\ProductDetailsPage.class
Modified file: target\test-classes\pageobjects\ProductsListPage.class
Modified file: target\test-classes\pageobjects\RegistrationFormPage.class
Modified file: target\test-classes\runners\RunnerTest.class
Modified file: target\test-classes\stepdefinitions\DeliveryAndPaymentSteps.class
Modified file: target\test-classes\stepdefinitions\HomeSteps.class
Modified file: target\test-classes\stepdefinitions\LoginSteps.class
Modified file: target\test-classes\stepdefinitions\MyAccountSteps.class
Modified file: target\test-classes\stepdefinitions\ProductDetailsSteps.class
Modified file: target\test-classes\stepdefinitions\ProductsListSteps.class
Modified file: target\test-classes\stepdefinitions\RegistrationFormSteps.class
Deleted file: target\cucumber\embedded0.png
Deleted file: target\cucumber\embedded1.png
Deleted file: target\cucumber.json
Deleted file: testng.xml

FSSCM.check completed in 723 milliseconds
Parsing POMs
[LeninCukesMaven] $ "C:\Program Files\Java\jdk1.8.0_25/bin/java" -cp C:\Users\user\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-agent-1.5.jar;C:\Users\user\.jenkins\tools\hudson.tasks.Maven_MavenInstallation\D_softies_apache-maven-3.3.3\boot\plexus-classworlds-2.5.2.jar;C:\Users\user\.jenkins\tools\hudson.tasks.Maven_MavenInstallation\D_softies_apache-maven-3.3.3/conf/logging jenkins.maven3.agent.Maven31Main C:\Users\user\.jenkins\tools\hudson.tasks.Maven_MavenInstallation\D_softies_apache-maven-3.3.3 C:\Users\user\.jenkins\war\WEB-INF\lib\remoting-2.59.jar C:\Users\user\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-interceptor-1.5.jar C:\Users\user\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.5.jar 50080
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f C:\Users\user\.jenkins\workspace\LeninCukesMaven\pom.xml test -Dtest=runners.RunnerTest.java
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building CucumberPractice 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ CucumberPractice ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\user\.jenkins\workspace\LeninCukesMaven\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ CucumberPractice ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ CucumberPractice ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\user\.jenkins\workspace\LeninCukesMaven\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ CucumberPractice ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ CucumberPractice ---
[INFO] Surefire report directory: C:\Users\user\.jenkins\workspace\LeninCukesMaven\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running runners.RunnerTest
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@7f7052
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.269 sec

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[JENKINS] Recording test results
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.994 s
[INFO] Finished at: 2016-07-01T20:23:39+05:30
[INFO] Final Memory: 10M/25M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project CucumberPractice: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[JENKINS] Archiving C:\Users\user\.jenkins\workspace\LeninCukesMaven\pom.xml to com.cucumber/CucumberPractice/0.0.1-SNAPSHOT/CucumberPractice-0.0.1-SNAPSHOT.pom
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
channel stopped
[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] Copying all json files from: C:\Users\user\.jenkins\workspace\LeninCukesMaven to reports directory: C:\Users\user\.jenkins\jobs\LeninCukesMaven\builds\26\cucumber-html-reports
[CucumberReportPublisher] Found 1 json files.
[CucumberReportPublisher] 1. Found a json file: target\cucumber\cucumber.json
[CucumberReportPublisher] Generating HTML reports
Finished: FAILURE

我的pom.xml看起来像这样:(它是否导致任何问题,我在我的pom.xml中遗漏了什么)http://maven.apache.org/xsd/maven-4.0.0.xsd“> 4.0.0

<groupId>com.cucumber</groupId>
<artifactId>LinenHousePOC</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>LinenHousePOC</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.2.4</version>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-picocontainer</artifactId>
        <version>1.2.4</version>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>1.2.4</version>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-testng</artifactId>
        <version>1.1.5</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.47.1</version>
    </dependency>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.9.10</version>
    </dependency>
    <dependency>
        <groupId>com.relevantcodes</groupId>
        <artifactId>extentreports</artifactId>
        <version>2.41.0</version>
    </dependency>
</dependencies>