Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

How do you modify a test case that has been used as a call in for other tests? In other words, if I have a test case that I want to modify or delete, how can I tell if it has been used as a call in for another test?

share|improve this question
    
Well .. one way is to delete the test case and run the rest of the test cases. Depending on the IDE you are using, you may be able to trace a method call. –  Suchit Parikh Nov 25 '13 at 18:25

2 Answers 2

Since you tagged this question with Quality-Center I am going to assume that you mean a Call to Test as in the example test case below which has several steps that are calls to other Tests.

enter image description here

There is no straight forward way to do this. However, you have either access to the database or a version of Quality Center which has the Dashboard you can query the data you are looking for. Just as an FYI in QC 9.2 and before the Dashboard was an add-on that needed to be purchased separately. As of HP ALM 11 it is included in the product. I'm not sure about in between.

So to answer your question:

If I have a test case that I want to modify or delete, how can I tell if it has been used as a call in for another test

Go into the Dashboard Analysis View and Add a New Item [New Excel Report].

HP ALM Dashboard

and insert the following query:

SELECT TS_TEST_ID, TS_NAME, DS_DESCRIPTION     
  FROM [td].[DESSTEPS] 
  JOIN [td].TEST 
  ON DS_TEST_ID = TS_TEST_ID
  WHERE [DS_LINK_TEST] = 8751 <*Your Test ID here*>

This will give you the Test ID and Name of every test which calls the Test in question (if any do).

TS_TEST_ID  TS_NAME                                 DS_DESCRIPTION
8935    Throughput - Purge Location Records_482K    Call <System Test R14 Configuration>
8938    SCOUT Usability - Template Reports          Call <System Test R14 Configuration>
8818    CLI - system password setting               Call <System Test R14 Configuration>
8816    CLI - SST                                   Call <System Test R14 Configuration>
8817    CLI - GPSD                                  Call <System Test R14 Configuration>

You can Change the Where clause to is not null to get a list of all of the test cases that call a test case. Or you could use the following query to get a list of all test cases that are called by others.

SELECT DISTINCT TS_TEST_ID, TS_NAME 
  FROM [td].[DESSTEPS] 
  JOIN [td].TEST 
  ON [DS_LINK_TEST] = TS_TEST_ID
share|improve this answer

It depends on the testing tool you use, if it creates a copy when you add the same test case to the suite or just link it. For example, in Microsoft's Test Manager you cannot verify in which testing suite was the test case created/used, only if the suite is a User Story/Product Backlog Item.

I would suggest you to test first your testing suite with a simple method.

  1. Create a test case
  2. Create Suite 1, 2, 3
  3. Add the test case to the three suites.
  4. Remove the test case from the second suite
  5. Verification point: verify the first and the third suites if the test case still remained there
  6. Delete the test case from the third suite
  7. Verification point: verify the first suite if the test case is still there.

Please note the difference between delete and remove. Normally I would except from a remove action to delete the test case from the current suite but to let it in the other suites; and from the delete action to delete completely the test case from all of the suites you added it. But, as I said, it depends on the testing tool.

If you went through the uppers steps, you already should know: does the delete/remove action delete all of the test cases from all of the suites? If none of the delete and remove actions deletes all of the test cases, the situation is a little bit sad: you have to go through all of the suites and remove the test case one by one.

I would suggest the same to test the modification of a test case.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.