Reusable Snippets

Snippets are chunks of JavaScript code that can be reused across requests. This is useful if you need to apply the same script logic to many different requests and tests (e.g. schema validations, default assertions, etc.).

Script Snippets require a qualifying plan. Check your plan or contact Sales to get started.

Creating a Snippet

Script Snippets belong to a team and can be used by any test within the team. To create a new snippet, select "Script Library" from your team list.

Using a Snippet in Your Tests

Snippets are available to be selected in the test and environment editor for initial, pre-request and post-response scripts. Selecting a snippet to use as the initial script will replace any environment-specific initial script.

Related Topics