XML-RPC Test Step

Applies to ReadyAPI 3.56, last modified on November 21, 2024

About XML-RPC test step

Use this test step to perform XML-RPC requests from your tests.

Adding XML-RPC service

To use the XML-RPC request, you need to add your XML-RPC service to the ReadyAPI project.

  1. Right-click the APIs node in the Navigator panel and select New XML-RPC Service from URL from the context menu.

  2. In the subsequent dialog box, specify the URL of your tested service.

ReadyAPI will load information about all the service’s operations (methods) and their parameters and will display the operation names in the project tree.

To learn more, see Adding More APIs to Existing Projects.

Creating XML-RPC test step

When you add the test step, you need to specify its name and the service method to invoke.

Editing XML-RPC test step

You can modify settings of the test step in its editor:

XML-RPC test step overview

Click the image to enlarge it.

Here is a brief description of available panels in the request editor:

Name Description
XML Displays the request body in the XML format. You can use this tab to specify the request body in the XML format.
Note: You can use Property Expansions to specify parameter values here.
Raw Displays the header and body of the request in a text format.
Note: ReadyAPI populates this tab after you run the test step.
Outline The tab displays the request body content as a tree. You can change elements’ and attributes’ values in-place. Just double-click the cell with the needed value.
Auth On this panel, you select the (Basic, NTLM, or SPNEGO/Kerberos) authorization type for your request. You can also specify authorization parameters here.
Headers On this panel, you can create and modify custom header fields.
Attachments On this panel, you specify the files to be attached to the request.
XSD Displays the document schema (if available).
Table Displays the contents of the node selected in the Outline panel, and the contents of its sibling nodes, if any. If needed, you can modify data directly in the table cells.
Note: This panel is shown only if the request body contains XML data.
XML Displays the XML code of the node that you selected in the Outline panel.
Note: The Doc and JMS Headers tabs are not used for XML-RPC requests.

Once you run the test step, the server response is available in the response editor.

Property list

Besides editors and inspectors, you can adjust test step behavior by using its properties in the XML-RPC Properties and Custom XML-RPC Test Step Properties panels in the Navigator. Also, there are several properties of the XML-RPC request in the API section.

Name Description
Name

The name of the request.

Description

Text describing the request.

Encoding

The type of request data encoding, for example UTF-8 or iso‑8859‑1.

Endpoint

The Resource part of the target URL (including the port number).

Name Description
Name

The test step’s name.

Description

Text describing the test step.

Service

Specifies the service name (it is part of the endpoint).

Operation

The simulated operation name: objectName.opName.

Parameters

The operation parameters’ signature. For instance, if an operation has an integer and a string parameter, the property value will look like int;string;.

Values on the Custom XML-RPC Test Step Properties tab are available to other test steps in your project. For instance, you can verify these property values with the Assertion test step, or check them and change the execution flow with the Conditional GoTo test step. To learn more, see About Properties.

You can load values of custom properties from a file, or save them to a file. To do this, use the toolbar items.

This tab contains properties that provide access to the request and response data:

Name Description
Response

The response data without headers. You can see the same content in the response XML panel.

Endpoint

A URL address of the tested web service.

Request

Request body without headers. Property expansions are represented as they are without conversion to expected values.

Test step toolbar

The test step toolbar contains commands that allow you to modify the test step or appearance of the test step editor.

XML-RPC test step toolbar

Click the image to enlarge it.

Verifying response

To add, change or modify assertions, use the Assertion panel. You can use the following assertions:

Name Description
Property Content:
Contains Verifies that the response contains the specified string.
Equals Verifies that the value of a property is equal to the specified value.
Equals (Binary) Checks whether the binary response is equal to a file.
Message Content Assertion Verifies that the message contains expected contents.
Not Contains Verifies that the response does not contain the specified value
Smart Assertion Verifies the message content and metadata such as headers and the status code.
.XPath Match Checks whether the result of the specified XPath expression is equal to the specified value.
XQuery Match Verifies that the result of the specified XQuery expression is equal to the specified value.
Compliance, Status and Standards
HTTP Header Equals Checks whether the response contains the expected value of an HTTP header.
HTTP Header Exists Verifies that the response contains the specified HTTP header.
Invalid HTTP Status Codes Verifies that the HTTP status code is not on the specified list.
Swagger Compliance Assertion Verifies that a request and response are compliant with an OpenAPI or Swagger specification.
Valid HTTP Status Codes Checks whether the HTTP status code is on the specified list.
Script
Script Assertion Executes a script to perform a custom assertion.
SLA
Response SLA Checks whether the response was returned within the specified timeout.
Security
Sensitive Information Exposure Checks whether the response does not contain any valuable information.

Logging

If the test step is run as part of a test case, you can see a detailed log in the Transaction Log panel.

Working with

Below, you can find information on common tasks that you can perform with the XML-RPC Request test step.

Specify a new endpoint in the test step toolbar. By using a drop-down list, you can select one of the endpoints specified on the service’s Endpoint page or modify this list with the following commands:

  • edit current – changes the selected endpoint.

  • add new endpoint – adds a new endpoint to the list.

  • delete current – removes the selected endpoint from the list.

Another way to modify the endpoint is to use the Endpoint property.

You can modify the request body in the XML or Outline editor.

To add a custom header:

  1. Open the Headers panel of the request editor.

  2. Click and specify the desired header and its value.

To add authorization:

  1. Open the Auth panel of the request editor.

  2. Select the desired Authorization profile. Also, the request can inherit authorization settings:

    • Inherit From Parent means that authorization settings will be the same as in the parent test case.

    • Inherit From Service means that authorization settings will be the same as in the underlying request.

  3. Specify required settings, such as username, password, domain, and so on.

To learn more about authorization, see Authentication.

To verify that the server returns the expected response, use assertions:

  1. Click Add Assertion on the request toolbar.

  2. In the Add Assertion dialog, specify the desired assertion.

  3. Set up a new assertion according to your needs and click OK.

See Also

Test Steps
Adding More APIs to Existing Projects
XML-RPC APIs

Highlight search results