Abort execution of the whole data driven test suite if PANIC encountered in any of the test cases

146 views
Skip to first unread message

Rohan Majumdar

unread,
Apr 30, 2016, 5:04:59 AM4/30/16
to robotframework-users
I have a templated data driven robot framework test case.
Now the task is to abort the whole suite execution if output contains the word "PANIC!".
Can you tell how to achieve this?

Pekka Klärck

unread,
May 2, 2016, 6:01:19 AM5/2/16
to rohanma...@gmail.com, robotframework-users
If you can detect this situation already in suite setup, you only need
to fail the setup and all tests in the suite will be marked failed
without executing them:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#suite-setup-and-teardown

If tests in the suite are already running, things get a bit more
complicated. If it is OK to stop the whole test execution, you can use
fatal exceptions:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#stopping-test-execution-gracefully

Having a built-in way to stop the execution of the current suite and
continuing from the next one would sometimes be useful. I guess that
could be implemented using special exceptions similarly as fatal
exceptions.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Reply all
Reply to author
Forward
0 new messages