- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
cannot be found"-6ren"> cannot be found"-我升级了 Selenium 以支持 GeckoDriver,然后升级了 Jenkins。我对这种幕后升级的东西还很陌生。由于我们运行的是 Selenium 3,因此我们不再使用 Selenium Gr-6ren">
我升级了 Selenium 以支持 GeckoDriver,然后升级了 Jenkins。我对这种幕后升级的东西还很陌生。由于我们运行的是 Selenium 3,因此我们不再使用 Selenium Grid 插件。从那时起我就无法运行任何测试。
我们为 Jenkins 主服务器和从服务器运行 Windows 7 机器。如果有什么区别的话,我们使用 Java。我们还有一个基于 Selenium 的框架。
特别是这个错误让我很烦恼:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR]
[ERROR] The test(s) <[]> cannot be found.
[ERROR] at org.testng.TestNG.extractTestNames(TestNG.java:436)
我尝试了一些改变 fork 配置,但没有成功。
我还在 POM 中使用了 TestNG 范围,但将其变为 test
导致 TestNG 类“不存在”。
以下是我得到的完整结果(使用 Maven -e 标志运行;如果需要,我可以使用 -X 得到结果):
Started by user anonymous
Building in workspace C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace
Updating https://subversion.example.com/svn/example-test-center/trunk/FunctionalAutomation/ExampleProject at revision '2017-02-10T15:33:28.095 -0500'
A target\log4j2.xml
At revision 3234
No changes for https://subversion.example.com/svn/example-test-center/trunk/FunctionalAutomation/ExampleProject since the previous build
Parsing POMs
Modules changed, recalculating dependency graph
Established TCP socket on 60174
[workspace] $ "C:\Program Files\Java\jdk1.8.0_121/bin/java" -cp "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-agent-1.8.1.jar;C:\Maven3.3.9\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar;C:\Maven3.3.9\apache-maven-3.3.9/conf/logging" jenkins.maven3.agent.Maven33Main C:\Maven3.3.9\apache-maven-3.3.9 "C:\Program Files (x86)\Jenkins\war\WEB-INF\lib\remoting-3.4.1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven33-interceptor-1.8.1.jar" "C:\Program Files (x86)\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.8.1.jar" 60174
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\pom.xml clean test -e -DsuiteFile=src/main/test/suites/ca/alpha/desktop/QA_Brochures_Test.xml -Drunvehicle=All Models -Dwebdriver.gecko.driver=C:\browser-drivers\geckodriver-win64.exe
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.example.automation:example-project:jar:2.0.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for com.example.automation:automation-util:jar should not point at files within the project directory, ${basedir}/src/resources/lib/automation-util-1.18.1.jar will be unresolvable by dependent projects @ line 105, column 16
[WARNING] 'dependencies.dependency.systemPath' for com.client.servicesapi:servicesapi:jar should not point at files within the project directory, ${basedir}/src/resources/lib/ServicesClientLibrary-1.2.112.jar will be unresolvable by dependent projects @ line 112, column 16
[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 ExampleProject 2.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ example-project ---
[INFO] Deleting C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\target
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-source (add-source) @ example-project ---
[INFO] Source directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\objects added.
[INFO] Source directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\test\classes added.
[INFO] Source directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\test\suites added.
[INFO]
[INFO] --- build-helper-maven-plugin:3.0.0:add-resource (add-resource) @ example-project ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ example-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\resources
[INFO] Copying 19 resources to resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ example-project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 212 source files to C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\target\classes
[INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/objects/com/alpha/global/components/MyPlan.java: Some input files use or override a deprecated API.
[INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/objects/com/alpha/global/components/MyPlan.java: Recompile with -Xlint:deprecation for details.
[INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/test/classes/com/alpha/global/TC_GUX_BNP.java: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\main\test\classes\com\alpha\global\TC_GUX_BNP.java uses unchecked or unsafe operations.
[INFO] /C:/Program Files (x86)/Jenkins/jobs/QA_Brochures_Test/workspace/src/main/test/classes/com/alpha/global/TC_GUX_BNP.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ example-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ example-project ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ example-project ---
[INFO] No tests to run.
[INFO] Surefire report directory: C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\test-output
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
hudson.AbortException: Test reports were found but none of them are new. Did tests run?
For example, C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\test-output\TEST-TestSuite.xml is 1 mo 7 days old
at hudson.tasks.junit.TestResult.parse(TestResult.java:228)
at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148)
at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:623)
at hudson.maven.Maven3Builder$MavenExecutionListener.mojoFailed(Maven3Builder.java:656)
at hudson.maven.Maven3Builder$JenkinsEventSpy.onEvent(Maven3Builder.java:300)
at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent(EventSpyDispatcher.java:104)
at org.apache.maven.eventspy.internal.EventSpyExecutionListener.mojoFailed(EventSpyExecutionListener.java:138)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:90)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:219)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.752 s
[INFO] Finished at: 2017-02-10T15:33:50-05:00
[INFO] Final Memory: 30M/265M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR]
[ERROR] The test(s) <[]> cannot be found.
[ERROR] at org.testng.TestNG.extractTestNames(TestNG.java:436)
[ERROR] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
[ERROR] at org.testng.TestNG.run(TestNG.java:1088)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
org.testng.TestNGException:
The test(s) <[]> cannot be found.
at org.testng.TestNG.extractTestNames(TestNG.java:436)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
at org.testng.TestNG.run(TestNG.java:1088)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:133)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:68)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
org.testng.TestNGException:
The test(s) <[]> cannot be found.
at org.testng.TestNG.extractTestNames(TestNG.java:436)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
at org.testng.TestNG.run(TestNG.java:1088)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 31 more
Caused by: java.lang.RuntimeException: There was an error in the forked process
org.testng.TestNGException:
The test(s) <[]> cannot be found.
at org.testng.TestNG.extractTestNames(TestNG.java:436)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:310)
at org.testng.TestNG.run(TestNG.java:1088)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:584)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:460)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:229)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:201)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1026)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:862)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:755)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 32 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[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/PluginExecutionException
[JENKINS] Archiving C:\Program Files (x86)\Jenkins\jobs\QA_Brochures_Test\workspace\pom.xml to com.example.automation/example-project/2.0.0-SNAPSHOT/example-project-2.0.0-SNAPSHOT.pom
channel stopped
Finished: FAILURE
<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.example.automation</groupId>
<artifactId>example-project</artifactId>
<version>2.0.0-SNAPSHOT</version>
<name>ExampleProject</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/objects</source>
<source>src/main/test/classes</source>
<source>src/main/test/suites</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/resources</directory>
<targetPath>resources</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<!-- <reuseForks>false</reuseForks> -->
<suiteXmlFiles>
<suiteXmlFile>${basedir}/${suiteFile}</suiteXmlFile>
</suiteXmlFiles>
<reportsDirectory>${basedir}/test-output</reportsDirectory>
<properties>
<property>
<name>testnames</name>
<value>${testname}</value>
</property>
<property>
<name>runvehicle</name>
<value>${runVehicle}</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.example.automation</groupId>
<artifactId>automation-util</artifactId>
<version>1.18.1</version>
<scope>system</scope>
<systemPath>${basedir}/src/resources/lib/automation-util-1.18.1.jar</systemPath>
</dependency>
<dependency>
<groupId>com.client.servicesapi</groupId>
<artifactId>servicesapi</artifactId>
<version>1.2.112</version>
<scope>system</scope>
<systemPath>${basedir}/src/resources/lib/ServicesClientLibrary-1.2.112.jar</systemPath>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.10</version>
<!-- <scope>test</scope> -->
</dependency>
<!-- When updating Selenium here, ensure automation-util's POM is updated also! -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.15</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sf.qualitycheck/quality-check -->
<dependency>
<groupId>net.sf.qualitycheck</groupId>
<artifactId>quality-check</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="FOC Brochures">
<listeners>
<listener class-name="com.example.util.result.CustomReportListener" />
</listeners>
<parameter name="browser" value="gecko" />
<parameter name="mailingList" value="AUTO, FOC" />
<parameter name="remote" value="true" />
<parameter name="model" value="${runVehicle}" />
<test name="QA-Alpha-English">
<parameter name="baseUrl" value="http://wwwmgqa.alpha.ca/brochures/" />
<classes>
<class name="ca.alpha.desktop.TC_FOC_Brochures">
<methods>
<!--
<include name="init" />
-->
</methods>
</class>
</classes>
</test>
<test name="QA-Alpha-French">
<parameter name="baseUrl" value="http://fr-wwwmgqa.alpha.ca/brochures/" />
<classes>
<class name="ca.alpha.desktop.TC_FOC_Brochures">
<methods>
<!--
<include name="init" />
-->
</methods>
</class>
</classes>
</test>
</suite>
关于如何解决这个问题有什么想法吗?预先感谢您。
更新删除后testnames
从 Surefire 完全并再次运行,我现在收到此错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project example-project: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process
[ERROR] org.testng.TestNGException:
[ERROR]
[ERROR] Cannot instantiate class com.example.util.result.CustomReportListener
[ERROR] at org.testng.internal.ClassHelper.newInstance(ClassHelper.java:53)
[ERROR] at org.testng.TestNG.initializeConfiguration(TestNG.java:981)
[ERROR] at org.testng.TestNG.run(TestNG.java:1089)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
[ERROR] Caused by: java.lang.ExceptionInInitializerError
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Waiting for Jenkins to finish collecting data
[ERROR] at java.lang.Class.newInstance(Class.java:442)
[ERROR] at org.testng.internal.ClassHelper.newInstance(ClassHelper.java:51)
[ERROR] ... 8 more
[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at sun.awt.shell.Win32ShellFolder2.access$200(Win32ShellFolder2.java:72)
[ERROR] at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:242)
[ERROR] at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:237)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:547)
[ERROR] at java.lang.Thread.run(Thread.java:745)
[ERROR] -> [Help 1]
哪里CustomReportListener
类位于 Automation-util JAR 内,该 JAR 存储在 src/resources/lib
中通常,尽管我也在类源文件夹 ( src/main/test/classes
) 中测试了它。
最佳答案
您的surefire插件配置表明您将在运行时通过JVM参数选择套件文件和测试集(<test>
标签)。
<property>
<name>testnames</name>
<value>${testname}</value>
</property>
请确保将有效值传递给 <test>
组通过 JVM 参数 -Dtestnames
标记.
关于java - 升级后,得到 "Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test"和 "test(s) <[]> cannot be found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42168610/
在 C# 及其同类语言中,我们总是使用 public string SomeString { get; set;} 但是你也可以使用(我最近才发现这个,而且是在和编译器闲逛的时候发现的) public
我已经为 Controller 中的函数编写了 Swagger 注释,但在生成 swagger-ui 代码时出现错误。以下是我的注释代码 /*** End of Annotation For dele
我正在 PHP 中开发一项服务,该服务使用 exec 函数调用 jar 文件,如下所示: $text = "string with accents á, ó, ú or العربية"; exec(
我正在尝试了解有关在程序中利用/防止缓冲区溢出的方法的更多信息。我知道如果大小是恒定的,下面的代码很容易受到攻击,但是如果大小每次都是随机的怎么办?是否还有办法从堆栈中获取它并以某种方式动态改变溢出字
对于一项学校作业,我应该制作一个可以以小时、分钟和秒为单位存储时间的时间类。一切正常,但仅声明 get 时属性总是返回 0;并设置; private int seconds, minutes, hou
我正在遍历一些测验对象并将结果存储到json变量中。出现"ReferenceError is not defined"错误,不确定原因。 JS代码 // This function will send
使用 Nifi 的 PutDatabaseRecord 处理器在 MySQL 中插入阿拉伯字符(非拉丁语)时,字符被“??????”替换 插入后,阿拉伯字符串被替换为??????。我已经使用 utf8
谁能告诉我为什么 gets(abc) 使用 char[] 而不是使用 int? int abc; char name[] = "lolrofl"; printf("Hello %s.\n",na
为什么在使用 as.POSIXct 转换下面的时间戳时得到所有 NA? > head(tmp$timestamp_utc) [1] Fri Jul 03 00:15:00 EDT 2015 Fri J
def get_submultiples(n): # Get all submultiples of n if n == 1: return [1] i = 2
有没有办法访问基本模型的实际 child ,意思是:继续使用 django Docs 中的示例,让我们假设我正在建模不同的外卖餐厅,它们只是有共同点 姓名 都有deliver方法 至此: class
我正在寻找一个范围的总和,但我总是得到“未定义”。我相信有些东西出现在错误的位置,但我不确定它是什么。 第 1 部分:“编写一个范围函数,它接受两个参数(start 和 end),并返回一个包含从 s
我已将 spring 版本从 4.2.3 更新到 5.0.2,并将安全性从 5.0.1 更新到 5.0.10 并使用 spring -flex版本1.6.0.RC1。 像这样使用 BlazeDS 依赖
我可以输入但在输出中,我得到的结果为零。我使用两门类(class),一门是主要的,是日志,另一门是成绩计算。在成绩计算器中,我编写了方法和构造函数,在日志中,类通过构造函数调用这些方法。 import
我在使用 go 时遇到了构建问题。我想知道这是编译器中的错误还是代码的问题。 // removed the error handling for sake of clarity file, _ :=
我的角色在与盒子互动时出现问题。我有一个 GameObject Player 附加了一个脚本来与游戏中的盒子交互,脚本是: using UnityEngine; using System.Collec
有谁知道为什么我不能在下面生成百分比 codeIshere (第 97-117 行)? var format=d3.format(".1%"); var percent = format(functi
我正在尝试编写图像识别代码,以针对不同动物图像训练系统,这就是代码。我使用 anaconda 作为解释器,使用pycharm作为环境。 import tensorflow as tf import o
我正在尝试在 Java 中初始化 Matcher,但无论字符串是否已初始化且不为 null,都会继续获取 NPE。 这是代码: pattern.compile("\\s"); System.out.p
所以我有这段代码: ; (function (g) { var d = document, i, am = d.createElement('script'), h = d.head || d.g
我是一名优秀的程序员,十分优秀!