Reputation: 962
I'm running Robot Framework tests using Jenkins. My suite has a setup and teardown steps, which are mandatory! The problem is that when Jenkins aborts the build during the running test, my teardown step is not being executed. How it possible to execute the Robot Framework teardown even if a interrupt/abort is received from Jenkins?
Upvotes: 4
Views: 714
Reputation: 47
First of all you have to understand that jenkins controls your robotframework's lifecyle and test execution, and not the opposit. A solution could be to add a post action in your pipeline (or jenkinsfile) Post action documentation that should call tests including only your teardowns. After that inside the post action you have to add the scripts that could run your teardown . For optimization you could add a flag to indicate whether teardown have been run in the main stage or not, or even better you can put the teardown only one time as a post action. You can manage test reports via rebot merge command. Hope this will help you.
Upvotes: 0