Vitaly Orlov
Vitaly Orlov

Reputation: 41

Allure report using Newman

I use "newman" to run API tests on Jenkins server. It's very easy for me, I write test scripts in "Postman" and run my collection in "newman" but I can't provide good reports for my manager. I found "allure report" and I like it. Is there any chance to create allure report if I use "Newman". Does allure support newman?

Upvotes: 2

Views: 6230

Answers (3)

Vova
Vova

Reputation: 3537

Try to use my repository, here's tricky solution, which covers everything:

And add couple more things:

  1. Add 2 files: collection *.json and env *.json
  2. Add +x permissions to start.sh file with chmod command, like chmod +x start.sh
  3. And run script ./start.sh your_collection.json your_env.json

Finally, you will get 2 reports:

  • HTML report
  • Allure report

Upvotes: 1

Arjun Marati
Arjun Marati

Reputation: 427

Yes, you can. Follow below steps:

we can generate nice and clean report using Allure-js framework.
1. Installation
$ npm install -g newman-reporter-allure
    
2. Run the newman cli command to generate Allure results, specify allure in Newman's -r or --reporters option.
$ newman run <Collection> -e <Environment> -r allure

3. Allure results will be generated under folder "allure-results" in the root location. Use allure-commandline to serve the report locally.
$ allure serve

4. To generate the static report web-application folder using allure-commandline
    $ allure generate --clean
Report will be generated under folder "allure-report" in the root location

.

Upvotes: 1

V. Rob
V. Rob

Reputation: 346

Looks like no, it's impossible.

Why now (after writed tests) you are looking for report tool? It's activity happen in start automation process when qa team analyze test tools are could be used for automation.

I have a look on https://github.com/postmanlabs/newman and think could you try parse commandline output to text file? And use this output to generate simple-report for manager.

Upvotes: 1

Related Questions