You use the Request editor to configure requests, send them, and view the received responses.
To open the editor, select a request in the Navigator. Here is how the editor looks like:
|gRPC and Kafka APIs, do not have a request editor in the APIs node. To work with them, create an API Connection test step for the operation and edit the request there.
Below, you can find short description of all the panels on the editor.
In the toolbar, you configure a request, its endpoint, send the request or add it to a test case, as well as configure its appearance:
|You can no longer delete a request if it’s used by any existing test step. To delete such a request, it is required to modify test steps.
You edit requests by using the following panels:
Request (REST and GraphQL services)
The Request panel provides you with the native way of editing the REST and GraphQL requests:
XML (SOAP services)
By using the XML panel you edit XML body of the request:SOAP Requests to learn more.
The Raw panel shows the non-editable raw text of the latest request sent to the target service. This panel displays headers and inline attachments.
|You need to send a request to view its raw information.
The Outline panel shows a tree view of an XML or JSON request message. Double-click items in the Value column to edit them.
To navigate through the tree easily, use the panel toolbar:
Collapses all children of the selected node.
Expands all children of the selected node.
Collapses all siblings of the selected node.
Expands all siblings of the selected node.
Selects the next sibling of the selected node.
Selects the previous sibling or parent of the selected node.
Selects the parent item of the selected node.
Selects the first child of the selected parent or its sibling.
Shows or hides the type information column.
To display the request in the Outline panel, ReadyAPI has to analyze it and display the contents. For complex requests, this may take an extended period of time, so ReadyAPI displays a warning instead. You can dismiss this warning and continue, but creating a form may take long or cause ReadyAPI to crash.
The warning appears if there are over 2000 items in the service definition, or if the XML definition is over the maximum value specified in ReadyAPI options.
The Form panel shows user-friendly input forms for the request parameters.
Depending on the value type – for example, for the
list values – ReadyAPI displays different field types. These are custom fields that make working with them faster and easier.
To display the request in the Form panel, ReadyAPI has to analyze it and display the contents. For complex requests, this may take an extended period of time, so ReadyAPI displays a warning instead. You can dismiss this warning and continue, but creating a form may take long or cause ReadyAPI to crash.
The warning appears if there are over 2000 items in the service definition, or if the XML definition is over the maximum value specified in ReadyAPI options. Also, when you open the panel, only the first level of forms will be available to prevent possible issues. We recommend keeping only the necessary forms open.
Configuring View Type
You can use the View Type drop-down list to filter fields by their definition. This is useful in a manual testing scenario where you need only to modify certain fields.
Below are the available options:
|Shows all elements.
|Shows only required elements.
|Shows only elements containing data.
Mandatory And Data
|Shows required elements and elements containing data.
Validate Parameter Values
To check if the data types of parameter values match the specification of your request, click on the toolbar. The editor will highlight the parameters with mismatching data types:
This feature works for WSDL services and for the REST services based on Swagger 2.0 specifications in the JSON and YAML formats. Also, these Swagger 2.0 services must be added to the project in ReadyAPI 2.2 or later.
For other services, the check always succeeds.
If you test a RESTful service, you may change the parameter data type on the Request page of the editor, but the command will validate request values against the spec, not against the settings on this page.
Request bottom panels
Response tabs provide you with different response representation:
The XML panel shows the latest response in the XML format.
You can edit the response to assert potential responses from the service. Right-click in the editor and select Edit.
To manually validate the response, right-click in the editor and select Validate. See Validate Requests and Responses.
The HTML panel displays an HTML response as a web page, if possible.
For example, for the GET method that returns a web page, the web page is displayed.
|If you click links on the page, they will be opened in the system’s default browser.
If ReadyAPI cannot render the response content due to a specific content type, you can save the data to a file. To do this, click Save to File.
The Raw panel shows the raw content of the latest response, including headers and other request information.
The Overview panel provides an easy to read view of the response message.
Click the URLs in the response message to open them in your browser.