How to show results of individual test pass/fail in Jenkins?
There are two options:
ScalaTest can generate HTML reports. Just add
(testOptions in Test) += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-report")
to your 'build.sbt'. Running 'sbt test' will then generate an HTML report in the folder 'target/scalatest-report'.
In Jenkins you can use the 'Publish HTML' plugin to capture this report for a build. The test html becomes then available for each build and also on job page.
- ScalaTest also generates normal JUnit XML reports in the 'target/test-reports' folder. The Jenkins these reports can be captured with the 'Publish JUnit XML test report' post-build-action which is default available in Jenkins I think.
Both solutions give a view on the test results and they can be used together.
You should better describe your symptoms. JUnit-style XML report is the basic form of test report supported by Jenkins/Hudson, so I suppose the problem is relatively simple. Please compare your configuration with the following example:
I would suggest the following:
- Check you configuration (it is likely jenkins is not able to find the actual report file)
- Look through the console output to make sure there is no warning message related to XML report file
- Verify XML report is not empty and valid
- Try to use JUnitReport tasks to generate HTML form
- Finally, switch to TestNG if you can