Reputation: 49
I am pretty new to allure-report. Can someone share the setup and configuration part of allure-report in nightwatch ?.
global module
const path = require('path');
const cwd = process.cwd();
module.exports = {
reporter: function(results , done) {
let srcResult = path.join(cwd,'/reports/client','*.xml');
console.log('path to the reports'+srcResult);
var generation = allure(["generate", "--clean", srcResult]);
generation.on ('exit',()=>{
done();
});
}
};
path to the reportsC:\uiautomation\reports\client\*.xml
C:\uiautomation\reports\client\CHROME_80.0.3987.122_Windows_user_registration.xml is not a directory
Report successfully generated to allure-report```
Upvotes: 0
Views: 1452
Reputation: 40
you can try to use allure-commandline
for this.
try this:
npm install allure-commandline --save-dev
var allure = require("allure-commandline");
module.exports = {
reporter: function(results , done) {
let srcResult = "../path/to/your/xml/result";
var generation = allure(["generate", "--clean", srcResult]);
generation.on ('exit',()=>{
done();
});
}
};
after this, you should be able to find allure result folder , and to open them u can use allure open
command. also please remember to configure your globals_path in your nightwatch conf file.
Upvotes: 1