Introduction

Unit Test Assistant can identify gaps in test coverage and provide guidance for covering the gaps in the Recommendations tab (see Working with Recommendations). Uncovered code recommendations include action links and ‘hints’ to help you cover the code.


The 'Uncovered code' recommendation must be enabled in UTA preferences (see Configuring Preferences).

UTA displays recommendations for the largest uncovered code fragments first. It will guide you through progressively smaller chunks of uncovered code as you address coverage gaps.

To increase coverage, you can either modify or extend existing test cases or clone and modify an existing test case with UTA.

Modifying a Test Case

The Recommendations panel may display hints that describe how the test case should be modified to cover the code. By analyzing the flow of the program, it can provide information about parameter values that satisfy the conditions of flow control statements.

Cloning and Updating a Test Case

The Clone test action displays a list of existing tests that you can copy and modify to quickly increase coverage.

  1. Click Clone test. UTA will analyze the available tests and recommend the most suitable test to clone.

              
  2. Select the test you want to clone. Depending on the test code, the following clone types may be available:
    - clone only – UTA makes a copy of the test without changing the test code. You need to manually modify the cloned test.
    - clone with suggested value(s) – UTA makes a copy of the test and automatically updates the cloned test –  according to the hints. For example:
       Hints:
      
       The automatically updated test:
      
  3. Click OK.

Parameterized tests

Cloning is not available for recommendations associated with parameterized tests.

  • No labels