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 270129 - 'no tests executed' error when re-running a test from the 'Test Results' view
Summary: 'no tests executed' error when re-running a test from the 'Test Results' view
Status: NEW
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Tomas Stupka
Depends on:
Reported: 2017-03-20 10:30 UTC by uwe_pachler
Modified: 2017-03-20 10:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description uwe_pachler 2017-03-20 10:30:32 UTC

After running the 'test' goal on my Maven project in the Project explorer, I want to re-run a single failed test from the 'Test Results' view by right clicking a single test method in the tree view there and selecting 'Run Again'.

The resulting Maven test run fails with the message:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-cli) on project myproj-bizimpl: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]

I noticed that the command line generated by NetBeans to run Maven looks like this:

cd /Users/uwe_pachler/myproj-bizimpl; JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home "/Applications/NetBeans/NetBeans" -Dtest=de.mycompany.MyClass#de.mycompany.MyClass.test test-compile surefire:test

Executing the command line in the terminal produces the same error. However, when I change it to 

cd /Users/uwe_pachler/myproj-bizimpl; JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home "/Applications/NetBeans/NetBeans" -Dtest=de.mycompany.MyClass#test test-compile surefire:test

it works fine. Notice that the difference is the -Dtest=.. option:

I changed it from:




So in essence, it appears that the method/test name is generated the wrong way.