Catchpoint's Transaction, API, and Custom Tests make use of scripts to run tests against SaaS providers. If you need to set up multiple Tests that will all connect to the same provider with only slight variations to the configuration, then you can save time and effort by setting up a single Test Template with a generic script and custom Macros. You can then set up your tests based on this Template and populate the Macros with values specific to each Test.
Creating a Script Template
- Navigate to Control Center in the main menu
and select Library > Script Templates, or you may navigate toTests (the same configuration wizard can be accessed from either location.) - Click New
- Select Library and then, under Script Template, click the test type that you want to create a Script Template for (Transaction, API, or Custom.)
- Complete the Basic Properties section:
Basic Properties | |
|---|---|
| Name | A name used to identify this script template. |
| Description | Optional additional information about the script template |
| Version | A version number for this script template. |
| Icon | An image file to represent the script template in the portal UI |
| Status | The current status of this script template:
|
| Deprecation Date | Optional date when this script template's status will automatically be set to "Deprecated." |
| Parent Test Type | The type of test that may be created using this template. (Transaction, API, or Custom) |
| Application Group | The name of the application to categorize this template under (Used to filter templates when setting up tests.) |
| Test Monitors (Transaction test type only) | The specific Transaction Test monitor(s) for which this Template will be available. (Emulated, Mobile, IE, and/or Chrome) |
| Require Authentication | Determines whether authentication settings will be required when configuring tests using this template. |
| Language Type (API Test Type Only) | The language used in the generic API Test Script. (Selenium or Javascript) |
| Script | The generic script that Tests based on this template will use. (For Custom Test, this field is "Script Filename" and is configured with the path to a script file.) |
Template Fields
Template Fields are fields that you can configure with different values for each Test that you base on this template. Each template field auto-generates a macro which you can reference in the template script. Each Test will replace this macro with the value you enter in that Test's configuration (or use the Default Value, if set.)
For example, suppose you are configuring a Transaction Test Template, and you intend to use the template as the basis for several different Test configurations, each targeting a different URL. In that case you might create a Template Field called "Target_URL".

You would then reference the Macro Name using a dollar sign ($) and curly brackets {} in your template script, as in this example:
// Step - 1
open("${Template_target_url}")
setStepName("Step 1 - open the website")
Later, when configuring a test based on this template, you can input any URL in the Target_URL field, and that particular test will open the specified URL at runtime.