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 213612 - Running JUnit test in maven using testng does not execute test when CoS is on
Summary: Running JUnit test in maven using testng does not execute test when CoS is on
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: TestNG (show other bugs)
Version: 7.2
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 15:19 UTC by Tomas Danek
Modified: 2015-09-14 14:03 UTC (History)
1 user (show)

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 Tomas Danek 2012-06-05 15:19:29 UTC
Product Version: NetBeans IDE Dev (Build 201206050001)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Mac OS X version 10.7.4 running on x86_64; US-ASCII; en_US (nb)
User directory: /Users/tomas/Library/Application Support/NetBeans/dev
Cache directory: /Users/tomas/Library/Caches/NetBeans/dev
------------
- create maven javase project
- turn CoS on also for tests
- add testNG to test classpath (6.5.2)
- run AppTest.java (default JUnit test generated in project) by Test File action from popup -> no test is run


cd /tmp/mvn3; JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home "/Applications/NetBeans/NetBeans Dev 201206050001.app/Contents/Resources/NetBeans/java/maven/bin/mvn" -f /tmp/mvn3/pom.xml -Dtest=com.mycompany.mvn3.AppTest test-compile surefire:test
Scanning for projects...
                                                                        
------------------------------------------------------------------------
Building mvn3 1.0-SNAPSHOT
------------------------------------------------------------------------

[resources:resources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory /tmp/mvn3/src/main/resources

[compiler:compile]
Compiling 1 source file to /tmp/mvn3/target/classes

[resources:testResources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory /tmp/mvn3/src/test/resources

[compiler:testCompile]
Compiling 1 source file to /tmp/mvn3/target/test-classes

[surefire:test]
Surefire report directory: /tmp/mvn3/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.mycompany.mvn3.AppTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.375 sec

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 3.778s
Finished at: Tue Jun 05 17:18:58 CEST 2012
Final Memory: 16M/132M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-cli) on project mvn3: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
Comment 1 Jiri Kovalsky 2015-02-11 14:48:23 UTC
I think this bug is no longer valid and could be closed. Fanis?
Comment 2 Theofanis Oikonomou 2015-09-14 14:03:07 UTC
I can no longer reproduce this in latest builds. Probably fixed as a side effect of re-writing compile on-save policy in maven projects support. Closing this one. Thanks