- Release Notes
- Getting Started
- Setup and Configuration
- Automation Projects
- Dependencies
- Types of Workflows
- File Comparison
- Automation Best Practices
- Source Control Integration
- Debugging
- The Diagnostic Tool
- Variables
- Arguments
- Imported Namespaces
- Trigger-based Attended Automation
- Recording
- UI Elements
- Control Flow
- Selectors
- Object Repository
- Data Scraping
- Image and Text Automation
- Automating Citrix Technologies
- RDP Automation
- Salesforce Automation
- SAP Automation
- VMware Horizon Automation
- Logging
- The ScreenScrapeJavaSupport Tool
- The WebDriver Protocol
- Test Suite - Studio
- Extensions
- Troubleshooting
- About troubleshooting
- Microsoft App-V support and limitations
- Internet Explorer X64 troubleshooting
- Microsoft Office issues
- Identifying UI elements in PDF with Accessibility options
- Repairing Active Accessibility support
- Automating Applications Running Under a Different Windows User
- Validation of large Windows-legacy projects takes longer than expected
Test Case Templates
Use test case templates as base models for your test cases. For example, you can create a template with data variations to be reused on different tests. You can create test case templates for Test Automation projects, including other file types such as Global Exception Handler. For other projects (e.g., Process), you can create workflow templates.
- The templates are specific to the project type and the language that is used to create it.
- The templates cannot be converted to workflows, compiled, or published.
-
You can make use of reusable content by creating a library with test case templates. Test data variation is not exported to the library alongside the test case template.
Important: The resources referenced in the template will not be copied locally to the project where you are trying to import the library. The template should not contain references to other assets, such as workflows within the library.
When you add a new file, you can choose a template on which to base it. The templates that you can choose from vary depending on the type of file you are adding (workflow or test case) and on whether you have previously added templates to your project Templates folder.
Choose Empty Test Case when you create a test case if you want to add a Placeholder activity that you want to invoke at a later stage.
BDD stands for Behavioural-Driven Development. Choose BDD Test Case when you create a test case to structure your test around Given-When-Then containers.
The local templates are created in the Templates folder of the project when you extract a file as template and when you add a template to the Templates folder. Local file templates are available only inside the project where you create, or extract them.
You can create local templates of three types: execution template, workflow template, and test case template. When you extract a file as a template, the template type is applied automatically based on the type of file you extract (workflow or test case). When you manually add a template to the Templates folder, you select the type of template to create.
Test with timeout
The Test With Timeout template is available only with the Testing activity package, version 22.10 or higher. Choose Test With Timeout when you create a test case if you want to use a timeout or to take screenshots when a verification fails.
The template is configured to throw a time-based exception, taking a screenshot of the failure that occurred in your workflow.
- If you set the
takeScreenshotOnException
Boolean variable tofalse
make sure to modify theTimeout Message
property of theTimeoutScope
activity. - You can modify the timeout in the
duration
variable. The default is set to five (5) minutes. - You can keep screenshots on your machine by configuring Testing Project Settings.
You can use the contextual menu in the Project panel to manually add execution, and test case templates based on other templates to your project. After you add a template, you can edit it in the Designer, and then use it as a starting point for creating other files.
-
To add a test case template, right-click the Templates folder, and then select Add > Test Case Template. Follow the test case creation process to configure the template.
-
To add an execution template, right-click the Templates folder, and then select Add > Execution Template.
- Open your workflow in Studio.
-
In the Project panel, right-click a test case and select Extract as template.
You test case is now stored in Project > Templates. You can copy and paste or move it back to your testing folder.
- You can create templates directly from the Templates folder for your test cases and workflows.
- You can use the contextual menu within the Templates folder to perform various actions, such as comparing files.
You can create test case templates in libraries the same way you create them in processes. After you publish the library, the templates marked as public are available as package file templates in projects where the library is installed.
- Create a Testing project.
- Build whatever test case you would like to use as a template.
-
When you finish building the test case, right-click it, and select Extract as Template.
Name the template, choose the Templates folder as the location to store it in, and select Create. For this example, the name of the template is MyFirstTestCaseTemplate.
-
Go to the Design tab, in the File group, select New > Test Case. The New Test Case window is displayed.
- Give it an appropriate name, and select the template that you previously created from the Template dropdown list. For this example, choose MyFirstTestCaseTemplate.
To remove a template, expand the Templates folder in the Project panel, right-click the template, and then select Delete.