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 42828 - Support Junit Tests for classes in WEB Project
Summary: Support Junit Tests for classes in WEB Project
Status: RESOLVED DUPLICATE of bug 47540
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-05 11:07 UTC by dmladek
Modified: 2004-09-24 20:29 UTC (History)
1 user (show)

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 dmladek 2004-05-05 11:07:50 UTC
Product Version       = NetBeans IDE Dev (Build
200405041800)
  Operating System      = Linux version
2.4.22-1.2115.nptl running on i386
  Java; VM; Vendor      = 1.4.2_04; Java
HotSpot(TM) Client VM 1.4.2_04-b05; Sun
Microsystems Inc.
  Java Home             =
/usr/local/java/j2sdk1.4.2_04/jre
  System Locale; Encod. = cs_CZ; ISO-8859-2
  Home Dir; Current Dir = /usr/local/home/delphym;
/usr/local/forte/forte3/NBdev-last/netbeans/bin
  IDE Install; User Dir =
/usr/local/forte/forte3/NBdev-last/netbeans/platform4;
/usr/local/home/delphym/.netbeans/dev
------------------------------------------------------------------------------

I hope that it is not an intention that it is not
possible to generate JUnit TestSuite in Project
type=WebApplication
In other proj.types it works fine.

Reproduction:
==============
1)Create new Project...choose "Web Application"
2)Create a class in your src structure
3)invoke popup-menu in this class:
  Tools->JUnit Tests->Create Tests
4)Click OK on just appeared dialog "Create Tests"

5)Instead of generationg JUnit Test, you've got
Error:
"JUnit testing is not setuped for source file
MAsterFileObject@xxxxx[...Classa.java].
Usually it means that you have to first activate
JUnit testing in project owning this source file."

Well, I don't have any idea what is project
owning... and I don't see big differenc wheader I
wish create JUnit Test for a class in
J2SELib,J2SEApp or WebApp project.

The only thing which is missing in WebProject is
folder tests at the same level as src package.
Comment 1 Ondrej Rypacek 2004-07-15 15:00:28 UTC
The problem realy is, that Web projects don't contain test package
root (or whatever it's called - the folder for tests). JUnit cannot do
anything about it, it's a project configuration problem.

Reassigning to webaps. 
Comment 2 Petr Pisl 2004-07-19 13:13:46 UTC
Now there is not any 'test' forlder in the Web Project. 
Comment 3 Pavel Buzek 2004-08-27 19:26:29 UTC
This is the second issue with the same problem. I closed #44232 as
wontfix. I will keep it open as an enhancement for future reference.
Comment 4 dmladek 2004-08-30 14:12:02 UTC
I'd say there some-one complains in NetCat program (on special 40cat
mailing list) about same problem... and as a result is an issue #47835
which is treated as defect.

so, 3 bugs are now, I would say.

I suggest to left opened NetCat bug and close this one as a dup, if
you agree.
Comment 5 zikmund 2004-09-24 20:29:33 UTC

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