Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 250802 - "Debug Test File" fails for unit test in module
"Debug Test File" fails for unit test in module
Status: NEW
Product: apisupport
Classification: Unclassified
Component: Harness
8.0.2
PC Windows 7
: P3 with 1 vote (vote)
: TBD
Assigned To: pgebauer
issues@apisupport
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo