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 215148 - "no tests executed" when debugging tests or relaunching failed tests
Summary: "no tests executed" when debugging tests or relaunching failed tests
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 7.2
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2012-07-03 21:50 UTC by lvr123
Modified: 2012-08-21 12:42 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
"Debug Test File" actions's output (2.25 KB, text/plain)
2012-07-04 20:49 UTC, lvr123
Details
notification in the statusbar while relaunching a test in the Test Results panel. (11.28 KB, image/png)
2012-07-05 20:56 UTC, lvr123
Details
Project source (4.85 MB, application/x-rar-compressed)
2012-07-05 20:59 UTC, lvr123
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lvr123 2012-07-03 21:50:14 UTC
Testing the entire project (ALT+F6) works fine.
But relaunching failed tests (via JUnit panel) or starting individual tests (via contextual menu) in no-debug or debug mode always return a "no tests executed" in the JUnit panel.

These are JUnit 3.8.1 tests, created with the templates, in a Maven project.

Product Version = NetBeans IDE 7.2 Beta (Build 201205031832)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0_04
Runtime = Java HotSpot(TM) Client VM 23.0-b21
Comment 1 Theofanis Oikonomou 2012-07-04 09:37:50 UTC
I am sorry but I cannot reproduce in NetBeans IDE Dev (Build 20120621-d8cca3af97ea). I can rerun all tests from the test results window or via right click test file action. Please reopen if this keeps happening in the latest builds. Thank you
Comment 2 lvr123 2012-07-04 20:49:38 UTC
Created attachment 121742 [details]
"Debug Test File" actions's output
Comment 3 lvr123 2012-07-04 20:52:13 UTC
I reopen this issue because I downloaded the latest version (7.2 RC1) and the same problem occurred.
See attachment "Debug Test File" action's output.


Product Version = NetBeans IDE 7.2 RC1 (Build 201206272359)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0_04
Runtime = Java HotSpot(TM) Client VM 23.0-b21
Comment 4 Theofanis Oikonomou 2012-07-05 08:15:39 UTC
I am sorry but I cannot reproduce in RC1 either. Could you reopen describing exact steps to reproduce and ideally attaching a sample project that produces the problematic behaviour? Thank you. 

PS: Milosi could this be some issue related to the surefire plugin?
Comment 5 Milos Kleint 2012-07-05 08:27:57 UTC
a sample project is of essence here I suppose. There are combinations of surefire-plugin version and junit version that isn't capable of running one or multiple tests methods, can't recall a similar case where entire test class would not get executed
Comment 6 lvr123 2012-07-05 20:55:41 UTC
In annexe:
- my project 
- a capture of strange notification I saw a few seconds in the statusbar while "running again" a test in the "Test Results" panel. Strange because the surefire plugin is version 2.12, my tests are JUnit 3.8 tests (and not 4.0 tests) and the Compile On Save was set on "For application execution only".

In the meantime, I found a workaround: I set the Compile On Save was set on "For both application and test execution" instead of "For application execution only".
Comment 7 lvr123 2012-07-05 20:56:41 UTC
Created attachment 121776 [details]
notification in the statusbar while relaunching a test in the Test Results panel.
Comment 8 lvr123 2012-07-05 20:59:07 UTC
Created attachment 121777 [details]
Project source
Comment 9 Goliathhunter 2012-08-21 09:08:44 UTC
Same Bug on Windows 7 Enterprise x64 with Service Pack 1
Comment 10 Goliathhunter 2012-08-21 12:22:13 UTC
This is not a Bug in Netbeans 7.2 with Maven-projects.
There is a Bug in the Maven-Surefire-Plugin of Maven.
Check if you could run your test-file on command-line:
mvn test -DTest=SomeTestClass

You should get the same Failure like in the NB 7.2

see this maven-bugreport:

'http://jira.codehaus.org/browse/SUREFIRE-827'

I changed the version of my maven-surefire-plugin in my pom.xml to version 2.11


please check this in your projects and verify.
Comment 11 Goliathhunter 2012-08-21 12:42:23 UTC
Bug fixed in maven-surefire-plugin Version 2.12.2