how to see the coverage for a whole plugin where both junit and swtbot test casesvhave been written

97 views Asked by At

I have a eclipse plugin for which both junit snd swtbot test cases have been written… a test suite for junit runs all test cases as junit plugin… test and coverage could be seen… in the same way swtbot test cases could be run as swtbot test and coverage could be seen… but these do not include coverage on…whole plugin… . how can I have one test suite that runs junit test cases as junit test and swtbot test cases as swtbot test… and give coverage for whole plugin…

1

There are 1 answers

0
coder11 On

You can use a TestSuite to combine your tests and run that TestSuite as swtbot Test

public class AllTests extends TestSuite {

public static TestSuite suite() { TestSuite suite = new TestSuite();

suite.addTest(new JUnit4TestAdapter(UnitTests.class));
suite.addTest(new JUnit4TestAdapter(SWTBotTests.class));

return suite;

}