我的TestNG测试遵循以下格式:
@Test(alwaysRun = true, dependsOnMethods = "testStep_1", description = "Enter the names, and verify that they are appearing correctly ")
public void testStep_2() throws Exception{
}
有没有办法实现一种可以读取所有测试描述并生成测试文档的方法。我试图将ITestNGMethod getDescription()
包含到afterInvocation(IInvokedMethod method,ITestResult testResult)
中,以便在运行每个方法后返回描述,但是没有成功。是否有人尝试过类似的方法?