-
Notifications
You must be signed in to change notification settings - Fork 2
Integration with Jenkins using JUnit
The Jenkins web-based process automation tool can run a job, then process and display test results. To facilitate the test results handoff, a capability is available in vvtest to produce a test results file in the JUnit XML format. This format can be read by Jenkins.
When the --junit option is added to a vvtest invocation, a file in the JUnit XML format is created with the test results. Only the test summaries are written, not test output or log files, etc. Also, due to limitations with the JUnit format, all tests that diff, were not run, or did not finish are placed in the "skipped" category, which is typically shown in yellow in the display.
In Jenkins, open the build job Configuration page, then scroll to the Build section. Since vvtest is not a plugin, you would most likely be using the "Execute shell" build method. In the shell script text area, run vvtest but add the --junit option. Maybe something like this:
vvtest -j /my/executables --junit testresults.xml
Then in the Configuration page, scroll down to the "Post-build Actions" section. Add a "Publish JUnit test result report" action from the pull down menu button. In the "Test report XMLs" field, add **/testresults.xml
if the file will be in a subdirectory or just testresults.xml
if it is at the top level of the workspace directory.