Storing generated values as temporary test data
Learn how to store values generated during a test run as temporary test data (i.e. variables)
Overview
Not all test data can be defined ahead of time. Some pieces of data are generated during a test run (e.g., an invoice number generated from an order that needs to be validated in a backend system).
Use a store action to save these values that are generated as part of your test run so that you can either validate that they appear later in the test flow or you can use them as input for later actions like fill or type.
How it works
-
Create a store action
-
Select the store action type
-
Take a screenshot of the area of the page that contains the dynamic value
iii. Set a mask over the dynamic value that you wish to store and reference later in your test. This is the value that will change each time the test is previewed or run.
-
iv. Optional: Rename your temporary test data.
-
-
Reference the stored test data later in your test by using the same test data input that you’d use for non-temporary test data.
FAQ
-
Can I preview tests temporary test data?
- Yes, just be sure to only preview steps that reference your temporary variable after you’ve previewed the step that stores a value.
-
Can I see which values have been stored already while writing or previewing my test?
- Yes, you can see any saved values in the header above the virtual machine
-
Can I override the stored value?
- Yes. If you include multiple store actions in the same test with the same name for test data you created within an earlier stored action, your value will be overridden.
Updated about 1 month ago