大家好,我实际上正在使用Jenkins和testlink(带有testlink插件)来实现测试自动化。
[workspace] $ C:\maven-3.0.4\bin\mvn.bat -s C:\maven-3.0.4\conf\settings.xml -gs C:\maven- 3.0.4\conf\settings.xml clean test -DsuiteXmlFiles=suite.xml [INFO] --------------------------------------------------------------------- [INFO] Building Jenkins TestLink Plug-in Tutorial 0.3-SNAPSHOT [INFO] --------------------------------------------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jenkins-testlink-plugin- tutorial ------------------------------------------------------------ [INFO] Deleting C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target [INFO] [INFO] --- docbkx-maven-plugin:2.0.11:generate-pdf (book-output) @ jenkins-testlink-plugin-tutorial --- [INFO] Processing input file: book.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 23.377s [INFO] Finished at: Tue Feb 19 17:43:14 CET 2013 [INFO] Final Memory: 8M/112M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.agilejava.docbkx:docbkx-maven-plugin:2.0.11:generate-pdf (book-output) on project jenkins-testlink-plugin-tutorial: Failed to read source: Connection timed out: connect -> [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] [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/MojoExecutionException
我谷歌了很多,但没有什么真正有用的,有人能帮我PLZ吗?
好的,谢谢你的第一个建议!我不知道这个命令有什么用-dsuitexmlfiles=suite.xml,但是没有它就没有变化。使用-X,我得到了以下内容:
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: com.agilejava.docbkx:docbkx-maven-plugin:2.0.11:generate-pdf (book-output)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<artifacts>${plugin.artifacts}</artifacts>
<draftMode>no</draftMode>
<foCustomization>src/main/book/stylesheets/style.xsl</foCustomization>
<fop1Extensions>1</fop1Extensions>
<generatedSourceDirectory>C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target/book/generated/en</generatedSourceDirectory>
<highlightSource>1</highlightSource>
<includes default-value="*.xml">book.xml</includes>
<postProcess>
<copy todir="C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace/target/book/media">
<fileset dir="C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace/src/main/book/media/">
<include name="**/*.css"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
</copy>
</postProcess>
<project>${project}</project>
<sourceDirectory>C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace/src/main/book/en/</sourceDirectory>
<targetDirectory>C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target/book/en/</targetDirectory>
<targetFileExtension default-value="fo"/>
<xincludeSupported>true</xincludeSupported>
</configuration>
还有这个:
[DEBUG] (f) draftMode = no
[DEBUG] (f) foCustomization = src/main/book/stylesheets/style.xsl
[DEBUG] (f) fop1Extensions = 1
[DEBUG] (f) generatedSourceDirectory = C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target\book\generated\en
[DEBUG] (f) highlightSource = 1
[DEBUG] (f) includes = book.xml
[DEBUG] (f) postProcess =
[DEBUG] (f) project = MavenProject: com.tupilabs:jenkins-testlink-plugin-tutorial:0.3-SNAPSHOT @ C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\pom.xml
[DEBUG] (f) sourceDirectory = C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\src\main\book\en
[DEBUG] (f) targetDirectory = C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target\book\en
[DEBUG] (f) targetFileExtension = fo
[DEBUG] (f) xincludeSupported = true
[DEBUG] -- end configuration --
[DEBUG] Catalogs to load: jar:file:/C:/Users/rlyonnet/.m2/repository/net/sf/docbook/docbook-xsl/1.75.2/docbook-xsl-1.75.2-ns-resources.zip!/docbook/catalog.xml
[DEBUG] Using stylesheet: jar:file:/C:/Users/rlyonnet/.m2/repository/net/sf/docbook/docbook-xsl/1.75.2/docbook-xsl-1.75.2-ns-resources.zip!/docbook/fo/docbook.xsl
[DEBUG] SourceFile: C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\src\main\book\en\book.xml
[DEBUG] TargetFile: C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target\book\en\book.fo
[INFO] Processing input file: book.xml
[DEBUG] Advanced XInclude mode entered
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.450s
[INFO] Finished at: Wed Feb 20 09:23:37 CET 2013
[INFO] Final Memory: 7M/76M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.agilejava.docbkx:docbkx-maven-plugin:2.0.11:generate-pdf (book-output) on project jenkins-testlink-plugin-tutorial: Failed to read source: Connection timed out: connect -> [Help 1]
运行似乎surefire没有执行其测试目标(或者至少没有选择我在配置中包含的测试)。 这是一个多模块maven项目,目前全部在groovy中,其结构类似于以下内容: 我在pom中有以下surefire配置。xml: 但是,当我针对这个pom执行
我已经使用selenium创建了测试用例,之前我可以使用maven(从命令行和eclipse)执行我的测试用例。但是现在它不起作用了。请帮助 请在下面找到控制台日志:(运行为- 我没有得到任何错误,它成功地构建了一个项目。但是跳过所有测试用例 请找到我的pom。xml配置如下: 请找到E2E。xml如下:
db-config-test.xml Maven插件: StackError:
在使用maven运行单元测试时,我遇到了这个异常。我的所有测试都没有执行。我的测试类的格式是 我正在运行以下命令来运行此命令: 使用的surefire插件是: 有人知道为什么我的测试没有执行吗?我用的是jUnit 4.8.2和surefire 2.14.1
当在我的pom.xml中启用强制使用JUnit47提供程序时,我得到: pom.xml如下所示
步骤1:在此基础上,我使用构建了一个包含所有依赖项的独立jar。 pom.xml 将方法添加到runner类,并根据this、this和this传递cmdline arg。 如何通过cmdline args指向JAR中的目录?