魅力-我想在Report中更改@BeforeClass和@AfterClass方法的标题(我正在使用TestNG)

时间:2018-07-26 14:39:47

标签: java selenium testng allure

在每次测试之前,我都有使用@BeforeClass批注运行的安装步骤。 当这些步骤失败时,我将在魅力报告中显示BeforeClass标题。 如何将标题更改为“安装”?

2 个答案:

答案 0 :(得分:0)

取自Here

@Test (priority = 0, description=”Invalid Login Scenario with wrong username and password.”)

此外,您还可以添加带有@Description批注的附加描述:

@Description(“Test Description: Login test with wrong username and wrong password.”)

答案 1 :(得分:0)

谢谢,我实际上需要@Title("Installations")注释。 它完全可以满足我的需求