...
Info | ||
---|---|---|
| ||
If If you have a traffic file that captures traffic for RESTful services, you can generate a test scenario with REST Clients configured to test the recorded traffic. For details, see Creating New Test Scenarios and Test Suites. |
...
- If the containing test suite includes multiple data sources, you can review and change which data source is used to parameterize this REST Client. See Parameterizing with Data Source and Data Bank Values for details.
- In the Resource area, specify where and how to access the resource you want to test.
- Select the HTTP method to execute.
Specify the URL for accessing the resource, including queries.
Info title Tip: Using {var_name} If you’re familiar with SOAtest, you can use the standard ${var_name} notation to reference environment variables, test suite variables, and data source values that are defined for the test scenario. This applies to both URL and Payload.
When you are working with JSON, a special notation is used for parameterizing a number or boolean field within a JSON message: ${number:<value>} or ${boolean:<value>}. For example, to parameterize a number field with the column Count, you would use ${number:Count}.
(Optional) Specify HTTP authentication settings if desired.
- Check Enable HTTP authentication.
- Specify the username and password.
- (Optional) Add HTTP headers if you want to override the default headers (described in the SOAtest documentation).
- Click Add.
- Specify a header name (this is case insensitive) and value. You can enter values in either table mode or literal mode.
Here is an example in literal mode:
Here is that same example in table mode.
- If you have selected a method that sends data (e.g., PUT, POST), use the Payload controls to specify the payload for the message that will be sent.
- Ensure that the appropriate payload format and media type are selected (in the Format and Content type boxes).
- Specify the payload in the literal text editor, the JSON editor, or the XML editor (see Editing JSON Messages and Editing XML Messages for details and tips).
...