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
Back To All Features
You 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.