Example: TestServer Recipe in JSON

For teams who build REST APIs, JSON is often the format of choice for request and response data. It's no wonder that we've made the TestServer API speak JSON natively.

To execute a test from TestServer, you use a test 'recipe' (our own invention). You can use recipes to:
  • Perform simple, ad-hoc tests directly from command line
  • Run more elaborate data-driven tests
  • Test JDBC sources as well as APIs
  • Assert that responses contain specific values
 

Writing API Tests in JSON


json-recipe-(1).PNGYou can use any editor you prefer because TestServer "recipes" are simply JSON documents. You can either save these as files and run them later, or dynamically generate them and pass them into TestServer on-the-fly from script.

A powerful feature of Ready! API, property expansion, is also available from the recipe format. This allows you to transfer data between test steps.

You can also use custom headers and params, and perform multiple authentication workflows.
 
For more information on the JSON test recipe format, see our documentation on this topic. Back To All Features
Questions? Email us at sales@smartbear.com or call: U.S. +1 617-684-2600, EMEA +353 91-398300
 

Sign up for a free 14-day trial

 
 

By submitting this form, you agree to our Terms of Use