Prev Next

Testing / Junit Interview questions II

Should every Junit test Class with in suite should have main() method?

Not required. However we may add main() method to run only the tests from that Test class.

 public static void main(String[] args) {
   junit.textui.TestRunner.run(MyTestClass.class);
}

More Related questions...

Show more question and Answers...


Comments & Discussions