Title: [PATCH] RE: [Bug 639] New - JUnitTestRunner masks exceptions

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

[...]
> + This exception handling code in JUnitTestRunner makes it
> difficult to track

[...]
> + A crude way to improve this would be:
> +             try {
> +                 Method suiteMethod=
> testClass.getMethod("suite", new Class[0]);
> +                 suite = (Test)suiteMethod.invoke(null, new
> Class[0]);
> +             } catch(NoSuchMethodException e) {
> +             e.printStackTrace( System.out );
> +             } catch(InvocationTargetException e) {
> +             e.printStackTrace( System.out );
> +             } catch(IllegalAccessException e) {
> +             e.printStackTrace( System.out );
> +             }

Required action is not appropriate since it will show exceptions for things that are perfectly normal (ie no suite method), however it can be improved when invoking the suite method so that these exceptions are not swallowed. (those one are not normal). Given patch try to follow the same logic and error handling of JUnit TestRunners.

Will try to submit test case for this asap.

--
 St�phane Bailliez
 Software Engineer, Paris - France
 iMediation - http://www.imediation.com
 Disclaimer: All the opinions expressed above are mine and not those from my company.

 

Attachment: junittestrunner.diff
Description: Binary data

Reply via email to