How Junit4 implements concurrent test cases

How Junit4 implements concurrent test cases

package com.xbosoft.junit4;

import org.junit.Test;

public class TestBingFa {

    @Test
    publicvoid testMethod() {
        System.out.println("test success!");
    }
}

package com.wangjx.bingfa;

 

import org.junit.runner.JUnitCore;

import org.junit.runner.Request;

 

publicclass PerformTestBingFa { 

 

publicstaticvoid main(String[] args) {  

new Thread() {

publicvoid run() { 

new JUnitCore().run(Request.method(TestBingFa.class"testMethod")); 

}

}.start();

new Thread() {

publicvoid run() {  

new JUnitCore().run(Request.method(TestBingFa.class"testMethod")); 

}

}.start();

}

 

}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327075721&siteId=291194637