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 57277 - Can't run non-junit tests in "Test Packages" folders
Summary: Can't run non-junit tests in "Test Packages" folders
Status: RESOLVED DUPLICATE of bug 43391
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Windows 3.1/NT
: P3 blocker with 1 vote (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-31 17:37 UTC by ats37
Modified: 2005-04-01 15:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ats37 2005-03-31 17:37:46 UTC
In addition to my JUnit-based unit tests, I have some (hand-written) quick &
dirty performance tests.   These take the form of an executable java class (with
void main(String[] argc) method which just run the old & new versions of some of
my code classes, and time how long they each take to complete.  Since these are
test utility classes rather than the code I'm building, I put them under "Test
Packages" rather than "Source Packages" in my (General|Java Class Library)
project.  However, when I try to run them with Shift+F6, I just get a
junit.framework.AssertionFailedError telling me there's "No tests found".

I don't want it to try to run the class with JUnit - I named it *Timer rather
than *Test and it doesn't extend TestCase, in order to avoid this.  However,
Netbeans doesn't appear to take this into account when Executing the class.  If
I cut & paste the class into the equivalent package under "Source Packages",
Shift+F6 runs it as expected.  However, it then gets included in the built JAR
File.  I suppose I could just configure a specific Exclude entry in the project
properties to avoid this, but IMO the class doesn't really belong under Source,
as it's only for testing.
Comment 1 Jesse Glick 2005-04-01 15:28:38 UTC

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