我想自定义我的魅力报告,例如添加测试说明或测试中执行的步骤。我知道我们可以通过在JavaScript中使用@description标记来做到这一点,但是我该如何在Java中做到这一点。我正在使用testng进行测试,为了进行报告和在Eclipse IDE中工作而具有吸引力。
您需要以下导入
import ru.yandex.qatools.allure.annotations.Description;
您只需在测试中添加@Description批注。
@Description("Test Description goes here")
public void Test001(){
// steps goes here
}