Reputation: 11
while running test attachments are generated in allure-reports but not displaying in allure report
this is allure report folder here is method to take screenchot please refer allurecapture method, i have tried it without annotation also this my report
i have tried to capture screenshot and add it to allure report. i have created static allurecapture() method in utility package and caliing it in ontestsuccess() method.
attachments are there in allure-reports folder but not coming in allure report. sometimes it comes but mostly not.
i have tried with only annotation.
@Attachment
public static byte[] allurescreencapture(String screenshotname) {
return ((TakesScreenshot)driver).getScreenshotAs(OutputType.BYTES);
}
Upvotes: 1
Views: 1860
Reputation: 11
Faced the same issue. Found an issue in github https://github.com/allure-framework/allure-java/issues/784 .
Downgrading dependency versions worked for me.
<aspectj.version>1.9.5</aspectj.version>
<allure-testng.version>2.15.0</allure-testng.version>
<testng.version>7.4.0</testng.version>
Upvotes: 1