Error While Running Allure Command Line Generate Command

Error while running allure command line generate command

So there is no solution as such but as per @Nicolai I downgraded to JAVA 8 and it has fixed the issue.

On how I downgraded follow these simple steps mentioned here

getting 404 error when generating allure report in protractor using allure command line tool

You should not open index.html file like a normal html.

allure will spin up a web server.

"scripts": {
"allure": "node_modules/.bin/allure generate ./allure-results -c && allure open"
},

add this to your script in package.json.

After your allure-results folder is created (i.e) test completes run npm run allure

enter image description here

enter image description here

After you run npm run allure. Your default browser will automatically open the report.

How to execute Allure command using Java

The below code works perfectly fine for me. I have Java 1.8 installed on my mac machine.

String[] cmd = {"allure", "serve","/Users/kireeti/IdeaProjects/testautomationframeworkshaft/allure-results"};
Runtime.getRuntime().exec(cmd);
Thread.sleep(90000);

allure: command not found on linux

To run an executable (which is any file with executable permission); you just specify it by its path: path/to/allure/bin/allure or './allure'.

Also you can add bin folder to your PATH variable, and then simply run allure.

See the following question for more details: How to run a shell script on a Unix console or Mac terminal?

I'm trying to generate allure report for gradle IntelliJ project through terminal command. Its showing loading for long, other menu showing 404 error

Try to use direct Allure's command:

allure serve /path/to/target/folder/in/your/project/


Related Topics



Leave a reply



Submit