This commit is contained in:
erinn 2022-01-27 14:11:22 -08:00
parent 190da5d26d
commit 108072f596
1 changed files with 20 additions and 0 deletions

20
index2.js Normal file
View File

@ -0,0 +1,20 @@
var fs = require("fs");
var reporter = require('cucumber-html-reporter');
const reportRootDir = 'integration_test/gherkin/reports/'
const jsonReportPath = `${reportRootDir}json_report.json`;
const htmlReportPath = `${reportRootDir}cucumber_report.html`;
const reportFile = fs.readFileSync(`${reportRootDir}integration_response_data.json`);
//const jsonReport = JSON.parse(JSON.parse(reportFile).gherkin_reports)[0];
const jsonReport = JSON.parse(reportFile);
fs.writeFileSync(jsonReportPath, JSON.stringify(jsonReport));
var options = {
theme: 'bootstrap',
jsonFile: jsonReportPath,
output: htmlReportPath,
reportSuiteAsScenarios: true,
launchReport: false,
};
reporter.generate(options);