Setting test data
In the workflow editor, go to Settings > Test Data. A Test Data tab will appear in the editor, and you’ll be able to type or paste a test data JSON that the agent can use to write scripts in editor mode.How the agent uses test data and variables
In the editor, you’ll see adata/variables.json file. When using the editor, this file contains the test data you give it in Settings > Test Data. In production, this file contains the variables JSON you pass to it when running a workflow.
Let’s say you set the test data to be the following JSON:
data/variables.json
scratch_work/fill_search_bar_and_submit.py
Advantages of using a variables file
Since the agent writes python code, it can manipulate variables before using them. A simple example is when a form requires separate first and last name fields, but the data source you’re setting variables from (e.g., your internal database) only returns a full name:scratch_work/fill_name_fields.py
Productionizing variables
When the productionize agent runs, it will use the test data format to create the Variables schema (found in Settings > Variables). You can further edit the Variables schema manually as needed.Variables as feature flags
One way you can use variables is to treat them like feature flags. You’ll likely need to be testing web automations on live portals, and often won’t want to do form submissions during test time. Given the following test data:data/variables.json
scratch_work/submit.py
