简体   繁体   English

使用Ant运行JUnit时如何停止来自junit的额外消息?

[英]How to stop extra messages from junit while running it using ant?

I am running junits using ant in a foreach loop . 我正在foreach循环中使用ant运行junits。 Using This Solution 使用此解决方案

I am getting the output in following format in my console 我在控制台中以以下格式获取输出

[junit] Running com.test.MyUnitTest
[foreach] junit.framework.TestListener: startTest(testMyMethod)
[foreach] junit.framework.TestListener: endTest(testMyMethod)
[junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.109 sec

How to stop TestListener messages, so that output is in the format 如何停止TestListener消息,以便输出采用以下格式

[junit] Running com.test.MyUnitTest
[junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.109 sec

uses 用途 internally, the result is that for each iteration you get an invocation of 在内部,结果是每次迭代都会得到一个 , thus the target gets started once per iteration and you get the target's label once per iteration using DefaultLogger. ,因此目标每次迭代启动一次,并且您每次使用DefaultLogger获得一次目标的标签。

ANT-CONTRIB cannot control what is output from that. ANT-CONTRIB无法控制该输出。 The output is part of the core definition of the "Target" class. 输出是“ Target”类的核心定义的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM