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 269035 - unable to run "https://platforms.netbeans.org/tutorials/nbm-test.html" test without changes under 8.2
Summary: unable to run "https://platforms.netbeans.org/tutorials/nbm-test.html" test w...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: NB JUnit (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-18 16:33 UTC by mbinstead
Modified: 2016-11-20 14:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (65.63 KB, text/plain)
2016-11-18 16:33 UTC, mbinstead
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mbinstead 2016-11-18 16:33:32 UTC
Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0_60
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.60-b23

Reproducibility: Happens every time

STEPS:
 * Implement example from https://platform.netbeans.org/tutorals/nbm-test.html
 * Try to test 'Paint' Module
 * Try to test 'Paint' Application

ACTUAL:

1.Unit Test of 'Paint' Module fails to compile.

  Changing 'PaintCanvasTest' class to be derived from 'TestCase' instead of 'NbTestCase' appears to resolve the problem.

2. QA-Functional Test of 'Paint' Application compiles but the 'OverallTest' fails with an 'Unknown' cause.
  
  Looking at the 'Output' window I can see the following report:

    Testsuite: OverallTest
    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec

    Null Test: 	Caused an ERROR
    org/netbeans/insane/scanner/Visitor
    java.lang.NoClassDefFoundError: org/netbeans/insane/scanner/Visitor
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
    Caused by: java.lang.ClassNotFoundException: org.netbeans.insane.scanner.Visitor
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

EXPECTED:
  Expect tests to pass, as shown in the tutorial.
Comment 1 mbinstead 2016-11-18 16:33:39 UTC
Created attachment 162957 [details]
IDE log
Comment 2 mbinstead 2016-11-20 13:33:00 UTC
Typo - please use the following link:

STEPS:
 * Implement example from https://platform.netbeans.org/tutorials/nbm-test.html
 * Try to test 'Paint' Module
 * Try to test 'Paint' Application
Comment 3 mbinstead 2016-11-20 14:23:08 UTC
I have resolved the problem.

the Functional test ("OverallTest.java") needs to be in a package,
not left in the default package, to work with platform 8.2.

I move the file

  Paint/test/qa-functional/src/OverallTest.java

to

  Paint/test/qa-funtional/src/org/netbeans/paint/OverallTest.java

and refactored the file to include "package org.netbeans.paint;"

this was sufficient for the functional test to work.