artes
Version:
The simplest way to automate UI and API tests using Cucumber-style steps.
30 lines (25 loc) • 644 B
JavaScript
const { spawnSync } = require("child_process");
const { moduleConfig } = require("../imports/commons");
function generateReport() {
try {
console.log("📊 Generating report...");
const result = spawnSync(
"npm",
["run", "testWithReport", moduleConfig.reportPath],
{
cwd: moduleConfig.modulePath,
stdio: "ignore",
shell: true,
},
);
console.log(
`📋 Report generated successfully in ${moduleConfig.reportPath}!`,
);
} catch (error) {
console.error("❌ Report generation failed:", error);
process.exit(1);
}
}
module.exports = {
generateReport,
};