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 213939

Summary: [72cat] Not able to debug TestNG suite
Product: java Reporter: crazyjavahacking
Component: TestNGAssignee: Theofanis Oikonomou <theofanis>
Status: RESOLVED FIXED    
Severity: normal CC: jglick, jungi, mmirilovic, musilt2
Priority: P1 Keywords: SPACE_IN_PATH
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 189308
Attachments: stacktrace
stacktrace

Description crazyjavahacking 2012-06-11 08:01:07 UTC
Build: NetBeans IDE Dev (Build 201206100001)
VM: Java HotSpot(TM) Client VM, 20.7-b02, Java(TM) SE Runtime Environment, 1.6.0_32-b05
OS: Windows 7

User Comments:
crazyjavahacking: I just debugged the TestNG test suite for And based Java SE project.
It looks like the path for debug was incorrectly combined. The physical path to the TestNG test suite file is: C:\Users\Martin Skurla\Downloads\JUnitSampleProject_TS_68_JUnit\JUnitSampleProject\test\teststorun\TeststorunSuite.xml




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.testng.output.TestNGOutputReader.testTaskFinished(TestNGOutputReader.java:679)
   at org.netbeans.modules.testng.output.TestNGAntLogger.taskFinished(TestNGAntLogger.java:377)
   at org.apache.tools.ant.module.bridge.impl.NbBuildLogger.taskFinished(NbBuildLogger.java:555)
   at org.apache.tools.ant.Project.fireTaskFinished(Project.java:2206)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
Comment 1 crazyjavahacking 2012-06-11 08:01:13 UTC
Created attachment 120640 [details]
stacktrace
Comment 2 Theofanis Oikonomou 2012-06-13 09:52:54 UTC
I think the problem was caused by the fix in bug #213773. This should be fixed by http://hg.netbeans.org/main/rev/c89c9b434e69 as I cannot reproduce it in todays build. Please verify and reopen if it happens again. Thank you
Comment 3 crazyjavahacking 2012-06-13 16:36:42 UTC
Still the same problem in the today build - NetBeans Dev 201206130001.
Comment 4 crazyjavahacking 2012-06-13 16:38:03 UTC
I just found that wrong stack trace was posted. The correct one is:

java.io.FileNotFoundException: C:\Users\Martin (Systém nemůže nalézt uvedený soubor)
	at java.io.FileInputStream.open(Native Method)
[TestNG] [ERROR] No test suite found. Nothing to run
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at java.io.FileInputStream.<init>(FileInputStream.java:79)
	at org.testng.xml.Parser.parse(Parser.java:165)
	at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:305)
	at org.testng.TestNG.run(TestNG.java:998)
	at org.testng.TestNG.privateMain(TestNG.java:1328)
	at org.testng.TestNG.main(TestNG.java:1297)
java.io.FileNotFoundException: C:\Users\Martin Skurla\Downloads\JUnitSampleProject_TS_68_JUnit\JUnitSampleProject\Skurla\Downloads\JUnitSampleProject_TS_68_JUnit\JUnitSampleProject\test\teststorun\TeststorunSuite.xml (Systém nemůže nalézt uvedenou cestu)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at java.io.FileInputStream.<init>(FileInputStream.java:79)
	at org.testng.xml.Parser.parse(Parser.java:165)
	at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:305)
	at org.testng.TestNG.run(TestNG.java:998)
	at org.testng.TestNG.privateMain(TestNG.java:1328)
	at org.testng.TestNG.main(TestNG.java:1297)

The correct one is: C:\Users\Martin
Skurla\Downloads\JUnitSampleProject_TS_68_JUnit\JUnitSampleProject\test\teststorun\TeststorunSuite.xml
Comment 5 crazyjavahacking 2012-06-13 16:38:58 UTC
Probably problem with blank character in the path?
Comment 6 Tomas Danek 2012-06-14 12:30:05 UTC
moving to P2 since we are past code freeze in order to be able to propagate fix to 7.2
Comment 7 Tomas Danek 2012-06-14 12:47:58 UTC
Created attachment 120846 [details]
stacktrace

1) created javase (ant) project on path with space in path 
2) on package invoked "Create test", generated also suite
3) invoked "Debug" on test suite XML -> NPE
Comment 8 Tomas Danek 2012-06-14 13:49:32 UTC
${testng.cmd.args} needs probably to be escaped.
Comment 9 Theofanis Oikonomou 2012-06-14 14:03:19 UTC
Fixed in core-main: hg.netbeans.org/core-main/rev/1eb41ac0dc93
Tomasi could you please verify? Thank you
Comment 10 Quality Engineering 2012-06-15 06:12:41 UTC
Integrated into 'main-golden', will be available in build *201206150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1eb41ac0dc93
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Issue #213939 - [72cat] Not able to debug TestNG suite
Comment 11 crazyjavahacking 2012-06-15 14:38:54 UTC
Thanks for fixing, works correctly in 201206150001.
Comment 12 Tomas Danek 2012-06-15 14:46:33 UTC
marking as Verified then. Fanis, please proceed with integration into 7.2 branch, thanks in advance
Comment 13 Theofanis Oikonomou 2012-06-18 12:26:16 UTC
Integrated into release72 branch: http://hg.netbeans.org/releases/rev/56513d045c14
Comment 14 Quality Engineering 2012-06-19 02:53:08 UTC
Integrated into 'releases', will be available in build *201206182200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/56513d045c14
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Issue #213939 - [72cat] Not able to debug TestNG suite
(transplanted from 1eb41ac0dc93514ccd03ebd6a6aa240d9a1662e9)
Comment 15 Marian Mirilovic 2012-06-24 20:59:03 UTC
... pending verification in NB 7.2