The role of SuiteClasses in Junit4 combined unit tests

Integration test class:

/**
 * If you need multiple unit test classes to integrate testing and use a Runner for asynchronous testing, you only need to put the relevant classes into SuiteClasses{},
 * such as: JunitTest.class and TestClassDemo.class are written Good unit test class.
 */
 @RunWith (Suite. class )
 @Suite.SuiteClasses ({JunitTest.class , TestClassDemo.class })
 public class AllTestClass {
     //The function of this class is to integrate testing, also known as packaged testing; you can put All the previously written test classes are integrated;  
     //If you need to test multiple classes, you only need to add the relevant test classes to "{}"; if it is not the same package class, remember to add package name.  
    //@Suite.SuiteClasses({JunitTest.class,TestClassDemo.class})  
 }

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325766197&siteId=291194637