42
loading...
This website collects cookies to deliver better user experience
In this article, we will be exploring about how to run Postman collections on Jenkins with Freestyle Project. And we will try to generate our test run reports using Allure Jenkins plugin and will publish the test run status notifications to Flock messenger.
Open Jenkins: Manage Jenkins → Global Tool Configuration → NodeJS
Open Jenkins → New Item → Enter any job name→ Choose Freestyle Project → Click on Save button
4.Build environment → Check “Delete workspace before build starts”
5.Build environment → Check “Provide Node & npm bin/ folder to PATH” → select NodeJs name
6.Build → Add build step → Select Execute Shell → And Paste the below code. → Save Your config.
eg:- newman run [collections] -e [environment] -r allure --reporter-allure-export target/allure-results --suppress-exit-code 1
newman run "https://api.getpostman.com/collections/[collection_uid]?apikey=[apiKey]" \
--environment "https://api.getpostman.com/environments/$server?apikey=[apiKey]" \
-r allure --reporter-allure-export target/allure-results \
-- suppress-exit-code 1
Click on Build with Parameter → Select the options that are required to be passed in the branch parameter [QA/ Prod] and click on → BUILD
Flock messenger would notify you about the Jenkins build status.
To view reports click on “View” in flock → Will be redirected to Jenkins [After successful authentication]→ Click on Allure Report
In this article we have seen how to use Jenkins to run Newman tests, generate & publish reports using Allure / Flock plugins. I hope you may have found this useful. Cheers!!