Skip to main content

Other Test Components

Here are some other components that you can add to a test using the Composer. To access them, go to a Project > Test > Compose (aka Composer) > Click Add component (+ icon) in the Composer toolbar.

Other Components

What You'll Need#


The Tag component within the Composer enables you to dynamically tag the resulting document of a test execution. You can add different tags based on dynamic events happening during the test execution, such as a certain value retrieved in the payload. You can assign multiple tags to each test by adding more 'tag' components to it.

This is different from the tags applied when you first create the test. That feature enables you to search for that tag(s) filter in your Project Tests tab or Dashboard tab.




Here's an example of how you could use a tag in the Compose tab.


You can also add tags to the test details screen when you create or edit a test.
Tag Component - create new test

Static tags will be displayed in your Tests list.
Tests tag.jpg

All tags, dynamic and static will mark the test execution documents. On your project Dashboard, you can filter events by tags.

Set (Variable)#

Allows you to set a variable for future uses in the test. For example, you can save a value retrieved from the response and use it in a subsequent call.



Variable mode


Value (depends on ā€˜Variable mode = stringā€™)


Data (depends on ā€˜Variable mode = dataā€™)


Lang (depends on ā€˜Variable mode = languageā€™)


Content (depends on ā€˜Variable mode = languageā€™)



Set var
Var: artistIdVariable mode: StringValue:
Set var
Var: sobjectsVariable mode: DataData: payload.findAll { == ā€˜bananasā€™}
Set var
Var: queriesVariable mode: LanguageLang: JavaScriptContent: if (>100) return ā€˜furnitureā€™


This component allows you to parse a string into structured data, using one of the available parsers.



The name of the variable you want to parse.


| REQUIRED | json, xml, etc. |

The parser to use

Parse component UI


I have set a variable (which will be a plain string), in this case I have a list of colors.

Parse component variable

Next, we can use the comment component to see what happens if I print ā€œcolors[1]ā€ before and after parsing it into JSON.

Parse component test

Here are the results of the above test:

Parse component test

As you can see before parsing the string, the test will consider the variable colors as one big string so colors[1] will print ā€œ as that is the second character in the string. After parsing the string into JSON we can traverse through the variable as a JSON, so colors[1] will print the second element in the JSON array blue.


This assertion allows you to print out (in test reports) information. It can have two sorts of values, as described below.


There are no parameters -- text only.


The first is a normal string value. An example of that would be to explain what a specific WHEN loop is being used for. Similar to when you write comments in code.

This is a comment

The second is useful for test debugging and analysis. You can pass variables into the comments. An example use of this would be to print out the product ID being used in the current loop of a test.

The value of the ID is ${}


This component allows you to pause or stop a test entirely.


| REQUIRED | 'stop', 'wait' |

This parameter defines the action you want to take. 'Stop' will stop the test. 'Wait' will pause the test for a number of milliseconds defined in the 'Value' parameter.



Depends on 'Command = wait'. The number of milliseconds you want to pause the test for.


This component is especially useful when combined with the If component. See the examples below:


If the statusCode is not 200, the test will be halt; none of theĀ remaining assertions will be checked.


In this example, the test will wait 1000 milliseconds before performing the GET request.


The Fact component enables you to add information (facts) about the nature of the test execution, along with static or dynamic data. It's used to control the behavior of Email notifications, which (if enabled) alert you to test failures.

Test activity is tracked using test ID number. This may not work if you're testing in multiple environments (i.e., production, staging, QA), as an incident could be environment-specific. When a Fact component is added to a test, it will inform our system which environment the execution relates to so that the incident signature will carry the environment as well.



Should be unique within the test.



To provide an understanding of the Fact.



String value that supports the template language (i.e., ${...}).


The Fact component should be set as high up in the test as possible. If the test fails before it reaches the Fact, then it will not be set.

Examples/Uses Cases

Setting Alert Environments#

Assume that in the variable scope of your test, you have a variable called env that contains your environment string (production, staging, qa etc.).

By configuring a Fact in the following way, you can add the environment value to the incident signature:

Fact id: environment  label: The current environment  value: ${env}

From this moment on, the signature of the incident will be id_of_the_test + value_of_environment.

For example, you will receive start/end incidents for test123 in the production environment, and start/end incidents for test123 in the staging environment, as separate flow of events.

You can use anything as a value of the environment, such as domain names and IDs.

Disabling Email Notifications#

A second use case is disabling email notifications for the test from within the test:

Fact id: disable_alerts   label: whatever you want here   value: true

You can use logic within the test to set the Fact component and use that to alter the email notification.

As an example, you could say "IF the env is development, then disable emails for this test":


Setting Email Notification Thresholds#

Another use-case of the fact component is set an email alert threshold. If you want a test to fail more than once before an email is sent, a Fact called mail_threshold can be set in the test:


This means the test will need to fail twice in a row before an email alert is sent.

Given that this can be configured within the test, it offers all the flexibility provided by conditional statements, such as an IF condition on the environment the test is running upon:


K/V Store#

The Key/Value store allows you to create temporary key/value pairs that can be accessed across different tests. The Key/Value store is accessed via the Key/Value Store Component.


These Key/Value pairs are temporary. They expire after 24 hours has elapsed since the last update to the value itself.


The Key/Value Store component has four methods available for use:

  • Set: creates a new key/value pair in the Key/Value store. The value is entered in the Object field.
  • Load: recalls a value from the Key/Value store when provided with a key.
  • Push: adds a value to the end of an existent value of the datatype "Array" in the Key/Value store. If no such key exists, it will create a new array containing the passed in value.Ā  The passed in value is entered in the Object field.
  • Pop: removes a value from the end of an existent value of the datatype "Array" in the Key/Value store.

Basic Workflow#

Let's take a look at how this workflow works in a practical setting. The first example will be a simple set and retrieve of a value in the Key/Value Store.

  1. First, we'll make a GET request to an endpoint.
  2. Next, we'll add a K/V Store component.
  3. This first K/V Store component (we're going to incorporate several) is going to set the Key/Value pair in the Store, so we're going to use Set.
  4. In this case, we're setting the Key "prods" equal to products\[0\].name, which in this case evaluates to "Baseball Cap."
  5. Next, we're going to retrieve this Key/Value pair from the store with the Load method. In the K/V Store Load component, we're going to assign the retrieved value to the variable kvprods.
  6. Finally, we'll add in a Comment component to ensure that the data was recovered successfully.
  7. When we run the test, we're presented with the following result:


Push/Pop Workflow#

Next, we're going to take a look at how Push and Pop work. Push and Pop are both array methods and behave as they normally do outside of this context. Push will append a value to the end of an array. Pop will remove the last value in an array.

First, we're going to use Push. It should be noted that Pop works similarly but with the opposite result. Pop also assigns the removed value to a variable which can be used in the context of the test, but can no longer be accessed from the Key/Value Store. We'll discuss this further when we take a look at Pop.

  1. First, we're going to send a GET request and assign a key in the Key/Value Store to a value from the response body. In this case, we're going to use "Color," which is an array.
  2. Next, we're going to Load and Comment this key. We're doing that so we can actually see the change on the test report at the end of this workflow.
  3. The next step is to Push the new data on to the end of the existing array. In this case, we're pushing the integer 999 onto the prods array.
  4. Finally, we're going to Load the modified data into the test from the K/V Store.
  5. When we run the test, we're presented with the following test report.

The comments show us clearly that we have pushed the number 999 onto the array stored in the key prods.

Now, we've added something to the array. Let's remove it with Pop!

  1. The first step is to introduce a Pop K/V Store component.

    We provide the Pop component with the name of the key from the Key/Value Store, and the name of the variable we'd like to assign the popped value to. Remember, Pop removes the last value in an array and returns the value itself. In this case, we're going to assign it to a variable called "Popped."

  2. Next, we're going to recall the modified key from the Key/Value Store. Then, we're going to Comment both the recalled Key/Value Store value AND the previously popped value.

  3. Review the Test Report, where you can see the full workflow, showing that we first assigned an array to the Key/Value Store with Set, then added to that array with Push, and then removed the added value with Pop. Each time we made a change, we used Load to retrieve an updated value from the Key/Value Store.

The last two comments show the final state of the array in the Key/Value Store and the popped value itself. The popped value will only be available within the scope of this test run. The array in the Key/Value Store will remain retrievable and until 24 hours after it'sĀ most recent modification.


Use "Set," "Push," and "Pop" to reset the timer. "Load" does not reset the timer.