Robot Framework Marking Test as Expected Failure or XFAIL

Viewed 990

Is there a way to mark a test as XFAIL in robot framework? I would like to execute the tests and if they have a defect tag associated with them I would like to mark them as XFAIL.

Is it possible to implement this using ResultWriter or any other module.

2 Answers

I found this as a workaround that seems to be acceptable: Add this to your test case:

# REMOVE WHEN FIXED!
Pass execution
...  This test fails and is a known bug! (add bug ref here)
...  Known Bugs

This way known bugs are forced to pass but are tagged as "Known Bugs" and are visible in the run log.

Related