private static Throwable runTestCaseTest(String testClass, String method, int port) throws Exception {
TestCase test = (TestCase)Class.forName(testClass).newInstance();
test.setName(method);
TestResult result = new TestResult();
test.run(result);
if (result.failureCount() != 0) {
Enumeration e = result.failures();
return ((TestFailure)e.nextElement()).thrownException();
}
else if (result.errorCount() != 0) {
Enumeration e = result.errors();