简体   繁体   English

有关使用的JUnit jar版本的Ant JUnit任务报告(例如Junit 3、3.8、4)

[英]Ant JUnit task report on the version of the JUnit jar used (e.g. Junit 3, 3.8, 4)

由于在执行Ant JUnit任务期间,可以从各个地方拾取JUnit jar,是否有任何方法可以让Ant在控制台上报告用于运行测试的JUnit版本,甚至是所使用的确切jar?

Have you tried declaring this import: 您是否尝试过声明此导入:

import junit.runner.Version;

and then calling this somewhere in your code? 然后在代码中的某个地方调用它?

Version.id();

Then, print this value to the console. 然后,将此值打印到控制台。

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

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