Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试让 Robot 框架和 Allure 一起工作。而且我没有设法将测试用例标记为失败。StepFailureEvent 和 TestCaseFailureEvent 将测试用例变为损坏状态。请告诉我该怎么做。
如果TestCaseFailureEvent包含AssertionError测试将被标记为失败,否则标记为损坏
TestCaseFailureEvent
AssertionError
protected Status getStatus() { return throwable instanceof AssertionError ? Status.FAILED : Status.BROKEN; }
PS。您可以使用自定义覆盖此逻辑TestCaseStatusChangeEvent
TestCaseStatusChangeEvent