How to use the cucumber-html-reporter.generate function in cucumber-html-reporter

To help you get started, we’ve selected a few cucumber-html-reporter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uyuni-project / uyuni / testsuite / index.js View on Github external
storeScreenshots: true,
  noInlineScreenshots: true,
  ignoreBadJsonFile: true,
  name: 'SUSE Manager Testsuite',
  brandTitle: ' ',
  // metadata: {
  //   "App Version":"",
  //   "Test Environment": "",
  //   "Browser": "",
  //   "Platform": "",
  //   "Parallel": "",
  //   "Executed": ""
  // }
};

reporter.generate(options);
github john-doherty / selenium-cucumber-js / runtime / world.js View on Github external
var cucumberReportPath = path.resolve(global.reportsPath, 'cucumber-report.json');

        if (global.reportsPath && fs.existsSync(global.reportsPath)) {

            // generate the HTML report
            var reportOptions = {
                theme: 'bootstrap',
                jsonFile: cucumberReportPath,
                output: path.resolve(global.reportsPath, 'cucumber-report.html'),
                reportSuiteAsScenarios: true,
                launchReport: (!global.disableLaunchReport),
                ignoreBadJsonFile: true
            };

            reporter.generate(reportOptions);

            // grab the file data
            var reportRaw = fs.readFileSync(cucumberReportPath).toString().trim();
            var xmlReport = cucumberJunit(reportRaw);
            var junitOutputPath = path.resolve(global.junitPath, 'junit-report.xml');

            fs.writeFileSync(junitOutputPath, xmlReport);
        }

        done();
    });
github syndesisio / syndesis-ui / e2e / conf / protractor.base.conf.js View on Github external
afterLaunch: function () {
    // see docs https://www.npmjs.com/package/cucumber-html-reporter
    let options = {
      theme: 'bootstrap',
      jsonFile: cucumberJsonPath,
      output: cucumberHtmlPath,
      reportSuiteAsScenarios: true,
      storeScreenShots: false,
      launchReport: false,
      metadata: {
        "Browser": "Chrome",
        "Platform": `${os.platform()}  ${os.release()} (${os.arch()})`,
        "Parallel": "no",
      }
    };
    reporter.generate(options);

  }
};
github graphql-binding / graphql-static-binding / test / createReport.js View on Github external
var reporter = require('cucumber-html-reporter');

var options = {
        theme: 'bootstrap',
        jsonFile: 'test/report/cucumber_report.json',
        output: 'test/report/cucumber_report.html',
        reportSuiteAsScenarios: true,
        launchReport: false,
        metadata: {
            
        }
    };

    reporter.generate(options);
github gkushang / cucumber-parallel / test / report / generateReport.js View on Github external
var htmlReporter = require('cucumber-html-reporter');

module.exports = htmlReporter.generate({
    theme: 'bootstrap',
    jsonFile: 'test/report/cucumber_report.json',
    output: 'test/report/cucumber_report.html',
    reportSuiteAsScenarios: true
});
github canvaspixels / courgette / index.js View on Github external
if (pomConfig.platform === 'mobile') {
      console.log(`Exit mobile run with code ${code}`);
      process.exitCode = code;
    } else {
      console.error('NO COURGETTE SCENARIOS HAVE BEEN RUN, MAYBE YOU HAVE AN @ignore TAG ON THE ONE YOU’RE TRYING TO RUN?');
      console.error('The problem is there are no json files that can be read from.');
      console.error('Tags used: ', tags);
      console.log('-----------------------------------');
      console.log('-----------------------------------');
      console.log('Exiting with code 1');
      process.exitCode = 1;
    }
    return;
  }

  cucumberHtmlReporter.generate(cucumberHtmlReporterConfig);

  const { successCount, failureCount, totalCount } = await loopThroughReport();

  const table = new Table({
    head: [
      'Total Scenarios'.white,
      'Successful'.green,
      'Failures'.red,
    ],
  });

  table.push([totalCount, `${successCount}`.green, `${failureCount}`.red]);

  log('');
  log(table.toString());
github cassioafs / protractor-guide-line / e2e / cucumber-example / protractor.conf.js View on Github external
afterLaunch: function() {
    var reporter = require('cucumber-html-reporter');

    var options = {
          theme: 'bootstrap',
          jsonFile: 'results.json',
          output: 'e2e/tests_result/cucumber_report.html',
          reportSuiteAsScenarios: true,
          launchReport: true
      };

      reporter.generate(options);

  },
}
github TradeMe / tractor / src / init / base-file-sources / hooks.js View on Github external
function htmlReportWriter (outputDir, jsonFileName) {
        var htmlFileName = getFileName('tractorReport_', 'html');
        var cucumberhtmlReport = path.join(outputDir, htmlFileName);
        var cucumberJsonReport = path.join(outputDir, jsonFileName);
        var options = {
            theme: 'bootstrap',
            jsonFile: cucumberJsonReport,
            output: cucumberhtmlReport,
            reportSuiteAsScenarios: true,
            launchReport: true
        };

        cucumberHtmlReporter.generate(options);
    }
github TradeMe / tractor / packages / tractor / src / init / base-file-sources / hooks.js View on Github external
function htmlReportWriter (outputDir, jsonFileName) {
        var htmlFileName = getFileName('tractorReport_', 'html');
        var cucumberhtmlReport = path.join(outputDir, htmlFileName);
        var cucumberJsonReport = path.join(outputDir, jsonFileName);
        var options = {
            theme: 'bootstrap',
            jsonFile: cucumberJsonReport,
            output: cucumberhtmlReport,
            reportSuiteAsScenarios: true,
            launchReport: true
        };

        cucumberHtmlReporter.generate(options);
    }

cucumber-html-reporter

Generates Cucumber HTML reports in three different themes

MIT
Latest version published 11 months ago

Package Health Score

70 / 100
Full package analysis

Popular cucumber-html-reporter functions