SoapUI Pro has many advanced technologies and features that other Web services testing tools do not. SoapUI Pro provides the industry’s most comprehensive functional testing capabilities for REST, SOAP, and other popular apis and Internet of Things protocols. With an easy-to-use graphical interface and enterprise-class functionality, SoapUI Pro allows you to quickly create and execute automated functional tests. SoapUI Pro provides complete test coverage in a single environment, supporting all standard protocols and technologies. This article is intended to guide new users of SoapUI Pro through their first functional test for discussion.



Terms:

  • A Web service is a client/server application in which a client and a server exchange data on the Web over HTTP or other HTTP-based protocols. Examples of such applications include navigation software, online banking clients, weather monitoring systems, etc.
  • The URL from which the client sends the request contains information about the tested server (host), the port number used to communicate, and the requested server resource, such as the page or file path:



  • Sent by the client to the serverRequestsIt has the following structure:
    • Specify the start line of the HTTP method (such as GET, POST, or DELETE), the destination URL, and the protocol version.
    • A header that passes additional information, such as the expected format of the response data, or the size and format of the request data.
    • (Optional) Request body.



      ResponsesHave a similar structure:

    • The starting line with the response code and message. Some common code is
      200 OK (success) Copy the code

      404 Not Found (failure, the requested resource was not found)Copy the code
    • A header that describes the format of the response data and contains other values such as cookies, server information, and so on.
    • The body of the response, for example, an array containing the request data, images, files, etc.



  • Common formats for request and response bodies are JSON and XML.
  • The commands the client sends to the server to execute are called Action, Method, and Operation, depending on the service architecture style (SOAP or REST, see below).
  • Two popular architectural styles for Web services are SOAP and REST:
    • SOAP services use the SOAP protocol built over HTTP. These services use HTTP requests of the POST type and pass data in XML format in the request and response body. All requests go to the same URL, and the action to be performed is specified by a special request header or XML element in the request body.
    • REST services work over HTTP. The action to be performed is set by a combination of the HTTP method and the requested resource name. REST service definitions come in several formats: OpenAPI (Swagger), WADL, and others.

How do I test a Web service

To ensure that the Web service is running properly, you need to create and run functional tests. These tests send requests to the server and verify its response. In ReadyAPI, users can create functionality in SoapUI and easily simulate requests and customize their parameters in a special editor:



To validate the response data and response code, add assertions to the test request:



The easiest way to determine if the server is working properly is to examine the response code.

200 OK (success) Copy the code

It usually indicates that the server successfully processed the request.

In real life, a client typically sends a series of requests to a server. For an online store, for example, the first request can be used for login and subsequent requests, such as purchase of certain products. In SoapUI, users simulate this real behavior by organizing requests and other test steps into test cases. Multiple test cases working together are grouped into test suites, which in turn are test projects.



Stay tuned for the steps to create functional tests in the next serial update

For more information about this product, click herehere.