-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion on how a test build is determined to be pass/fail #658
Comments
Looks like we can't currently use text-finder-plugin in our pipeline jobs |
Please report whether the TAP (test anything protocol) plugin does the job or not. |
I can confirm that adding the TAP publish, to a build that previously only had testng and junit publish, will catch failure that were missed by testng and junit and set the build unstable. Since all our tests output, at minimum, TAP results (@smlambert please confirm) , I think using TAP as the default, with the addition of testng and junit (for prettiness) should suffice. I think the discussion could still be valuable since we are relying on 1+2 plugins to for test results. I am curious to see what a PR build will report in the PR for pass/fail numbers when a TAP-only test fails. |
I confirm that we have TAP output for all of our tests, because we generate it for each individual test target (no matter what underlying framework was used). https://github.com/eclipse/openj9/blob/master/test/TestConfig/makefile#L281 In terms of reliance on plugins, the builds are already relying on plugins for supporting pipeline builds (despite some of those plugins being part of a modern Jenkins core set). The TAP and Junit plugins also help give a quick visual/graphical view that pure console view does not provide. |
But I agree, it might make sense for our final make target "resultsSummary" to write the summary, then assess whether there were failures reported and force a non-zero exit. |
Looks like pipeline support was just added for the text finder plugin via jenkinsci/text-finder-plugin#12. |
I think the TAP plugin is sufficient for our purposes for now, but agree that we can close this issue. |
When a
make test
command runs to completion without 'problems', it has a zero0
exit code. The tests produce various artifacts where the results are stored. The test results summary make target analyzes all the results of the tests that were just run and prints to console a summary of the pass/fail including this line:TOTAL: XXX EXECUTED: XXX PASSED: XXX FAILED: XXX SKIPPED: XXX
When a Jenkins build runs
make $TEST_TARGET
by default, if the command completes with exit code0
, then as far as Jenkins is concerned, the "build" has passed. Various post build actions, some of which we currently use, will set a build to unstable. For example,Publish TestNG Results
will examine all the testng reports and determine if there are test failures and set the build to unstable/failed based on configured thresholds. The problem is that a make test target can produce several different result artifacts (ex. testng, junit, tap) and it is not necessarily the most correct solution to have a post-build action for each result format to determine failures. Also, there is not necessarily a post-build test publisher step for every test result type the tests produce.What we are guaranteed (currently) to have in the console each time is the test results summary. There is a post-build action we can use to search the console using a configured regex and set the build status appropriately. This would be a quick way to close current cracks in the Jenkins builds. However, I'm not sure if this is the correct solution either.
Two other options would be
make
command exit non-zero if there are failed testsmake
command which can be run after amake test
command which will exit non-zero if there were failures.The text was updated successfully, but these errors were encountered: