You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Peter Arrenbrecht <pe...@gmail.com> on 2007/12/11 09:37:49 UTC
[junit task] Trying to make the test runner not query test names unless there is a failure
Hi all
I am running a suite of some hundreds of thousands of tests. In case
of failure, I want to return a name with lots of context information.
This name, however, is a bit expensive to build. So I don't want it
queried for successful tests.
The current JUnitTask, however, always turns on the test listener,
which in turn logs the names to a dummy output writer:
runner = delegate.newJUnitTestRunner(test, test.getHaltonerror(),
test.getFiltertrace(),
test.getHaltonfailure(), false,
true, classLoader);
(the second to last argument sets logTestListenerEvents to true).
Why is logTestListenerEvents always true? At least if showOutput is
false, I think one could set it to false. After all, the results
formatters seem to use their own listener.
Thanks for any clarifications,
-peter
ps. A workaround of sorts is to only return full context in toString()
and return a simple name in getName(). But I still would like Ant to
avoid calling getName() when it is not needed.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org