如何使用Java自定义吸引力报告

问题描述 投票:0回答:1

我想自定义我的魅力报告,例如添加测试说明或测试中执行的步骤。我知道我们可以通过在JavaScript中使用@description标记来做到这一点,但是我该如何在Java中做到这一点。我正在使用testng进行测试,为了进行报告和在Eclipse IDE中工作而具有吸引力。

java testng allure
1个回答
0
投票

您需要以下导入

import ru.yandex.qatools.allure.annotations.Description;

您只需在测试中添加@Description批注。

@Description("Test Description goes here")
public void Test001(){
  // steps goes here
}
© www.soinside.com 2019 - 2024. All rights reserved.