API Calls
What's software development without APIs? You can make API calls from anywhere within a test. Here's how to add a new API step from within the test editor:
- Select a screen and add a step from the right panel.
- Choose 'New API step'.
- Configure your API with the HTTP method, URL, headers, and body.
- Optionally, provide a "Pre-request script" or "Post-response script" to write code before or after an API call, respectively. These scripts are commonly used to set and get variables used in other parts of a test. For example, you can store user credentials retrieved from an API in variables to fill respective credential fields.
- Hit Test to ensure the API works as expected.
- When you're done, hit Save.
You can also reuse an API step among different tests using Components. Read more here.