ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject [PATCH] RE: [Bug 639] New - JUnitTestRunner masks exceptions
Date Tue, 20 Feb 2001 11:37:19 GMT
> -----Original Message-----
> From: bugzilla@apache.org [mailto:bugzilla@apache.org]

[...]
> + 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. 


Mime
View raw message