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.

Bug 79352 - Allow users to modify the way JUnit test skeletons are generated
Summary: Allow users to modify the way JUnit test skeletons are generated
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: junit-issues@java
URL:
Keywords:
Depends on: 227314 227315 227316 227317
Blocks:
  Show dependency tree
 
Reported: 2006-06-28 16:03 UTC by Marian Petras
Modified: 2013-09-02 22:57 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2006-06-28 16:03:23 UTC
Several users have asked about how to change the templates from which the test
method skeletons are generated. The current implementation does not allow it -
the test method skeleton is generated programatically. To change it, the users
would have to modify the module source code.

Change it - allow the users to customize the generated test method skeletons.
Comment 1 Marian Petras 2006-06-28 16:06:10 UTC
To people interested in this feature:

   Please describe/specify the skeletons you want to be generated.
   The more examples you provide, the better support for customizations of code
   can be developed. I do not have any idea of how you want the skeletons
   to be generated - the more ideas you provide, the more capable/general
   support for this feature can be developed.
Comment 2 Alexei Mokeev 2010-05-05 07:45:51 UTC
No input since 2006, seems nobody interested in it.
Comment 3 theshadow27 2013-03-11 19:58:32 UTC
Adding actual descriptions.
Comment 4 theshadow27 2013-03-11 20:18:24 UTC
Specific descriptions added in:
Bug 227314 - Framework Specification / Custom imports
Bug 227315 - Method Declaration Generation
Bug 227316 - New instance generation
Bug 227317 - Parameterized test generation
Comment 5 theshadow27 2013-04-16 00:48:13 UTC
The 6.7 beta code coverage plugin is no longer being maintained
Comment 6 theshadow27 2013-04-16 00:50:49 UTC
Whoops! Wrong bug... Was cleaning up some old bugs and closed this one by mistake. It is still valid. - jacob
Comment 7 ngewecke 2013-09-02 22:57:43 UTC
As you were asking for descriptions and I just came upon this here is what I would want

The Templates allow for the commenting of the Before and After methods but do not allow for a custom comment on the "generated" unit tests. I would like the ability to modify the default output of the comments for a generated test from:

/**
 * Test of getFooMethod, of class Foo
 */

Template:

/**
 * Test of ${method}, of class ${name}
 */

to something like:

/**
 * Test of {@link Foo#getFooMethod(package.Foo)}
 */

Template:

/**
 * Test of {@link ${name}#${method}(${package})}
 */
  

The test method name could be an option for revision too although that could be significantly harder to implement.