Python 在Robot框架中,在测试用例拆卸阶段,如何检查当前测试用例是失败还是通过?
在Robot框架测试用例中,我们可以创建Python 在Robot框架中,在测试用例拆卸阶段,如何检查当前测试用例是失败还是通过?,python,robotframework,testcase,test-framework,teardown,Python,Robotframework,Testcase,Test Framework,Teardown,在Robot框架测试用例中,我们可以创建Teardown阶段来执行清理活动 | *Test Case* | | testcase1 | | | [Setup] | Setup Actions | | | Do Something | Args | | | Do Something | Args | | | [Teardown] | Teardown Actions | | *Keyword* | | Teardown Actions | | | Do Someth
Teardown
阶段来执行清理活动
| *Test Case* |
| testcase1 |
| | [Setup] | Setup Actions |
| | Do Something | Args |
| | Do Something | Args |
| | [Teardown] | Teardown Actions |
| *Keyword* |
| Teardown Actions |
| | Do Something | Args |
| | Do Something | Args |
在拆卸阶段,我们如何检查当前测试用例是通过还是失败
我想在测试用例通过时做一些事情,在测试用例失败时做一些其他事情。有一个名为
${test\u STATUS}
的变量,您可以在拆卸中使用它。这在《用户指南》的一节中有记录
您还可以使用诸如和之类的关键字,它们也只能在拆卸中使用