【发布时间】:2015-04-15 15:30:46
【问题描述】:
我正在尝试将 Jenkins 配置为包含一个 Post Build 步骤来运行 JUnit 测试,但我遇到了一个错误:
Jenkins 步骤本身就显示了一个问题:
target/surefire-reports/*.xml
‘target/surefire-reports/*.xml’ doesn’t match anything, but ‘*.xml’ does. Perhaps that’s what you mean?
这并不奇怪,因为我在目标下没有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
【问题讨论】:
-
您是否至少先运行一次构建以供 Jenkins 生成文件?如果没有,并且您确定 JUnit 输出文件将在其中,那么它应该没问题