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.
-
Right-click the APIs node in the Navigator panel and select New XML-RPC Service from URL from the context menu.
-
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:
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.
|
||
Raw |
Displays the header and body of the request in a text format.
|
||
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.
|
||
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.
Request properties | View ↓
Name | Description |
---|---|
Description |
Text describing the request. |
Encoding |
The type of request data encoding, for example |
Endpoint |
The Resource part of the target URL (including the port number). |
Name |
The name of the request. |
Name | Description |
---|---|
Name |
The name of the request. |
Description |
Text describing the request. |
Encoding |
The type of request data encoding, for example |
Endpoint |
The Resource part of the target URL (including the port number). |
XML-RPC request test step properties | View ↓
Name | Description |
---|---|
Description |
Text describing the test step. |
Name |
The test step’s name. |
Operation |
The simulated operation name: |
Parameters |
The operation parameters’ signature. For instance, if an operation has an integer and a string parameter, the property value will look like |
Service |
Specifies the service name (it is part of the endpoint). |
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: |
Parameters |
The operation parameters’ signature. For instance, if an operation has an integer and a string parameter, the property value will look like |
Custom XML-RPC test step properties | View ↓
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 |
---|---|
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. |
Response |
The response data without headers. You can see the same content in the response XML panel. |
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.
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.
Change endpoint
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.
Modify request
Add custom headers
To add a custom header:
-
Open the Headers panel of the request editor.
-
Click and specify the desired header and its value.
Specify authorization
Verify response
To verify that the server returns the expected response, use assertions:
-
Click Add Assertion on the request toolbar.
-
In the Add Assertion dialog, specify the desired assertion.
-
Set up a new assertion according to your needs and click OK.