Date post: | 28-Jan-2018 |
Category: |
Software |
Upload: | qasymphony |
View: | 1,179 times |
Download: | 0 times |
| HELLO, REAL WORLD.
Include Automated Restful API Testing with your CI usingPostman, Newman, and Jenkins
Elise Carmichael
| HELLO, REAL WORLD.
Elise Carmichael
Vice President of Quality
QASymphony
Agenda
• There are so many types of testing, why focus on API?
• Why use Postman, Newman, and Jenkins?
• How to write tests in Postman
• How to use Newman to execute Postman tests from a commandline
• How to include your tests in Jenkins
• Note: Focusing on REST
• Security
• Security
• Security
• Security
• Security
• Security
Why API Testing?
• Quick tests to write, run, quick feedback in CI jobs
• Reusability for performance testing
• Put some basic scenarios into your production monitoring system to be aware of outages before your customers
Why API Testing?
INSERT PHOTO ON TOP
• We use Postman at QA Symphony for our REST API tests.
• It’s
• Free
• Very Popular
• Easy to use
• Works well with CI
Postmanhttps://www.getpostman.com/
INSERT PHOTO ON TOP
• We use Newman to integrate API tests into CI at QA Symphony
• It’s
• Free
• Works seamlessly with Postman
• Executes tests from the command line so that they can be included in CI
Newmanhttps://www.getpostman.com/docs/postman/collection_runs/command_line_integration_with_newman
Jenkinshttps://jenkins.io/
• Jenkins is one of several tools we use at QA Symphony to assist with Continuous Integration
• It’s
• Free
• Popular
• Very, very flexible with many plugins (even qTest has one!)
INSERT PHOTO ON TOP
Postman Examples
1. Read Some API Documentation (let’s use qTest’s API)
2. Make a call1. Login & Create Test Case
3. Test the call1. Verify Status Code
2. Verify Speed
3. Verify Response
INSERT PHOTO ON TOP
Postman Examples (continued)
1. Set up variables (to use/store in the next call)
2. Check for a security flaw1. Same verifications
3. Runner GUI
4. Download a collection
5. Download the environment (staging/dev)
INSERT PHOTO ON TOP
Newman Example
1. Let’s test that same collection from the commandline
INSERT PHOTO ON TOP
Jenkins Example
1. Simple shell to execute newman
2. Use script to upload test results to qTest, just to show the full cycle if we wanted to not just include API testing in our CI, but to have a documented, easy to read record of what was tested
I just showed you one example of a tool set that you could use, but there are countless others!
Other Options!
| HELLO, REAL WORLD.
Test Early; Test Often!
| HELLO, REAL WORLD.
Quality Jam LondonOctober 11, 2017 – http://qualityjam.net/uk/
Email [email protected] to be entered to win a free ticket
| HELLO, REAL WORLD.
Quality Jam LondonOctober 11, 2017 – The Brewery, London
Email [email protected] to be entered to win a free ticket