ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: [PATCH] JUnit optional task - stack trace filtering
Date Sat, 08 Dec 2001 02:50:19 GMT
I believe the only effect would be a shorter stack trace output, and that is
all.  Is that correct Scott?

What automated test systems are you speaking of that would be interpreting
the trace?

    Erik


----- Original Message -----
From: "Steve Loughran" <steve_l@iseran.com>
To: "Ant Developers List" <ant-dev@jakarta.apache.org>
Sent: Friday, December 07, 2001 9:29 PM
Subject: Re: [PATCH] JUnit optional task - stack trace filtering


> that's enough cash to buy my vote, at least for a non controversial issue,
> though Monsiuer Baillez has effective control over the Junit stuff so I'll
> leave the final decision to him.
>
> What would the effect of this change be on automated tests systems?
> Filtering needs to be off by default so anything which tries to interpret
> the trace now wont break.
>
> -steve
>
>
>
> ----- Original Message -----
> From: "Erik Hatcher" <jakarta-ant@ehatchersolutions.com>
> To: "Ant Developers List" <ant-dev@jakarta.apache.org>
> Sent: Friday, December 07, 2001 5:48 PM
> Subject: Re: [PATCH] JUnit optional task - stack trace filtering
>
>
> > Excellent!
> >
> > I put my $0.02 in for this patch.
> >
> >     Erik
> >
> >
> > ----- Original Message -----
> > From: "Scott Stirling" <scottstirling@rcn.com>
> > To: <ant-dev@jakarta.apache.org>
> > Sent: Friday, December 07, 2001 2:16 AM
> > Subject: [PATCH] JUnit optional task - stack trace filtering
> >
> >
> > > I modified the Ant JUnit task to support the JUnit feature that
filters
> > stack frames in failure and error messages so that
> > > junit.framework method frames don't clutter your exception traces.  I
> > added filtering for org.apache.tools.ant as well.  Unless you
> > > are testing Ant or JUnit itself, you really don't need to see any of
> those
> > junit.framework.* stack frames in an exception trace.
> > >
> > > Patchfile is attached, which includes updates to the junit.html doc
> page.
> > >
> > > Like the filter in JUnit, it is not configurable, other than to turn
it
> > off/on.
> > > It could be, but I think the intended purpose is pretty well achieved
> with
> > the
> > > default set of patterns (see the patchfile for the list of excluded
> > patterns).
> > >
> > > To use it in a build.xml, do nothing; the filtering is enabled by
> default.
> > To
> > > disable it, just add the attribute filtertrace="false" to your junit,
> > batchtest or
> > > test task element, e.g.:
> > >
> > > <junit printsummary="yes" filtertrace="false" dir="${basedir}/lib"
> > haltonerror="${qa.junit.haltonerror}"
> > > haltonfailure="${qa.junit.haltonfailure}" fork="yes">
> > >
> > >
> > > Here is an example of the before and after versions of a filtered
> > AssertionFailedError run in Ant:
> > >
> > > Original, unfiltered output you get with Ant:
> > >
> > > junit.framework.AssertionFailedError
> > > at junit.framework.Assert.fail(Assert.java:51)
> > > at junit.framework.Assert.assertTrue(Assert.java:38)
> > > at junit.framework.Assert.assertNotNull(Assert.java:199)
> > > at junit.framework.Assert.assertNotNull(Assert.java:193)
> > > at test.jrunx.persistence.DatabaseTest.setUp(DatabaseTest.java:61)
> > > at junit.framework.TestCase.runBare(TestCase.java:138)
> > > at junit.framework.TestResult$1.protect(TestResult.java:106)
> > > at junit.framework.TestResult.runProtected(TestResult.java:124)
> > > at junit.framework.TestResult.run(TestResult.java:109)
> > > at junit.framework.TestCase.run(TestCase.java:131)
> > > at junit.framework.TestSuite.runTest(TestSuite.java:173)
> > > at junit.framework.TestSuite.run(TestSuite.java:168)
> > > at
> >
>
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
> > nner.java:252)
> > > at
> >
>
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestR
> > unner.java:433)
> > >
> > >
> > > With filtertrace enabled:
> > >
> > > junit.framework.AssertionFailedError
> > > at test.jrunx.persistence.DatabaseTest.setUp(DatabaseTest.java:61)
> > >
> > >
> > > I hope the maintainers of the JUnit task will vote for inclusion of
this
> > patch.  We find it very useful at work (I work on JRun at
> > > Macromedia), as it condenses our JUnit reports considerably (if there
> are
> > errors/failures).
> > >
> > > Best,
> > >
> > > Scott Stirling
> > > Framingham, MA
> > > [work: sstirling@macromedia.com]
> > >
> >
> >
>
> --------------------------------------------------------------------------
> --
> > ----
> >
> >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> <mailto:ant-dev-help@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:ant-dev-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message