How to create separate extent report for different runner class(java) in cucumber + Testng

55 Views Asked by At

I have the following use case.

I have a cucumber framework with java & testng. I am generating extent report (com.cucumber.listener.ExtentCucumberFormatter in runner file). I have 600 scenarios and each scenario will have 3 snapshots (in .png format) to be attached in the report (total 1800 .png files). I have a "screenshot" folder under target which have all the snapshots saved. The .html extent report along with this screenshots folder is around 300 MB after zipping. Therefore I am unable to upload this to JIRA.

I thought to mark these testcases on different tags and create different runner files based on exclusive tags. I tried to separate different reports for individual runner

like Runner1.java:

@CucumberOptions( plugin = { "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report1.html"})

Runner1.java:

@CucumberOptions( plugin = { "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report2.html"})

I am putting these two java classes in testng.xml. I though if I run testng, it will invoke these two runners one by one and separate report1 & report2 templates will be generated. However I found all the testcases saved in report1.html only which is of course 300 MB. So back to square one

Could you please suggest some solution here. So that I can have two different reports altogether

0

There are 0 best solutions below