This script allows you to skip scripts that are causing an Automated Test Run (ATR) to fail, so that you can generate ATR test data for your study.
Example
A common example of the ATR failing would be for questions that have specific validation requirements such as email address or postal/zip code, which are sometimes implemented using scripting. These scripts will hide questions and scripts that have the potential to cause the ATR to fail; this will allow you to generate your ATR data.
When running ATR without skipping some scripts, you would receive the ATR error:
"The study has some validations on workflow step "Question Name" 1: Please enter one response only."
Detailed Steps
To prevent scripts from running during an ATR, follow these steps:
- Copy and paste the script below into Notepad or a similar text editing tool.
- Copy and paste the script(s) that needs to be hidden from the ATR into the script in Notepad:
- From the Surveys app, open the power survey and go to Power Survey Authoring.
- Click the Questionnaire tab of your study.
- Navigate to the question that contains the script in the Questionnaire tree.
- In the Scripting section of the question, click Edit Scripts.
- Copy the script(s) that need to be hidden from the ATR.
- Paste the script(s) that need to be hidden from the ATR into the script in Notepad so that it replaces the text: “//YOUR SCRIPT GOES HERE”
- Save the completed script in Notepad.
- Navigate to the location of the script in the Questionnaire tree.
- Copy and paste the completed script back into its original location. Example: On Load or On Validate section of a question.
- Click Save.
- Click Validate.
Script
/* Script Name: How to prevent scripts from running in an Automated Test Run (ATR)? To ensure your script works as expected, always copy the original script from the script library found in the support portal. Failure to use the most up to date script from the script library may cause unexpected results. */ // Prevents script from running during an ATR. if ( !IsATR){ // YOUR SCRIPT GOES HERE }
More Information
Read this WebHelp article to learn more about Testing Your Study.
Comments
0 comments
Article is closed for comments.