Reputation: 407
I'm using Robot Framework with java keywords. As far as I know, we can set the status of the test to "Failure" using the Robot Framework support by throwing an Error. This will automatically cause the Robot Framework to fail the test. My question is how can I set the test status to "Warning" using Robot Framework support?
Upvotes: 0
Views: 1031
Reputation: 385970
Robot framework only supports two values for a test status: PASS or FAIL. It doesn't matter which programming you're using. To fail a test you need to raise an error. If no errors are raised, the test is considered to have passed.
You can, however, tag a test as non-critical so that its failure status will be ignored with respect to the status of the test run as a whole.
For more information about setting the criticality of a test, see Setting criticality in the robot framework user guide.
You can also issue warnings using the built-in Log keyword and setting the level to "WARN"
Upvotes: 2