Details

Recommendation type: Uncovered code

Configurable: Yes

Filter category: Uncovered code

Description

This type of recommendations helps you identify code that is not covered.

  • Click the Go to link to navigate to the uncovered code associated with the recommendation.
  • Click the Highlight link to highlight the issue in the execution flow displayed in the Unit Test Assistant view.
  • Click the Clone test action link to display a list of already existing tests that can help you to quickly cover the detected code. Click OK to make a copy of the selected test. UTA preselects the most suitable test case by analyzing the test code.

See Increasing Code Coverage for details.

Example

 @Test
    public void testTryThis1()
        throws Throwable
    {
        ExampleServlet THIS = new ExampleServlet();
        try {
            THIS.tryThis((ServletContext)null);
        } catch (NullPointerException npe) {
            // expected
            return;
        }
        fail();
    }

The above test is incomplete and will not cover the tested method:

  • No labels