SoapUI API/Webservices Testing Part 3



restcountries.eu no longer works, restcountries.com works

restcountries.com Navigation

All about Name



SOAP UI
How To Create a Rest Project, Test Suite, Test Case
- - - - - - - - - - - - - - - - - - - - - - - - - -
https://restcountries.eu/ - the video uses .eu; we will use .com

results from link ending with india

End points, Domains, and Resources

4 types of Requests - GET, POST, PUT, DELETE

Performing a GET request

3 ways to Create a REST project

  1. Right-click the word Projects to display the submenu that gives you a menu item for "New REST Project"
  2. Click File from the menu bar to display the submenu that gives you a menu item for "New REST Project"
  3. Click the "REST" button in the toolbar to display a dialog box that will create a REST project

the "New REST Project" dialog box

  URL Resource  Path  Search?Parameter  Value 
format  https://example.com   resource path search?parameter value
.eu example  https://restcountries.eu   rest/v2/name/india       
.com example  https://restcountries.com   v2/name/india       

The .eu way

New REST Project Dialog Box

The .com way

New REST Project Dialog Box after entering the URL after creating the project

the SoapUI with a REST project

the Projects Panel
the .eu way the .com way
  • Projects
    • REST Project 1
      • http://restcountries.eu
        • India [/rest/v2/name/india]
          • India 1
            • Request 1
  • Projects
    • REST Project 1
      • http://restcountries.com
        • India [/v2/name/india]
          • India 1
            • Request 1
SoapUI for REST (home screen)

WADL: Web Application Description Language

the "Request 1" window

the JSON Response

the REST Response pane

Creating Test Suites and Test Cases

the submenu

the "Generate TestSuite" dialog box

the Generate TestSuite dialog box


the Generate TestSuite dialog box

The smaller "Generate TestSuite" dialog box, that wants the name.

the smaller Generate TestSuite dialog box        the smaller Generate TestSuite dialog box after changing the name        after changing the name

the TestSuite is created

after creating the TestSuite after creating the TestSuite tree view of TestSuite and TestCase        tree view of TestSuite and TestCase the submenu from the TestCase        the submenu from the TestCase the Rename TestCase dialog box - before the Rename TestCase dialog box - after Tree View from the Projects panel - after renaming the treeview after the rename treeview after expanding Test Steps(1) the request and respond panels the respond panel with JSON data

Adding an Assertion

the Assertions(0) button

the Assertions(0) button


the Assertions(0) button the Assertions(0) button the Add Assertions dialog box

8 Assertions to choose from

  1. Recently used
  2. Property Content
  3. Compliance, Status and Standards
  4. Script
  5. SLA
  6. JMS
  7. JDBC
  8. Security

The screen shot below displays the text for the "Property Content" assertion.

descriptions for Property Content the Contains Assertion dialog box the Content box for Contains Assertion dialog box the Assertions(1) button indicator light is black indicator light is green the Assertions panel or pane
the VALID submenu the Contains submenu
the VALID submenu the Contains submenu

Content with Territory

with Territory

Content without Territory

without Territory British Indian Ocean Territory is still high-lighted JSON data in the response pane

the "TestCase1" dialog box

the TestCase1 dialog box the TestCase1 dialog box after Run

the "CountriesTestSuite" dialog box

the CountriesTestSuite dialog box after Run

-> Create Rest Project using URL(WADL)
-> Create test suite and test cases
-> Add contain assertions
-> Execute tests in sequence and parallel
-> Documentation

How to produce "Documentation"

selecting the WADL(URI) selecting the WADL(URI) the Create Report dialog box the Progress message box the new document created thru SoapUI

YouTube Videos


using the v1/film endpoint

REST Resources

Learned from Joe

other Endpoints that worked

Adding a Film Id to the Endpoint

Screenshots of the single film that belongs to id: ST00000144

after saving req, I got XML

Same Id used with the Endpoint Explorer

Before the Send Button

after saving req, I got XML

After the Send Button

after saving req, I got XML

Buried in the XML Schema is the Id that = ST00000144

after saving req, I got XML



Screenshots of SoapUI Requests that worked

I got what Joe got after saving req, I got what Joe got

Using the additional header of Accept and value of application/xml

after saving req, I got what Joe got

Running the Request thru the other Request window, and I got XML !!

after saving req, I got XML

Reserve

Reserve