运行测试时,附件在诱惑报告中生成,但未在诱惑报告中显示
this is allure report folderhere is method to take screenchot please refer allurecapture method, i have tried it without annotation alsothis my report
here i am calling the method
我已经尝试捕获屏幕截图并将其添加到诱惑报告中。我已经在实用程序包中创建了静态的allurecapture()方法,并在ontestsuccess()方法中对其进行了校准。
附件在诱惑报告文件夹中,但在诱惑报告中没有。有时它会出现,但大多数情况下不会。
我曾尝试只作注解。
@Attachment
public static byte[] allurescreencapture(String screenshotname) {
return ((TakesScreenshot)driver).getScreenshotAs(OutputType.BYTES);
}
1条答案
按热度按时间rqcrx0a61#
遇到了同样的问题。在github https://github.com/allure-framework/allure-java/issues/784中发现了问题。
降级依赖版本对我很有效。