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 250802 - "Debug Test File" fails for unit test in module
Summary: "Debug Test File" fails for unit test in module
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: pgebauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-02 05:13 UTC by err
Modified: 2015-09-09 11:22 UTC (History)
2 users (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 err 2015-03-02 05:13:30 UTC
with error:
    ...
    test-init:
    do-debug-test-single:
    C:\b\j\NetBeans 8.0\harness\common.xml:1003:
        The following error occurred while executing this line:
    C:\b\j\NetBeans 8.0\harness\common.xml:999:
        The following error occurred while executing this line:
    C:\b\j\NetBeans 8.0\harness\common.xml:875:
        The following error occurred while executing this line:
    C:\b\j\NetBeans 8.0\harness\common.xml:869:
        The following error occurred while executing this line:
    Target "-do-junit-debug-single-suite" does not exist in the project "org.metawb.data.xml". 
    BUILD FAILED (total time: 1 second)

This is a unit test for a module.

The failing line, 869 is

    <antcall target="-do-${test.runner}-debug-single${is.test.suite}"

is seems to be failing because ${is.test.suite} is set to "-suite" and not ""

The lines leading up to this failure are here, in particular

    <target name="do-debug-test-single" depends="test-init">
        ....
        <condition property="is.test.suite" value ="-suite" else="">
            <contains string="${test.class}" substring=".xml"/>
        </condition>

NOTE the name of the project "org.metawb.data.xml" and the class that I'm
running is "org.metawb.data.xml.SaxJdk". The <contains ... substring=".xml"
is getting triggered (I guess) and so the <antcall... fails.


Notice that under the target

    <target name="test-single" depends="init,test-init,test-build">

There is also a check for is.test.suite, but in this case it uses

        <contains string="${test.includes}" substring=".xml"/>

but the issues may be different here, non-debug, and require a different test.
Looks suspicious, I just don't know.


As a workaround, I put
        is.test.suite=
in my project properties, but I don't know how safe this is.

What is a test-suite in this context? The class I'm running does NOT extend
NbTestCase or use any of that stuff, it is plain vanilla JUnit. I wonder if
this stuff is referring to the NbModuleSuite class? Anyway, a more 
specific/correct test is needed in the harness.