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 53689 - Test methods of a test class are not generated sometimes
Summary: Test methods of a test class are not generated sometimes
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marian Petras
Depends on:
Reported: 2005-01-19 14:39 UTC by Marian Petras
Modified: 2006-03-24 13:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2005-01-19 14:39:42 UTC
When a test class is generated for an existing
class using JUnit wizard "New Test for Existing
Class", the generated test class sometimes misses
test methods.

I am able to reproduce this bug under the
following conditions:
 - NetBeans just started
 - single project of type "Java Application" open
 - the project has two source package folders
   and two test package folders (customized
   in the project's properties)
 - the project contains two classes having
   the same name, each in one of the source
   package folders
 - the test class is to be created for one
   of these classes
Comment 1 Marian Petras 2005-01-20 09:22:41 UTC
An accurate is:

Test methods are not generated from the JUnit wizard (Test for
Existing Class) until the user invokes action Create Tests and
confirms the Create Tests dialog.
Comment 2 Marian Petras 2005-01-20 09:24:01 UTC
The cause is that the JUnit wizard iterator does not call method
Comment 3 Marian Petras 2005-01-20 16:29:17 UTC
Fixed in the trunk.

Modified file:


The patch simply adds a call of TestCreator.initialize() before the
code which initiates test creation from the wizard.
Comment 4 Max Sauer 2006-03-24 13:23:29 UTC
This is not reproducible both inside nb 5.0fcs and nb6.0 dev 200603141900.
(FIXED && TM==4.1) => CLOSED