Testers can reuse test cases in a variety of different ways to both save time and make it easier to maintain information over time. Below is a summary of the different options:
- Calling Test Cases: Also known as "shared steps" or "embedded tests" in which you can reuse existing test cases within one another.
- Copying Test Steps: A one-time copy and paste of test steps. You can copy steps into the same test case or another test case (within the same project).
- Copying Test Cases: A one-time copy and paste of Test Cases or folder(s) of Tests. A test case can be pasted into the same project or another project.
- Moving Test Cases: Cut and paste or drag and drop test case(s) or folder(s) of test cases (within the same project).
- Sharing Test Cases: Manage a centralized repository of test cases in the Test Design module of one project and create test runs in the Test Execution module of a different project.
Calling Test Cases
qTest Manager allows you to insert one test case into another test case. This is known as calling a Test Case. Users call Test Cases so that the Test Case can be used in numerous other tests within the same project. A classic example is a test case to log into an application.
The calling test case function is beneficial for the following reasons:
- Saves time: Instead of entering the steps in every test case that calls upon the Called Test Case, the common steps are entered into a single test case.
- Maintains consistency: If a called test case must be updated, you can update the called test case in a single place. As a result, all other test cases that call upon that Called Test Case will have the updated information.
Create a Login Process Called Test Case
Note: A Called Test Case does not have to be associated with a Log-in process. This is just an example.
- Select Test Design.
- Select the Test Case in which you want to make your Login Process Called Test Case.
- In the "Test Steps" section of the page, select the Test Steps that you want to associate with your Called Test Case.
- Under the Action column (the Wrench icon), select the Test Case icon.
- The "Test Cases" dialog displays. Select the Test Case you want to insert. Select Add.
Note: A Test Case cannot Call upon itself.
HINT: If you look at the step that contains the inserted test case, you can click the hyperlink to display the inserted test case.
Hint: The individual steps for the called test case are not displayed on this page in the Test Design module. When you add a test run in the Test Execution module and click the Run button, the individual steps of the called test case are displayed in the TestPad as well as the steps of the actual test case.
- Called test cases can be copied to the same or different test cases in a project, but NOT across projects.
- A test case cannot call itself either directly or indirectly.
- Only Approved test cases can be called by another test case.
- A test case can call the same test case in different test steps.
Copying Test Steps
qTest Manager allows you to copy and paste test steps within the same test case or to different test cases.
Copy / Paste test steps within the same test case:
- Select consecutive or non-consecutive Test Steps in a Test Case.
- Right-click on the selected test steps and click the Copy option.
- Right-click on the destination row in the same test case and select the Paste option. The copied test steps will be inserted below the selected row in the order of the selected test steps.
Copy / Paste test steps to different test cases
- Select consecutive or non-consecutive Test Steps in a Test Case.
- Right-click on the selected test steps and select Copy.
- In the Navigation Panel, select a different Test Case in which you want to Paste your Test Steps.
- In the "Test Steps" section of the Test Case, right-click in the destination row. Select the Paste option. The copied Test Steps will be inserted below the selected row in the order in which the Test Steps had been selected.
Copying Test Cases
Test Case(s) or folder(s) of Test Cases can be copied into the same project or another project. This function works as a one-time copy so that the duplicate sets of Test Cases(s) act independently going forward. In other words, after the copy and paste, any changes performed on the Original Test Case will not be reflected in the Test Case's Copy.
To copy a test case from one project to another project, perform the following steps:
- Select the project from which you will copy a Test Case.
- Select the Test Design. The Test Design page is displayed.
- In the left Navigation panel, select the Test Case that you want to Copy.
- Right-click, and select Copy.
- If you wish to paste the test case into another project, select the different project.
- Select Test Design.
- In the left Navigation panel, select the folder into which you will copy the Test Case. Right-click, and select Paste.
Note: If changes are made to the test case at a later date, the copied test case will not inherit these changes.
HINT: You can also copy a folder of test cases in one project into another project. In this instance, you would select the applicable project, then select the folder in the left panel, choose the Copy option from the drop-down menu, select the project into which you will copy the folder of test cases, select the Test Design object, and paste the test cases into a folder in the project.
Moving Test Cases
This function allows you to move a Test Case to another folder within the same project. This can be accomplished by using the right-click Context Menu or by using the Drag & Drop function.
Note: To move test cases, you need Create/Edit Test Cases permissions.
Cut/Paste test cases using Context Menu
- In Test Design, select one or multiple test cases from the left navigation panel. You can use SHIFT or CTRL to select multiple test cases.
- Right-click and select Cut.
- Select a destination (e.g., root or a folder), right-click, and select Paste.
Move Test Cases using Drag & Drop function
- In Test Design, select the Test Cases that you want to move in the navigation panel.
Hint: You can select individual Test Cases, multiple Test Cases, or Modules containing Multiple Test Cases. To select multiple objects, hold down the SHIFT or CTRL key, and select objects.
- Drag the selected objects, and drop them in the destination (e.g., root or a folder).
- All sub-modules or objects under copied/moved modules will also be copied/moved.
- You can reorder the structure of the module using the Drag & Drop nesting function to move modules to any position beyond root and modules.
- If you copy or move a parent module with its sub-modules to the root, all belonging sub-modules will be copied or moved to the same level as the parent module.
Sharing Test Cases With Another Project
Another way to use Test Cases from another project is by sharing a Test Case for test execution. This function is used to create a test run in one project using a test case shared by another project.
Note: There is a difference between copying a Test Case and sharing a Test Case. When a Test Case is copied, the result is two Test Cases, one in the original project and a second test case in the project where it is copied. When a test case is shared, there is one test case, and it resides in the original project while also affecting the project with which it is shared. The benefit of sharing a test case is that any updates made to the test case after it is shared are inherited by the project where the test case resides as well as by the project that has borrowed the test case.
To share a Test Case in one project with another project, perform the following steps:
Activate Test Case Sharing
- Select the project where the test case originates. Select the Gear icon.
- Select the Test Case Settings option from the drop-down menu. The Test Case Settings screen displays.
HINT: Test case settings are made on a per-project basis.
- Refer to the "Test Case Sharing" area of the screen. Then, click the Activation Status button located on the right side of the screen to turn activation status ON.
- Select the boxes associated with "Activation Status," "Enable Users to use Test Cases from other projects," and "Share this project’s Test Cases with other projects."
- In the "Projects" field, select the project you want to borrow this project’s test Case(s).
- Click the Save button. The Confirmation dialog displays. Select Refresh.
- Select Save.
Share Test Cases
- Select the project where the test case that you will share originates. Select Test Design.
- From the left navigation panel, either select a Test Case or a Folder of Test Cases you will share. The ‘Shared’ checkbox, located in the top of the Properties area of the screen, is checked indicating this test case (or folder of test cases) can be shared with other projects.
NEXT STEPS: See the article Add Test Run using Test Case from Another Project
- A shared Test Case needs to be approved at least once so that other projects' users can create Test Runs from it.
- When a Test Case is unshared, its associated Test Runs in other projects will become read-only and unexecutable.
- When you share a module, its sub-modules are automatically shared. If you are granted Edit Test Cases permission, the existing Test Case under the module is also shared.
- When you create a new test case or a sub-module under a shared test case, it is shared by default and you can unshare it.
- When you copy/move modules or test cases into a shared module, the system will ask if you want to share them.
- When you unshare a module, the system will ask if you want to automatically unshare its sub-modules and test cases. If you are not granted with Edit Test Cases permission, the test cases will not be unshared.
- When a test case is unshared, its associated test runs in other projects will become read-only and unexecutable.
- If a run has been created off of a shared test case, it cannot be edited via Test Pad. We do not allow to edit shared Test Cases. Test Cases are shared for execution only. The limitation is that the system cannot check user permission across projects while editing Test Cases in TestPad.
Add Test Runs using Test Case from Another Project
The steps needed to setup this functionality are now complete. Once you have shared a test case, you can use the shared test case when you add a test run. See Add Test Run using Test Case from Another Project.