简体   繁体   English

Junit测试返回为无根测试

[英]Junit Tests returning as Unrooted Tests

I've similar questions asked on this site, but this is a bit of a different scenario than what I have seen. 我在本网站上也曾问过类似的问题,但这与我所看到的情况有些不同。

We have a PC client execute JUnit 4 tests. 我们有一个PC客户端执行JUnit 4测试。 However, we have a custom test runner that ships the JUnit 4 tests as JUnit 3 tests (using JUnit38ClassRunner) over ethernet to a target system that is running a service that executes JUnit tests using JUnit 3.8. 但是,我们有一个自定义测试运行程序,该测试运行程序通过以太网将JUnit 4测试作为JUnit 3测试(使用JUnit38ClassRunner)提供给目标系统,该目标系统运行的服务使用JUnit 3.8执行JUnit测试。 The tests execute as intended, however, when they are returned to the PC client they are marked as Unrooted Tests. 这些测试将按预期执行,但是当它们返回到PC客户端时,它们会被标记为“无根测试”。 Is there a way to organize these tests as "non-unrooted tests"? 有没有办法将这些测试组织为“非无根测试”? It is somewhat difficult to sift through the failed results when they are all returned in one group when not using Eclipse. 当不使用Eclipse将失败的结果全部归为一组时,很难筛选出失败的结果。 Using JUnit 4 is not an option on the remote system as the target embedded system uses Java 1.4.2, and this is not changing anytime in the near future. 由于目标嵌入式系统使用Java 1.4.2,因此在远程系统上不能选择使用JUnit 4,并且在不久的将来这不会改变。 We really do not want to have to downgrade to JUnit 3.8 on the PC client side because of the @RunWith annotation, which will take us a little while to figure out how to re-implement. 我们真的不想因为@RunWith注释而在PC客户端上降级到JUnit 3.8,这将使我们花一些时间来弄清楚如何重新实现。

Any assistance on this is appreciated, thanks in advance. 对此表示感谢,在此先感谢您的帮助。

我无法在Eclipse中找到解决方案,但是使用Ant管理junit执行会生成xml报告,并且可以通过使用<junitreport>元素编译这些报告来查看网页中的摘要。

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

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