Reputation: 24679
I'm trying to configure Jenkins to include a Post Build step to run JUnit tests and am getting an error:
The Jenkins step itself shows an issue:
target/surefire-reports/*.xml
‘target/surefire-reports/*.xml’ doesn’t match anything, but ‘*.xml’ does. Perhaps that’s what you mean?
This isn't surprising because I don't have a surefire-reports sub folder under targets and I have no idea what I have to do to generate the xml report. I am new to Java, Maven, Eclipse, Linux - everything - and working alone.
My main question is:
Does this configuration suggest that I should be necessarily looking into using ANT integration? I don't even know what acronyms I should be reading about yet and I was hoping for some direction to cut the curve.
I saw internal instructions for setting up this post build step but now I need to know what to do to make it work.
Thanks
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: [email protected]
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
Upvotes: 2
Views: 1390
Reputation: 308763
There's an Ant task for generating JUnit reports. Add <junitreport>
task to your Ant build and make it dependent on the <junit>
task.
Upvotes: 1