Download - Testing Web Services - CodeMash 2014
![Page 1: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/1.jpg)
Business Value…Achieved
Testing Web Services
Stan Jónsson @sjonsson
CodeMash 2014
![Page 2: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/2.jpg)
Business Value…Achieved
whoami
• Senior Consultant at Quick Solu>ons
![Page 3: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/3.jpg)
Business Value…Achieved
Agenda
![Page 4: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/4.jpg)
Business Value…Achieved
Agenda -‐ cont.
• Will also briefly show this Chrome plugin
Advanced REST client
![Page 5: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/5.jpg)
Business Value…Achieved
SoapUI
• Open source cross-‐plaOorm func>onal tes>ng solu>on – SOAP – REST – JDBC – JMS – HTML
![Page 6: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/6.jpg)
Business Value…Achieved
What do I use SoapUI for?
Probing Mocking
![Page 7: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/7.jpg)
Business Value…Achieved
Demo Time (Screenshots of some of what I walked through)
![Page 8: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/8.jpg)
![Page 9: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/9.jpg)
![Page 10: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/10.jpg)
![Page 11: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/11.jpg)
![Page 12: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/12.jpg)
![Page 13: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/13.jpg)
![Page 14: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/14.jpg)
Business Value…Achieved
What do I probe for?
• Can I get to the web service? – No access issues or proprietory security protocol
• Does the input/output XML/JSON look ok?
• Does the service return valid respones? • Does the service handle errors in a meaningful way?
![Page 15: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/15.jpg)
Business Value…Achieved
JMeter
• Open source applica>on designed to load test func>onal behavior and measure performance – Web -‐ HTTP, HTTPS – SOAP – JDBC – LDAP – JMS – Mail -‐ SMTP(S), POP3(S) and IMAP(S) – Na>ve commands or shell scripts
![Page 16: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/16.jpg)
Business Value…Achieved
What do I use JMeter for?
Smoke tes>ng Load tes>ng Performance tes>ng
![Page 17: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/17.jpg)
Business Value…Achieved
Demo Time (Screenshots of some of what I walked through)
![Page 18: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/18.jpg)
![Page 19: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/19.jpg)
![Page 20: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/20.jpg)
![Page 21: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/21.jpg)
![Page 22: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/22.jpg)
![Page 23: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/23.jpg)
![Page 24: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/24.jpg)
![Page 25: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/25.jpg)
![Page 26: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/26.jpg)
![Page 27: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/27.jpg)
![Page 28: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/28.jpg)
![Page 29: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/29.jpg)
Business Value…Achieved
JMeter – Con>nuous Integra>on
![Page 30: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/30.jpg)
Business Value…Achieved
REST-assured
• Java DSL for easy tes>ng of REST services – POST, GET, PUT, DELETE, HEAD – Easy to validate and verify response
![Page 31: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/31.jpg)
Business Value…Achieved
What do I use REST-assured for?
Web Service Acceptance Tes>ng Run frequently as part of CI
![Page 32: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/32.jpg)
Business Value…Achieved
Demo Time (Screenshots of some of what I walked through)
![Page 33: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/33.jpg)
![Page 34: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/34.jpg)
![Page 35: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/35.jpg)
![Page 36: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/36.jpg)
![Page 37: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/37.jpg)
Business Value…Achieved
Test Automa>on
• Good – Tests read in test data from external configura>on
• Becer – Tests search for test data in db before run
• Best – Tests populate db before run & clean up aeerwards
![Page 38: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/38.jpg)
Business Value…Achieved
Ques>ons?
![Page 39: Testing Web Services - CodeMash 2014](https://reader034.vdocuments.pub/reader034/viewer/2022051817/54905fdcb4795971178b4730/html5/thumbnails/39.jpg)
Business Value…Achieved
Summary
• Looked at various free Web Service tes>ng tools • Showed how they can cover most of your Web Service tes>ng needs
@sjonsson www.sjonsson.com sjonsson@quicksolu>ons.com