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 246876

Summary: Notify user when skipTests=true
Product: java Reporter: chicogrillo <chicogrillo>
Component: JUnitAssignee: Theofanis Oikonomou <theofanis>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Windows 8 x64   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: maven output

Description chicogrillo 2014-09-04 12:26:31 UTC
Created attachment 149035 [details]
maven output

I've noticed a different behavior in junit tests under Netbeans 8. My pom.xml has surfire plugin with skipTests=true, in early versions of Netbeans I was able to run single test files on demand (right click > Test File or ctrl+F6) with the same pom.xml. 

I just want to run a single test file when I want to. I don't wanna turn this configuration off, cause I have lots of junit tests that I can't wait to run every time I package my project.

Maven versions tested: 
3.0.5 - Bundled
3.2.3
Comment 1 Theofanis Oikonomou 2014-09-05 12:25:52 UTC
Not sure what you mean by "... early versions of Netbeans...". I tested this with 7.3, 7.4 and 8.0 and the behavior is the same. If you add skipTests=true in your pom then tests are skipped whether you build/test the project or try to test a single file or method. 

Maybe this could work for your scenario (see 'Skipping by default' section): http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html? Or maybe you can create some custom profile or goal that suits your needs?

OTT I think that the Test Results Window should update its status and inform the user that no tests were executed as they were skipped. Changing the issue type. Thank you for reporting.