®
WEBINAR: Planet Test Automation: First Steps
Part 4: Automating REST/SOAP API Testing
• December 4th, 2019 – Alexey Grinevich, @AlexeyGrinevich
We will be starting the webinar shortly, please stand by…
All phones will be automatically on mute until the Q&A.
®
2 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Webinar Series: Useful Information
• Housekeeping Matters
• Post Webinar Follow-Up:
• Blog
• Webinar Recording
• Presentation On Slideshare
• Post-Webinar Quiz
• Webinar Series: Planet Test
Automation: First Steps
• Webinar Series Certificate Rules &
FAQs
®
3 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Hey, I am Alexey
• Working on Rapise test
automation tool @Inflectra
• 20 years in software
development
• 10 years in test automation
• Twitter: @AlexeyGrinevich
• Email: alexey@Inflectra.com
®
4 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Demo AUT
 https://demo.openmrs.org/openmrs/login.htm
®
5 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Scenario: Merge Patient
 We use local instance (REST enabled)
 Our URL http://openmrs.demo/openmrs-standalone/
®
6 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
®
®
7 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
APIs
 REST API (OpenMRS)
 Create Patient
 SOAP API (Spira v5)
 Create Incident
®
8 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Master Plan
 Analyze
 Try
 Plan
 Implement
®
9 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
API Master Plan
 For each API (REST, SOAP) do:
 Analyze
 Try
 Plan
 Implement
®
10 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Analyze: REST
 Find reference docs
https://wiki.openmrs.org/display/docs/REST+Web+Services+API
+For+Clients
 Find info about Authorization
https://wiki.openmrs.org/display/docs/REST+Web+Services+API
+For+Clients#RESTWebServicesAPIForClients-Authentication
 Find samples
https://wiki.openmrs.org/display/docs/Create+Patient
 Find entry points
®
11 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Try: REST
 Try it right from Rapise
 Choose appropriate API version (latest is not always best)
®
12 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Plan: REST
 Find a sequence
 Define parameters
 Define outputs
®
13 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Implement: REST
 Use Record & Verify
 Generate Script
 Define JS parameters
®
14 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
SOAP
 Similar to REST
 Except WSDL
 URL https://dev-eu.spiraservice.net/
®
15 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Analyze: SOAP
 Find WSDL Entry point
 Find info about
Authorization
®
16 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Try: SOAP
 Try it right from Rapise
 Choose best entry point
®
17 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Plan: SOAP
 Find a sequence
 Define parameters
 Define outputs
®
18 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Implement: SOAP
 Use Record & Verify
 Generate Script
 Define JS paremeters
®
19 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Wrap Up: Four Steps
Analyze
 API Entry Point
 Authorization
Try
 Call individual entry points
Plan
Define a sequence
Implement
Record steps
Tune Parameters, Headers, Credntials
Tune Link output parameters
®
20 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Complete Example
 openmrs testing framework
 Uses SubTests, utils and bricks
 Uses shared objects
 Has scenario S03MergePatient implemented and placeholder of
other scenarios (S03)
 You may configure it to work with your spira and to use different
patient name.
®
21 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Ashurbanipal Sargonid
®
22 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Next Webinar
 Data-Driven Testing
 The power of UI test automation is in capability to execute the
same steps with different input data. Join us to learn the basic
techniques of data-driven UI testing. Besides theoretical info we
are going to show examples using real applications. Presenter:
Denis Markovtsev – automation expert at Inflectra
 http://www.inflectra.com/Company/Event/live-webinar-data-
driven-testing-part-5-903.aspx?source=webinar
®
23 | 12/4/2019 © Copyright 2006-2019 Inflectra Corporation
Q&A
Thank You!

Automating REST/SOAP API Testing (Part 4)

  • 1.
    ® WEBINAR: Planet TestAutomation: First Steps Part 4: Automating REST/SOAP API Testing • December 4th, 2019 – Alexey Grinevich, @AlexeyGrinevich We will be starting the webinar shortly, please stand by… All phones will be automatically on mute until the Q&A.
  • 2.
    ® 2 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Webinar Series: Useful Information • Housekeeping Matters • Post Webinar Follow-Up: • Blog • Webinar Recording • Presentation On Slideshare • Post-Webinar Quiz • Webinar Series: Planet Test Automation: First Steps • Webinar Series Certificate Rules & FAQs
  • 3.
    ® 3 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Hey, I am Alexey • Working on Rapise test automation tool @Inflectra • 20 years in software development • 10 years in test automation • Twitter: @AlexeyGrinevich • Email: [email protected]
  • 4.
    ® 4 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Demo AUT  https://demo.openmrs.org/openmrs/login.htm
  • 5.
    ® 5 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Scenario: Merge Patient  We use local instance (REST enabled)  Our URL http://openmrs.demo/openmrs-standalone/
  • 6.
    ® 6 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation ®
  • 7.
    ® 7 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation APIs  REST API (OpenMRS)  Create Patient  SOAP API (Spira v5)  Create Incident
  • 8.
    ® 8 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Master Plan  Analyze  Try  Plan  Implement
  • 9.
    ® 9 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation API Master Plan  For each API (REST, SOAP) do:  Analyze  Try  Plan  Implement
  • 10.
    ® 10 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Analyze: REST  Find reference docs https://wiki.openmrs.org/display/docs/REST+Web+Services+API +For+Clients  Find info about Authorization https://wiki.openmrs.org/display/docs/REST+Web+Services+API +For+Clients#RESTWebServicesAPIForClients-Authentication  Find samples https://wiki.openmrs.org/display/docs/Create+Patient  Find entry points
  • 11.
    ® 11 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Try: REST  Try it right from Rapise  Choose appropriate API version (latest is not always best)
  • 12.
    ® 12 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Plan: REST  Find a sequence  Define parameters  Define outputs
  • 13.
    ® 13 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Implement: REST  Use Record & Verify  Generate Script  Define JS parameters
  • 14.
    ® 14 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation SOAP  Similar to REST  Except WSDL  URL https://dev-eu.spiraservice.net/
  • 15.
    ® 15 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Analyze: SOAP  Find WSDL Entry point  Find info about Authorization
  • 16.
    ® 16 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Try: SOAP  Try it right from Rapise  Choose best entry point
  • 17.
    ® 17 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Plan: SOAP  Find a sequence  Define parameters  Define outputs
  • 18.
    ® 18 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Implement: SOAP  Use Record & Verify  Generate Script  Define JS paremeters
  • 19.
    ® 19 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Wrap Up: Four Steps Analyze  API Entry Point  Authorization Try  Call individual entry points Plan Define a sequence Implement Record steps Tune Parameters, Headers, Credntials Tune Link output parameters
  • 20.
    ® 20 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Complete Example  openmrs testing framework  Uses SubTests, utils and bricks  Uses shared objects  Has scenario S03MergePatient implemented and placeholder of other scenarios (S03)  You may configure it to work with your spira and to use different patient name.
  • 21.
    ® 21 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Ashurbanipal Sargonid
  • 22.
    ® 22 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Next Webinar  Data-Driven Testing  The power of UI test automation is in capability to execute the same steps with different input data. Join us to learn the basic techniques of data-driven UI testing. Besides theoretical info we are going to show examples using real applications. Presenter: Denis Markovtsev – automation expert at Inflectra  http://www.inflectra.com/Company/Event/live-webinar-data- driven-testing-part-5-903.aspx?source=webinar
  • 23.
    ® 23 | 12/4/2019© Copyright 2006-2019 Inflectra Corporation Q&A Thank You!

Editor's Notes

  • #4 Thea, thank you for the intro. Thanks everyone for joining today. My name is Denis! I create software products for about 20 years. Last 10 years I do it in test automation field. Currently I am in love with Rapise – test automation tool we develop at Inflectra. Follow me on Twitter and send questions by email. You are very welcome.