Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Eclipse 插件,其中两个 junit snd swtbot 测试用例都已编写……junit 的测试套件将所有测试用例作为 junit 插件运行……可以看到测试和覆盖率……以同样的方式 swtbot 测试用例可以作为 swtbot 测试运行并且可以看到覆盖范围……但这些不包括……整个插件的覆盖范围……。我怎样才能拥有一个测试套件来运行 junit 测试用例作为 junit 测试和 swtbot 测试用例作为 swtbot 测试......并覆盖整个插件......
您可以使用 TestSuite 来组合您的测试并将该 TestSuite 作为 swtbot 测试运行
公共类 AllTests 扩展 TestSuite {
公共静态TestSuite套件(){TestSuite套件=新TestSuite();
suite.addTest(new JUnit4TestAdapter(UnitTests.class)); suite.addTest(new JUnit4TestAdapter(SWTBotTests.class)); return suite;
}