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 161725 - Ability to run one test *method*
Summary: Ability to run one test *method*
Status: RESOLVED DUPLICATE of bug 72080
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords:
: 161727 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-02 05:53 UTC by _ tboudreau
Modified: 2009-04-02 13:05 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 _ tboudreau 2009-04-02 05:53:03 UTC
There is a general problem with JUnit that we treat each Java file as a "test" but really each test *method* is a test.
 Very often I find myself commenting out all but one test method in a file so that the test in the area that I'm working
on runs faster, or so I only get logging from that one test method.

Given that we control the compiler, the same functionality that gives us compile-on-save could be used to do this -
especially with JUnit 4 - just recompile the test file but strip the @Test annotations from the bytecode for all but the
one test you want to run (you could do this with junit 3 by modifying the method names).

This would probably improve my productivity with unit tests 1000% when working on any project with a lot of existing
tests, especially long-running ones or GUI tests.
Comment 1 Andrey Yamkovoy 2009-04-02 13:01:25 UTC
*** Issue 161727 has been marked as a duplicate of this issue. ***
Comment 2 Andrey Yamkovoy 2009-04-02 13:05:50 UTC

*** This issue has been marked as a duplicate of 72080 ***