Build status Maven Central

Java API to merge Cucumber JSON reports and build HTML Test Report

Sample Reports

View Sample Report

Include Report Builder in your project

Maven dependency for Report Builder:


Build your test report

import com.rajatthareja.reportbuilder.ReportBuilder;
import com.rajatthareja.reportbuilder.Color;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

class MyClass {
    public static void main(String ... args) throws Exception{
        // Create ReportBuilder Object
        ReportBuilder reportBuilder = new ReportBuilder();
        // Set output Report Dir 
        // Set output report file name
        // Set Report Title
        reportBuilder.setReportTitle("My Test Report");
        // Set Report Color for more visit
        // Add additional info for Report
        reportBuilder.setAdditionalInfo("Environment", "My Environment");

        // Create list or report Files or Directories or URLs or JSONObject or JSONString
        List<Object> cucumberJsonReports = new ArrayList<>();
        cucumberJsonReports.add(new File("my/report/path/report.json"));
        cucumberJsonReports.add(new File("myReportDir/"));
        cucumberJsonReports.add(new URL("http://myReportUrl/report.json"));
        cucumberJsonReports.add(new JSONObject("report Json String"));
        // Build your report;

Note: Java > 8 is required.

View Java Docs for more details.

Report Builder Ruby Gem

Report Builder


We’re open to any contribution. It has to be tested properly though.


Copyright (c) 2018 MIT LICENSE