Postman Jenkins Integration
Nandhini S.
Open to work | Immediate Joiner | QA Software Testing | UI Automation | Mobile and Web application | Selenium with Java | BDD | Cucumber | Post man | BFSI Morgan Stanley project
Hi Everyone ,Today we are gonna learn about how to integrate postman with Jenkins
1.Export Your post collection and save it in the folder
2.Collection File is exported to our local folder
3.Also, export environment variables collection and save it in your same local folder
4. Open git bash window from that path
5.Install newman
6.Install Htmlextra
7. Enter a command to run postman collection locally
8.This is the output
9. Now, we are going to push our local files to Git, since it is working as expected in local. Generated files are not required. So we are adding them to git ignore File.
10.First open .gitignore File
11.add newman folder(generated folder-it contains html file)
12.Follow below git commands to push your files into remote repository
13. Open Jenkins and Create Free style project
14. click on source code management
15.Add git lab link and Credentials
16.Add newman run command in Execute shell
Configure-->General-->Build Steps-->select execute shell
17.Login to server and install newman&html extra libraries
18. Open Jenkins Project and Click on Build
We got the same output what we got in our local machine
19.Also You can pass parameter, for that go to General--> select "This project is parameterised" & choose choice parameter
enter name and value in choices
20. To generate junit results ,add below comment in execute shell.
To publish XML results , General-->Post build actions-->publish Junit test results
once build is completed, click on "Test results" tab, XML Result is published here