Automate Integration Testing on your APIs with ----- Postman and Jenkins -----
-
Install a full version of Postman. https://www.getpostman.com/
-
Create your unit tests in Postman with Javascript
-
Install Node.js, Node Package Manager (NPM), and Newman
- $ npm install -g newman
-
Test Collection with Newman
-
Install Node.js and Newman on the Jenkins server
-
Create build item and add a build Step in Jenkins
- PowerShell/Bash command to run Newman
- Run job
Why do this?
- automate your "spot-checking" that everything looks good
- have continuous integration (CI) testing on every check in
- ensure existing functionality doesn't break
What type of tests?
- authentication tokens and security
- health checks HTTP 200
- write / read / THEN delete!
- any business logic
- use the environment file for dev-stage-prod
What is this not used for?
- Not used for performance and load testing.
- Not used for UI testing