I'm new to using robot framework and I'm struggling to get my teardown to work. It currently looks like:
[Teardown] run keyword if any tests failed KeyFail
When I run the program with code like this, I get the error: Keyword 'Run Keyword If Any Tests Failed' can only be used in suite teardown.
I can change it so that I put it inside it's own test case, however I then get the error that: Test Case contains no keywords.
Please advise me as to what I'm doing wrong. It would be appreciated. Thanks.
Edit:
***Keywords***
Generation
(Some stuff)
KeyFail
log to console Error report being sent.
***Test Cases***
Requires successful generation of file
Generation
Teardown Case
[Teardown] run keyword if any tests failed KeyFail
Edit: And how to fix this problem. Thanks