When integrating CucumberStudio with a CI tool, it may happen that the test run is not fully synchronized with the status of the last build. This mainly happens when the tests have not been ran (for example due to an installation or compilation error during the setup process).
In such case, as there is no test results to push at the end of the build, CucumberStudio consider only the status from the previous build. So it might still show green statuses even if the last build failed.
There is a simple way to fix this kind of issues.
If you use HipTest Publisher to generate the test scripts and push the results, you can simply add the following line in you config file:
This will ensure that, when no results file have been generated, CucumberStudio will be notified that there were a global failure and the tests will all be marked as failed.
|Note:||You should only add the line once the full process has been shown as reliable (so once you have a few successful builds that pushed results back to CucumberStudio).|
If you want to push results for tests that were not written in CucumberStudio, you can use another curl command to notify a global failure of the build.
Below is an example of a post-failure action written with bash:
This script ensures that, if the result file is present, it will be pushed to CucumberStudio to update the results in the test run and otherwise, declare a global failure.