Applies to ReadyAPI 2.2, last modified on November 17, 2017

After you create a recipe file, send it to ReadyAPI TestServer. To do this, you can use a tool like cURL:

curl --user Tester:test -H "Content-Type:application/json" -X POST --data-binary @C:\Work\RestRequest.json -k https://localhost:8443/v1/readyapi/executions

Here is a breakdown of this command:

Option Description
--user Tester:test This option sets request authorization. ReadyAPI TestServer uses basic authentication. Your request should include authorization information - the name and password of a user registered on TestServer.
-H "Content-Type:application/json This option sets the request content as application/json. Otherwise, ReadyAPI TestServer will not be able to identify the request as a test recipe.
-X POST This option specifies the method you use to work with the server. The POST method allows you to send test results. To get those results, use the GET method.
In cURL, you can omit the POST method when sending a test recipe.
--data-binary @C:\Work\RestRequest.json This option attaches the JSON file you created on the previous step of the tutorial to your request. Specify the absolute file path.
-k https://localhost:8443/v1/readyapi/executions This option specifies the full path to the resource you want to use. If your ReadyAPI TestServer is not running on a local computer or uses different ports, use the https://server:port/v1/readyapi/executions URL to post the test recipes to be executed.

The image below demonstrates how the above-mentioned command is executed:

API testing with ReadyAPI TestServer: Test recipe execution results

After the request is sent, you can see the response from TestServer in the command window. In the next step, we will analyze this response and see how you can get more information about the test execution from TestServer.

Prev     Next

See Also

Text-Based Recipes
Creating Your First Recipe