Details
Recommendation type: Uncovered code
Configurable: Yes
Filter category: Uncovered code
Description
This type of recommendations helps you identify code that is not covered. UTA detects 5 or more subsequent lines of uncovered code.
Click the Clone test action link to display a list of existing 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
@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: