Bytesalt Runpad
Tests
API calls

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:

  1. Select a screen and add a step from the right panel.
  2. Choose 'New API step'. API
  3. Configure your API with the HTTP method, URL, headers, and body. API
  4. 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.
  5. Hit Test to ensure the API works as expected.
  6. When you're done, hit Save.

You can also reuse an API step among different tests using Components. Read more here.