3.10.12. Extracting Test Cases from editors: Refactoring

You can extract Test Cases from other Test Cases and from Test Suites. This lets you create keywords even after you have started specifying.

  1. Open the Test Case Editor or Test Suite Editor by double-clicking on the Test Case or Test Suite you want to edit.

  2. Select the Test Cases you want to extract by single-clicking them. Use »CTRL« to select more than one item.

  3. Right-click in the editor and select:

    Refactor-->Extract Test Case.

  4. When prompted, enter a name for the new Test Case.

  5. In the following dialog, select the Category where the new Test Case should be added.

  6. The Test Cases you selected will be extracted into the new Test Case and will be added to the selected Category.

  7. The extracted Test Case appears as a reused Test Case in the current editor. It is marked with a small arrow to show that it is reused, and the Test Case name is in angled brackets (< >) to show that it is the same as the specification name.

  8. The Test Case you just created is also visible in the Test Case Browser.

Use this feature when you realize that you are planning on reusing one or more Test Cases for the same or a similar action again. You will save yourself time in test creation and maintenance.



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