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