Junit4 如何实现并发测试用例
Junit4 如何实现并发测试用例
package com.xbosoft.junit4; import org.junit.Test; publicclass TestBingFa { @Test publicvoid testMethod() { System.out.println("test success!"); } }
package com.wangjx.bingfa;
import org.junit.runner.JUnitCore;
import org.junit.runner.Request;
public class PerformTestBingFa {
public static void main(String[] args) {
new Thread() {
public void run() {
new JUnitCore().run(Request.method(TestBingFa.class, "testMethod"));
}
}.start();
new Thread() {
public void run() {
new JUnitCore().run(Request.method(TestBingFa.class, "testMethod"));
}
}.start();
}
}
相关推荐
shirleypaddy 2020-10-19
qingmumu 2020-10-19
lustdevil 2020-10-18
ganlulululu 2020-10-12
lustdevil 2020-08-03
lustdevil 2020-07-18
lustdevil 2020-06-25
lustdevil 2020-06-21
zhengzf0 2020-06-21
宿命java 2020-06-15
JackYin 2020-06-14
dongxurr 2020-06-07
snowphy 2020-06-06
zhengzf0 2020-05-28
81901836 2020-05-26
Julywhj 2020-05-26