This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
per Bug 79352 : Please describe/specify the skeletons you want to be generated: Allow generation of parameterized tests. Current: IDE generates a skeleton for testing a single method invocation Example: @Test public void testGetCode() { System.out.println("getCompute"); // See Feature #2 MyObject instance = new MyObject(); // See Feature #3 int x = 0; int expResult = 0; int result = instance.compute(x); assertEquals(expResult, result); // See Feature #1 } Enhancement: allow generation of parameterized tests for each method Example (using simple parameterization): @Test public void testCompute(){ MyObject instance = new MyObject(); paramCompute(instance, 0, 0); paramCompute(instance, 1, 1); // ... etc } /** Generated for testCompute() of MyObject **/ private void paramTestCompute(Object instance, int expectedResult, int x){ int result = instance.compute(x); assertEquals(expResult, result); } Implementation Note: Perhaps this can be implemented as a tool-tip ("parameterize test case") JUnit4 @Parameterized does this, but it is much uglier (and probably harder to implement): @RunWith(Suite.class) @SuiteClasses(MyObjectTest.TestComputeSubtest.class) public class MyObjectTest{ /** * Test of compute method, of class MyObject. */ @RunWith(Parameterized.class) public static class TestComputeSubtest { private int expected; private int x; @Parameters public static Collection<Integer[]> getTestParameters(){...} public TestComputeSubtest(int expected, int x){ this.x = x; this.expected = expected; } @Test public void testCompute(){ MyObject instance = getInstance(); int result = instance.compute(x); assertEquals(expected, result); } } }