Is it possible in ROBOT to run a setup for an entire test suite, rather than running the setup individually for each file? I want to run setup at the beginning of the suite, and if the setup fails, not run any of the test cases at all.
For example, given the following file:
*** Settings ***
Test Setup Setup Fails
*** Test Cases ***
Case1
Should Be True 1<2
Case2
Should Be True 2<1
*** Keywords ***
Setup Fails
Should Be True 2<1
I want neither Case1 nor Case2 to execute at all. As it is, both attempt to use Setup Fails as setup individually, and the output.xml
file has a status for each test case of FAIL with a message saying "Setup failed...". Instead, I would like the xml file to have a status for the suite of 'FAIL' with a message of "Setup failed..." and the test cases to either not be included or to indicate that they have not been run.
Is this something ROBOT supports?
Instead, I would like to receive an error message
Robot supports suite setups. For example:
*** Settings ***
Suite Setup Setup Fails
*** Test Cases ***
Case1
Should Be True 1<2
Case2
Should Be True 2<1
*** Keywords ***
Setup Fails
fail Danger Will Robinson!
The above yields the following results:
==============================================================================
Example
==============================================================================
Case1 | FAIL |
Parent suite setup failed:
Danger Will Robinson!
------------------------------------------------------------------------------
Case2 | FAIL |
Parent suite setup failed:
Danger Will Robinson!
------------------------------------------------------------------------------
Example | FAIL |
Suite setup failed:
Danger Will Robinson!
2 critical tests, 0 passed, 2 failed
2 tests total, 0 passed, 2 failed
==============================================================================
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With