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

Summary: "Include Tests of Module" doesn't work for NbModuleSuite test
Product: apisupport Reporter: err <err>
Component: HarnessAssignee: pgebauer <pgebauer>
Status: NEW ---    
Severity: normal CC: anebuzelsky, theofanis
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: tiny modules to reproduce failure

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