Java 包括作为Jenkins配置的一部分运行JUnit测试
我试图将Jenkins配置为包含一个构建后步骤来运行JUnit测试,但出现了一个错误: 詹金斯步骤本身显示了一个问题:Java 包括作为Jenkins配置的一部分运行JUnit测试,java,ant,jenkins,Java,Ant,Jenkins,我试图将Jenkins配置为包含一个构建后步骤来运行JUnit测试,但出现了一个错误: 詹金斯步骤本身显示了一个问题: target/surefire-reports/*.xml ‘target/surefire-reports/*.xml’ doesn’t match anything, but ‘*.xml’ does. Perhaps that’s what you mean? 这并不奇怪,因为我在targets下没有surefire reports子文件夹,我不知道要生成xml报告需要
target/surefire-reports/*.xml
‘target/surefire-reports/*.xml’ doesn’t match anything, but ‘*.xml’ does. Perhaps that’s what you mean?
这并不奇怪,因为我在targets下没有surefire reports子文件夹,我不知道要生成xml报告需要做什么。我不熟悉Java、Maven、Eclipse、Linux——所有的东西——并且独自工作
我的主要问题是:
这个配置是否表明我应该考虑使用ANT集成?我甚至不知道应该阅读哪些首字母缩略词,我希望能找到一些方向来缩短这段时间
我看到了关于设置此后期构建步骤的内部说明,但现在我需要知道如何使其工作
谢谢
INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ FDE ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.445 s
[INFO] Finished at: 2015-04-15T10:59:18-04:00
[INFO] Final Memory: 16M/38M
[INFO] ------------------------------------------------------------------------
Changing BUILD_ID variable (job build time) with the date pattern MM/dd/yyyy hh:mm a.
Recording test results
Changing BUILD_ID variable (job build time) with the date pattern MM/dd/yyyy hh:mm a.
No test report files were found. Configuration error?
Build step 'Publish JUnit test result report' changed build result to FAILURE
Checking for post-build
Performing post-build step
Checking if email needs to be generated
Email was triggered for: Failure
Sending email for trigger: Failure
Overriding default server settings, creating our own session
Changing BUILD_ID variable (job build time) with the date pattern MM/dd/yyyy hh:mm a.
Changing BUILD_ID variable (job build time) with the date pattern MM/dd/yyyy hh:mm a.
messageContentType = text/html; charset=UTF-8
Changing BUILD_ID variable (job build time) with the date pattern MM/dd/yyyy hh:mm a.
Adding developers
Changing BUILD_ID variable (job build time) with the date pattern MM/dd/yyyy hh:mm a.
Setting In-Reply-To since last build was not successful
Successfully created MimeMessage
Sending email to: John.Doe@MyCom.com
Changing BUILD_ID variable (job build time) with the date pattern MM/dd/yyyy hh:mm a.
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Notifying upstream projects of job completion
Finished: FAILURE
有一个Ant任务用于生成JUnit报告。将
任务添加到Ant构建中,并使其依赖于
任务。您是否至少先运行一次构建,以便Jenkins生成文件?如果没有,并且您确定JUnit输出文件将在那里,那么它应该是OK的。看起来target/surefire reports/*.xml与使用MAVEN而不是ANT相关。