简体   繁体   English

如何在另一个套件中嵌入JUnit Test Suite

[英]How to embed a JUnit Test Suite in another Suite

I have an old Junit3 TestSuite I am trying to upgrade. 我有一个旧的Junit3 TestSuite我正在尝试升级。 I see this in the setup... 我在设置中看到了这一点......

suite.addTest(AllSubTests.suite()); suite.addTest(AllSubTests.suite());

What is the equivalent in Junit 4? Junit 4中的等价物是什么?

You can add a Suite class the same way you add other tests... 您可以像添加其他测试一样添加Suite类...

@Suite.SuiteClasses({
  AllSubTests.class
})

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

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