I use Cucumber for jUnit runner to run BDD tests like this:
@RunWith(Cucumber.class)
@CucumberOptions(
    format = {"pretty", "json:target/cucumber.json"},
    glue = {"com.company.bdd.steps"},
    features = {"classpath:bdd-scenarios"},
    tags = {"~@skip"}
)
public class CucumberTests {
}
I would like to have beautiful HTML reports from https://github.com/damianszczepanik/cucumber-reporting
And i made jUnit @AfterClass method:
@AfterClass
public static void buildReport() throws Exception {
    List<String> srcReportJson = Collections.singletonList("target/cucumber.json");
    Configuration configuration = new Configuration(new File("target"), "AEOS BDD Integration Tests");
    new ReportBuilder(srcReportJson, configuration).generateReports();
}
The problem is that cucumber.json is empty when @AfterClass method executes. Hence i can't build pretty HTML report.
Is there any hook which i can use to execute some code after cucumber json report is already built?
PS: Cucumber v.1.1.8 is used and Java 1.7 so i was not able to try ExtendedCucumberRunner
 
     
    
 
    