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 251002 - "Include Tests of Module" doesn't work for NbModuleSuite test
Summary: "Include Tests of Module" doesn't work for NbModuleSuite test
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: pgebauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-08 02:09 UTC by err
Modified: 2015-09-09 11:22 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
tiny modules to reproduce failure (28.16 KB, application/zip)
2015-03-08 02:10 UTC, err
Details

Note You need to log in before you can comment on or make changes to this bug.
Description err 2015-03-08 02:09:52 UTC
The same setup, see attached project, works for a NbTestSuite.

To reproduce, using attached test modules:

    - Unzip attached file, open the suite and two modules
    - Build UnitTestPackageAccess

    - From context menu do "Test File" on NewEmptyJUnitTest in module Mod2
      under "Unit Test Packages" org.metawb.data.xml

    Observe that it prints "hello"

    - Modify the methd "suite()" to use suiteB() instead of suiteA().
      (a one character change on line 43)
    - Run "Test File" again

    Observe the failure:

        Testcase: testHello(org.metawb.data.xml.NewEmptyJUnitTest):
                        Caused an ERROR
        org/metawb/lib/TestUtil
        java.lang.NoClassDefFoundError: org/metawb/lib/TestUtil
                at org.metawb.data.xml.NewEmptyJUnitTest
                        .testHello(NewEmptyJUnitTest.java:89)

Notice in project.xml for mod2 that 

            <test-dependencies>
                <test-type>
                    <name>unit</name>
                    <test-dependency>
                        <code-name-base>org.metawb.lib</code-name-base>
                        <compile-dependency/>
                        <test/>                <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                    </test-dependency>

which (if I'm reading harness/README correctly) should give access to the
tests; it does for a NbTestSuite.

I'd appreciate knowing a workaround. I have a variety of tests that share...
Comment 1 err 2015-03-08 02:10:54 UTC
Created attachment 152474 [details]
tiny modules to reproduce failure