cactus suite of plain tests not junit-runnable ? [message #242963] |
Wed, 18 April 2007 05:38 |
Eclipse User |
|
|
|
Hi
I am trying to reuse a set of PLAIN junit tests as a cactus suite -
following the Option B: reuse a JUnit TestCase
doc at http://jakarta.apache.org/cactus/1.7.2/writing/howto_testcas e.html
<quote>
Cactus is able to run pure JUnit TestCase on the server side. This is
done by using the ServletTestSuite Test Suite that wraps your existing
Test Cases. For example:
public class TestJUnitTestCaseWrapper extends TestCase
{
public static Test suite()
{
ServletTestSuite suite = new ServletTestSuite();
suite.addTestSuite(TestJUnitTestCaseWrapper.class);
return suite;
}
public void testXXX()
{
}
}
</quote>
with a bit of tracing it's easy to see that the tests do get run on the
server but the eclipse junit runner does NOT get any results.
it terminates showing no tests have been run (e.g. showing a label like
"Runs: 0/3").
if the ServletTestSuite is run with the text junit runner (!) the
results do come back as expected
i noticed an error in the eclipse error log ....
java.lang.Exception: Unexpected TestElement type for testId '3': null
org.eclipse.jdt.internal.junit.model.TestRunSession$TestSess ionNotifier.logUnexpectedTest(Unknown
org.eclipse.jdt.internal.junit.model.TestRunSession$TestSess ionNotifier.testEnded(Unknown
org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient$ 4.run(Unknown
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient. notifyTestEnded(Unknown
org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient. access$7(Unknown
org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient$ DefaultProcessingState.readMessage(Unknown
org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient. receiveMessage(Unknown
org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient. access$26(Unknown
org.eclipse.jdt.internal.junit.model.RemoteTestRunnerClient$ ServerConnection.run(Unknown
Source)
at
org.eclipse.jdt.internal.junit.model.TestRunSession$TestSess ionNotifier.testEnded(Unknown
Source) there is this code :
....
if (! (testElement instanceof TestCaseElement)) {
logUnexpectedTest(testId, testElement);
return;
}
I am using cactus 1.7.2 with java5 and rational software architect
7.0.0.2 (eclipse 3.2.2 based)
|
|
|
Powered by
FUDForum. Page generated in 0.03254 seconds