Test your automations
Table of Contents
A guide to practice testing your automations and become familiar with the automation's behaviour. In order to complete this tutorial, you must have at least one existing automation. If you don't have an automation, try creating one!
Review your automations
First, it is important to review your automation in the Automation Overview, taking special note of the conditions that must be satisfied when the event occurs. Once you have done so and know the procedure you must follow to trigger your automation, continue to test your automation.
If you are unsure how to determine the correct procedure, view the four examples below to get an idea. Examples will be provided based on the the event and the action associated with it. General conditions will be assigned to each case to exemplify how conditions fit within the layout of automations.
Note: For each example, it is ideal to check the audit trail as well to ensure that all of your actions are being properly recorded.
Example 1. When I update a field, add a query
Event: Field Value Updated.
Example condition: Study field value "weight" is greater than 120 kg.
Action: Add open query with the question "Are you sure?".
Testing forms:
- Navigate to the Participant tab.
- Either create a new test participant via the "Create a new participant" button or access a test participant.
- In data-entry, find the field "weight". Specify the answer to be greater than 120 kg (eg. 130 kg).
- Now, either wait a few seconds, or refresh the form containing the target field by navigating away from it, then returning to it.
- An open query appears on the "Weight" field. When you click on it, you can see the message "Are you sure?" appearing. This can also be viewed in the Monitoring tab.
Example 2. When I update a field, show/hide form
Event: Field Value Updated.
Example condition: Study field value "Can patient participate in the study" is equal to "No".
Action: Hide form "Measurements".
Note 1: This example uses a calculation field, meaning the fields used in the calculation must make the calculation equal the desired value.
Note 2: If you delete this automation, any form you have hidden using this automation will reappear.
Testing forms:
- Navigate to the Participants tab.
- Either create a new test participant via the "Create a new participant" button or access a test participant.
- In data-entry, find the field "Can patient participate in the study". Specify the answer no by:
- Set "Does the patient have example disease?" to "Yes".
- Set "Is patient older than 65" to "No".
- Set "Has the patient signed informed consent?" to "Yes".
- If you look at the form navigator, something should have changed. First, notice that the Measurements form has disappeared. Furthermore, the progress bar for the participant should adapt to reflect the smaller number of questions.
Example 3. When I update a field, show/hide visit
Event: Field Value Updated.
Action: Hide visit "Visit 1".
Example condition: Study field value "Can patient participate in the study" is equal to "No".
Note: This example uses a calculation field, meaning the fields used in the calculation must make the calculation equal the desired value.
Testing forms:
- Navigate to the Participants tab.
- Either create a new test participant via the "Create a new participant" button or access a test participant.
- In data-entry, find the field "Can patient participate in the study". Specify the answers:
- Set "Does the patient have example disease?" to "Yes".
- Set "Is patient older than 65" to "No".
- Set "Has the patient signed informed consent?" to "Yes".
- Viewing the form navigator, something should have changed. First, notice that the Visit 1 visit has disappeared. Furthermore, the Progress bar for the participant should adapt to reflect the smaller number of questions.
- Note: If you delete this automation, any visit you have hidden using this automation will reappear.
Example 4. When I add an email address to a participant, create and send survey package
Event: Email Address Added To Participant.
Example condition: Study field value "patient gender" is Male AND study field value "patient height" is greater than 1.95 meters.
Action: Create and send survey package "Survey for male participants taller than 1.95 meters"
Note 1: This example contains TWO conditions. Both conditions must be satisfied before the event tries to trigger the action.
Note 2: Currently this automation only works with newly added email addresses, meaning it will not trigger the automation when a participant with an existing email address gets an updated email address.
Testing forms:
- Navigate to the Participants tab.
- Either create a new test participant via the "Create a new participant" button or access a test participant that does not yet contain an email address.
- In data-entry, find the field "patient gender". Specify the patient is "Male" using the radio buttons.
- In data-entry, find the field "patient height". Specify the height as being greater than 1.95m (e.g. 1.96).
- Back in the Participants tab, click on the cogwheel for the participant you just edited. Select "Update email address" and fill in a test email address (e.g. your own).
- Navigate to either the Surveys tab in study management or the Surveys tab in the participant's data-entry view.
- Your specified survey should appear, planned or sent on the dates specified.
The above can also be done via importing (either importing email addresses or importing participants with conditions met and email addresses attached to them). This should be only tested with 2-3 participants to begin. As you become more comfortable with using you automation, you may begin using it in your live study!