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 158271 - Cannot compile a junit test while Deploy on Save enabled
Summary: Cannot compile a junit test while Deploy on Save enabled
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-10 10:46 UTC by yirco
Modified: 2009-03-19 14:47 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 yirco 2009-02-10 10:46:20 UTC
Hi,

Could you please look at this issue. 

1) Create a Web project
2) Right click on the project and make sure this is enabled: Properties > Run > Deploy on Save
3) Create a simple web class and junit test class.
4) Run the project (I used Tomcat 6.0.18)
5) Change something in the junit test class.
6) Try to compile it: right click and 'Compile File' is disabled. Select 'Test Packages' and click the 'Run' in the main
Netbeans menu - 'Compile Test  F9' is not available.


When 'Deploy on Save' is enabled the application classes are compiled and deployed automatically but it is not possible
to compile the junit test classes.

A workaround is to run the junit test class and it is compiled. However, you run a junit test suite (JUnit 4.5)
containing junit tests, the junit tests are not compiled so it is necessary to run the individual junit tests.

Thank you.
Comment 1 Alexei Mokeev 2009-03-05 13:50:12 UTC
Assigning issues from Michael to Andrey.
Comment 2 Andrey Yamkovoy 2009-03-19 14:47:45 UTC
This problem is not actual anymore with recent 6.7 builds - there is no compile menu. 
I just checked scenarios with a single test and with Junit 4.5 test suite and test classes are always compiled prior to
execution.