Reuse test cases
If you have a test case that covers a scenario you need to test, you can reuse some or all of this test case in another test case. This helps you save time and streamlines your resources.
Here's all the ways you can reuse test cases:
-
Call test cases: Reuse a test case as a step in a different test case.
-
Copy test steps: Copy and paste test steps into the same test case, a different test case in the same project, or a different test case in a different project.
-
Copy test cases: Copy and paste test cases or modules of test cases. You can paste them into the same project or another project.
-
Move test cases: Move test cases or modules of test cases to another location within the same project.
-
Share test cases with another project: Manage a central repository of test cases in Test design in one project and create test runs in Test execution in a different project.
You can't perform any of these actions on test cases that are linked to objects in Tosca.
Before you start
To reuse test cases, you need the Create Test Cases and Edit Test Cases permissions.
Call test cases
You can insert a test case into another test case within the same project. This is called "calling a test case".
For example, you can create a test case that signs in to your application and then call it from all test cases that require these sign-in steps. If the sign-in process changes, you only need to update the called test case. This helps you keep tests consistent and reduces maintenance effort.
To call a test case, follow these steps:
-
Go to Test Design and select the test case from which you want to call another test case.
-
In the Test Steps section, go to an existing test step or create a new test step.
-
Select
Action, and then select Test Cases. -
Select the test case you want to call, and then select Add. Note that you can't call a test case from itself, and you can't call unapproved test cases. However, you can call the same test case in different test steps.
In Test Design, the test step displays a link to the called test case but not its individual steps. In Test Execution, the TestPad displays the individual test steps of the called test case, along with the regular test steps.
Copy test steps
You can copy test steps within the same test case or to another test case, even in a different project. Note that changes to the original test steps don't affect the copied steps. To keep test steps current to an original copy, you need to call a test case instead.
To copy test steps, use Copy and Paste in the context menu of a test step.
Copy test cases
You can copy test cases or modules of test cases to the same project or another project. Note that changes to the original test cases don't affect the copied test cases.
To copy test cases, use Copy and Paste in the context menu of a test case or module. Refresh your browser to view the newly pasted items in the tree panel.
Move test cases
You can move a test case or modules of test cases to another location within the same project. This allows you to reorganize test cases according to your needs, without duplicating them.
To move test cases, use Cut and Paste in the context menu of a test case or module, or click and drag them to your desired destination in the tree panel.
When you move a module, it stays in its original structure and any objects it contains, including sub-modules, move with it. You can move test cases to another module or to the project root. If you move a parent module with its sub-modules to the root, the sub-modules move to the same level as the parent module.
What's next
Need even more test case reusability? Learn how to Share test cases with another project, so you can use test cases in multiple projects but manage them in one.