Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This type of recommendations helps you identify code that is not covered. UTA detects 5 or more subsequent lines of uncovered code

  • 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 test cases that have been executed; then select a test case you want to duplicate and modify. UTA preselects a test case to clone based on the test case coverage and name (if the coverage is identical, UTA selects the test case with the highest consecutive number in its name). This quick fix is available only for regular tests.

Example

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

...