How to create a single HTML report file using protractor-html-reporter for Multi-capabilities?

1.1k Views Asked by At

We are using Protractor-html-reporter to create HTML reporting. Report is generated for each browser if we are using multi-capabilities. I want to know is there any way to create a single HTML report if we are using multi-capabilities?

HTML report is generated using xml file(Using jasmineRreporters).Please find the codes below in config file.

  //This is to generate xml file
 jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({

        consolidateAll: true,
        savePath: xmlOutputPath,
        modifiedSuiteName: true,
        filePrefix: 'xmloutput'

    }));


 //to generate html reporting
onComplete: function () {
    var browserName, browserVersion;
    var capsPromise = browser.getCapabilities();

    capsPromise.then(function (caps) {
        browserName = caps.get('browserName');
        browserVersion = caps.get('version');

        testConfig = {
            reportTitle: 'Test Report',
            outputPath: HtmlreportPath,
            screenshotPath: ScreenshotPath,
            testBrowser: browserName,
            browserVersion: browserVersion,
            screenshotsOnlyOnFailure: true

        };
        new HTMLReport().from(xmlOutputPath + '/xmloutput.xml', testConfig);
    });
},
0

There are 0 best solutions below