I am using Allure report for my WebDriverIO mocha test automation. Report generation was working fine however, it started showing below error while running 'allure generate allure-result' command.
allure: The term 'allure' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- allure genertae
- CategoryInfo: ObjectNotFound: (allure:String) [], CommandNotFoundException
- FullyQualifiedErrorId: CommandNotFoundException```
This is my package.json devDependencies
"devDependencies": {
"@wdio/allure-reporter": "^7.16.11",
"@wdio/cli": "^7.16.13",
"@wdio/local-runner": "^7.16.13",
"@wdio/mocha-framework": "^7.16.13",
"@wdio/spec-reporter": "^7.16.13",
"chromedriver": "^97.0.2",
"mocha-allure-reporter": "^1.4.0",
"wdio-chromedriver-service": "^7.2.6"
},
What could be the reason for this failure and how to handle it?
Run:
npm install -g allure-commandline --save-dev
Resolved the issue for me.
Reference: https://www.npmjs.com/package/allure-commandline
Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.