我正在进行一个简单的JUnit 4测试,其中我集成了Allure来显示测试结果。
在测试级别上,我提供了以下注解以显示严重度:-@Severity(SeverityLevel.CRITICAL)
但在Allure报告中,生成后,它仅将严重性级别的严重性显示为NORMAL:-Severity: normal
个
有人知道可能的解决方案是什么吗?
我尝试在运行时使用Allure Lifecycle更新测试用例,以创建自定义标签,但它没有反映Allure UI。
AllureLifecycle lifecycle = Allure.getLifecycle();
lifecycle.updateTestCase(UUID.randomUUID().toString(), testResult ->
testResult.getLabels().add(new Label().setName("severity").setValue(SeverityLevel.CRITICAL.toString())));
1条答案
按热度按时间5tmbdcev1#
对我也不起作用。不得不创建我自己的注解,用
@LabelAnnotation(name = SEVERITY_LABEL_NAME)
注解。