Menu

Reusing Test Cases

Overview of Test Case Sharing

qTest Manager provides many opportunities to maximize efficiency in test management.  Testers can reuse test cases in a variety of different ways to save time and make it easier to maintain information over time.  Here is a summary of the different options.

  1. Calling Test Cases: Also known as "shared steps" or "embedded tests" in which you can reuse existing test cases within one another.
  2. 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).
  3. Copying Test Cases: A one-time copy and paste of test case(s) or folder(s) of test cases.  A test case can be pasted into the same project or another project.
  4. Moving Test Cases: Cut and paste or drag and drop test case(s) or folder(s) of test cases (within the same project).
  5. 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.  A called test case is a test case that will 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 functionality can be beneficial for two reasons, as follows.

  1. Saves time - Instead of entering the steps in every test case that calls it, the common steps are entered into a single test case.  
  2. Maintains consistency - If a called test case must be updated, instead of changing the test case in each test case that calls it, you can update the called test case in a single place.  As a result, all other test cases that call it will have the updated information.   

In this example, we will show how to create a login process test case and then call it in another test case.

  1. Select the Test Design module.  
  2. Create a new test case or open an existing test case.  In this example, we will open the test case entitled Test Number of Girl Scout Cookie Boxes.  This test case will call the Login Process test case.  
  3. Place your cursor in the test step you wish to insert the Login Process test case and then click the Test Cases icon on the far right side of the step.  



  4. The Test Cases page is displayed.  Select the test case you want to insert.  Then, click the Add button.


     

  5. The Call Test Case page is displayed.  Click the Approve button to insert the selected test case into this test case.  



    H
    INT: If you look at the step that contains the inserted test case, you can click the hyperlink to display the inserted test case.

    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.

HINTS: 

  • 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

  1. Select consecutive or non-consecutive test steps in a test case to copy.
  2. Right-click on the selected test steps and click the Copy option.
  3. 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

  1. Select consecutive or non-consecutive test steps in a test case to copy.
  2. Right-click on the selected test steps and click the Copy option.  
  3. Right-click on the destination row of different test cases in the same or a different project and select the Paste option.  The copied test steps will be inserted below the selected row in the order of the selected test steps.

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 case(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. 

  1. Select the project from which you will copy a test case.
  2. Select the Test Design object.  The Test Design page is displayed.
  3. In the left panel, select the test case that you will copy into another project.  Then, click the right mouse button and select the Copy option from the drop-down menu.



  4. If you wish to paste the test case into another project, select the project and then select the Test Design object. 
  5. In the left panel, select the folder into which you will copy the test case.  Then, click the right mouse button and select the Paste option from the drop-down menu.  The test case is copied into this project.  If changes are made to the test case at a later date, the copied test case will not inherit these changes.

    HI
    NT:  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

To move test cases (also known as cut/paste or drag/drop), you need to Create/Edit Test Cases permissions.  This function allows you to move the 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.

Cut / Paste test cases using Context Menu

  1. On the left navigation panel of the Test Design module, select one or multiple test cases.  You can use SHIFT or CTRL to select multiple test cases.
  2. Right-click and select the Cut option from the drop-down menu.
  3. Select a destination (e.g., root or a folder), right-click, and select the Paste option.  The selected test cases will be moved to the destination.

Move Modules using Drag & Drop function

  1. On the left navigation of the Test Design tree, click to select one or multiple test case(s) or folder(s) to move.  You can use SHIFT or CTRL to select multiple test cases.
  2. Drag the selected objects and then drop to the destination (e.g., root or a folder) to move.

HINTS:

  • 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 to Another Project

Another way to use test cases from another project is by sharing a test case for the purpose of test execution.  This functionality is used to create a test run in one project using a test case shared by another project.   

Note the 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 originating 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 originating project.  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

  1. Select the project where the test case originates.  Click the Gear icon to select the Test Case Settings option from the drop-down menu.  The Test Case Settings screen is displayed.  



    H
    INT: Test case settings are made on a per project basis.  

  2. 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.  


  3. Select the checkbox ‘Share this project’s Test Cases with other projects.’ In the Projects area of the screen (located under the checkboxes), select the project you want to borrow this project’s test cases.  To do so, select the ‘Shared’ checkbox for that project.  



  4. Click the Save button.  The Confirmation pop-up is displayed.  Click the Refresh button to refresh your browser so the changes take effect.



  5. Select the project with which you will share test cases and click the Gear icon to select the Test Case Settings option from the Project Settings drop-down menu.  The Test Case Settings screen is displayed.  
  6. 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. 
  7. Select the check box that reads ‘Enable users to use test cases from other projects'.



  8. Click the Save button.  The Confirmation screen is displayed.  Click the Refresh button.  
  9. Go to the project where the test case that you will share originates.  Click the Test Design module.  
  10. From the left 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

Share Test Cases or Folders of Test Cases

Go to the test case you wish to share to another project.  Then, select the check box to share/unshare the Test Case.  If you don't see the Shared checkbox, make sure the Test Case Sharing settings have been properly turned on.

 

IMPORTANT:

  • 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.

Similarly, you can share a folder of test cases in the same way.

 

HINTS:

  • 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.

 

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

Subscribe To Our Blog
Powered by Zendesk