Applies to ReadyAPI 2.4, last modified on June 7, 2018
Test recipes are JSON requests. Text-based recipes are text files with JSON contents.
To create a text-based recipe:
Open any text editor and create a new empty file in it.
Write JSON contents of the recipe to specify the test steps to be executed and the assertions to be used.
We will create a sample test recipe that will contain two test steps: a REST request and a Groove Script.
You can find this recipe below. Copy it to your file:
"type": "REST Request",
"type": "Valid HTTP Status Codes",
"script": "println 'Successful test run!'"
Array of test steps (comma-separated)
The test step type (request)
The request method
The destination URL
Assertions applied to the test step
The assertion name and parameters
Separator of array items
The test step type (script)
The script code
Save the file as RestRequest.json to some directory on your computer.
We will run this recipe in the next step.
JSON Format of Test Recipes
How to: Text-Based Recipes
Creating Your First Recipe