java - How to run entire JUnit Test Suite from within code -
In eclipse, with JUnit 4, you can right click on a project or package and run as JUnit test Click, and all the JUNET tests within that group, what is the method to do this same thing from within the code?
You can use the packages in Janet as follows:
< Code> public static zero main (string [] args) {list test = new array list (); Tests.add (TestOne.class); Tests.add (TestTwo.class); (Class test: test) {runTests (test); }} Private static zero runtext (class test) {Results Results = JUnitCore.RunClasses (test); (For failure failure: result.getFailures ()) {System.out.println (failure.toString ()); }}
प्रोग्रामर के लिए जावा कोडिंग के नमूने
ReplyDeleteकमांड लाइन जावा सैंपल से पासवर्ड छिपाएं