3.11.7 Replacing a specific Test Case at places where it has been reused

If you have reused a Test Case at multiple places in your Project , and later create a new Test Case that should replace it, then you can perform a mass replace via the Search Result View . If you just want to replace one single place where a Test Case has been reused, then you can either select that Test Case in the Search Result View or use the in-editor replace 3.9.8.

\includegraphics[height=2cm]{danger} In order to perform a mass replace, all Test Cases to be changed must not be in use by anyone else using the Project - you should ensure that this is the case before performing the replace, otherwise the replace cannot be carried out. You should also be aware before performing this action that it cannot be undone.

  1. Search for all places where the Test Case you want to replace is used e.g. Show where used 3.28.2.
  2. In the Search Result View , you will see all places where the selected Test Case is reused in this Project , including in other Test Cases , in Test Suites and anywhere you have used the Test Case as an Event Handler . Select all entries, or just the Test Case references you want to replace with a new Test Case reference.
    \includegraphics[height=2cm]{danger} You will only be able to perform the replace if all selected Test Case references use the same original Test Case . The context-menu entry will be disabled if the Project is protected, or any of the selected Test Cases are missing (e.g. from reused Projects )
    .
  3. From the context menu, select:
    Replace with another Test Case

  4. The first page of a wizard will appear. Here, you can choose the Test Case you want to use as a replacement at the places you selected. It is a good idea to select a Test Case that ''fits well'' (in terms of any component names it propagates and parameters it references) to the Test Case you are replacing. You will be able to map any compatible components and parameter names in the next steps.
  5. Press "Next" to continue to the next page of the wizard.
  6. On this page, you can match any component names propagated 3.13.4 from the newly selected Test Case to already existing propagated component names from the old Test Case . On the left-hand side, you can see names that are propagated from the newly chosen Test Case . On the right-hand side, you can:
    \includegraphics[height=2cm]{danger} For any non-matched (or non-matchable) component names, the new names from the new Test Case will be used. This may result in incomplete object mapping for your tests.
  7. Once you have matched any component names, press "Next" to continue to the next page of the wizard.
  8. On this page, you can match any referenced parameter names 3.12.3 from the newly selected Test Case to already existing referenced parameter names from the old Test Case . On the left-hand side, you can see parameters that are referenced from the newly chosen Test Case . On the right-hand side you can:
    \includegraphics[height=2cm]{danger} For any non-matched (or non-matchable) parameters, the new parameters from the new Test Case will be used. This may result in incomplete test data for your tests.
  9. Once you have finished matching the parameters, press "Finish" to perform the replace.
\includegraphics[height=2cm]{lightbulb} The Test Case reference names and any comments that were used for the original Test Case references, will be transferred to each new Test Case reference. If the original Test Case reference was commented out, the replacement Test Case reference will be as well. If you had used the original Test Case as an Event Handler , the Event Handler details will also be transferred.



Copyright BREDEX GmbH 2013. Made available under the Eclipse Public License v1.0.