Problems with SuiteCommand and TestManager

Project:JNode Core
Category:bug report

I've been trying to get SuiteCommand to work with the unit tests I created for the shell. Specifically, I've been trying to run the two AllTests classes as test suites. I've made the relevant "suite" entries in the plugin, but to no avail. All I get is classcast exceptions.

Looking at the SuiteCommand and TestManager classes, it appears that the problem is that TestManager does not understand JUnit test suites defined in the way that the JUnit 3.x "cookbook" document describes. According to the doc, you define a test suite by either creating a class with a "public static TestSuite suite()" method, or ny instantiating a TestSuite passing a class as argument where that class is a subclass of TestCase.

It looks like TestManager is expecting a "suite" descriptor to supply a TestSuite classname. This results in a call to TestSuite.addTestSuite(class) for a TestSuite class. My reading of the JUnit source code is that this won't work.

I suspect that fixing this problem this is going to require a redesign of the TestManager API and the code that implements and uses the API. This is not a small task ...

While we are doing that, it would also be good if we could upgrade JNode to the latest version of JUnit (4.4), or at least to 3.8.2 which is the final bug-fix release for JUnit 3.x.