Keyword test clean-up/post-conditions
It would useful to be able to define clean-up steps/post-conditions for keyword tests. This could be implemented as a new test step section at the bottom that always gets called regardless of whether the main test failed or not.
The test would still be reported as having failed in the test results, but before moving onto the next test it calls the clean up steps.
I know that you could implement this as a separate test that gets called after the main test in the test project, but that's a pain if multiple tests have the same clean-up steps. Having explicit clean-up steps makes it easier to understand what the test does just by looking at it, and how it might affect the rest system and subsequent tests if it fails early.
I tried using the Try ... Finally keyword test steps but the Finally step isn't called when an error-level message is logged. Maybe we need to be able to raise exceptions from keyword tests instead of using Log Error Message, so the Finally step is still called.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.