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.
See Jiri S. in QA for a reproducible test case. Test runs under netbeans JUnit module. Does not run under XTest.
There is a problem in the reporting part of XTest as well in our custom junit ant task. I'll try to fix it. On the other hand, it is HIGHLY recommended, that if possible, all JUnit based testcases run under XTest should inherit from org.netbeans.junit.NbTestCase class. This class adds many new features to standard JUnit, like possibility to compare files, use working directory, write golden file testcases, etc ...
Thanks Martin, Sounds good. I talked to Martin Balin yesterday and what I think is that we want to do what you suggest which is to tightly integrate with XTest rather than just JUnit APIs. Separate from that it would seem helpful if XTest could run JUnit tests developed by 3rd parties. I'll let you folks consider whether you think this should be a requirement or not. From what you wrote it sounds like it can be achieved.
XTest should be able to run JUnit tests developed by others, but since there was recently a lot of changes in the way how NetBeans extension to JUnit was implemented, we made a bug in out junit ant task, so it was not able to run standard JUnit tests properly. I was looking at the code today and the fix should be integrated tomorrow. Anyway, for your purposes it should be more convenient to integrate more closely to XTest than to plain JUnit. Please note, that NetBeans extension to JUnit is not a part of XTest code, but JUnit module code. For details, see junit.netbeans.org.
XTest framework was fixed, so it is now able to run your test. The only thing you have to do is either: Add suite() method to the test class e.g.: public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(new MyTestExample()); return suite; } or add method beginning with test work, which runs the run() method to the TestHarness class, e.g.: public void testMyStuff() { run(); } Jiri S. will surely give you more details about both possible solutions.
Resolved for 3.3.x or earlier, no new info since then -> verify.
Resolved for 3.3.x or earlier, no new info since then -> closing.