悄然轻松构建和运转多线程的单元测试
作者:网络转载 发布时间:[ 2013/7/30 14:14:50 ] 推荐标签:
自动生成的测试用例方式如下:
package test;
import static org.junit.Assert.*;
import org.amino.util.msdk.unit.Parallelized;
import org.amino.util.msdk.unit.annotation.CheckFor;
import org.amino.util.msdk.unit.annotation.InitFor;
import org.amino.util.msdk.unit.annotation.ParallelSetting;
import org.amino.util.msdk.unit.annotation.Threaded;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@RunWith(Parallelized.class)
@ParallelSetting(threadNumber = { 1, 2, 4, 8, 16, 32, 64 })
public class TestUnitExtensionSample1 {
@BeforeClass
public static void setUpBeforeClass() throws Exception {}
@AfterClass
public static void tearDownAfterClass() throws Exception {}
@Before
public void setUp() throws Exception {}
@After
public void tearDown() throws Exception {}
@InitFor("testAdd")
public void initfortestAdd(int threadNum){}
@CheckFor("testAdd")
public void checkfortestAdd(int threadNum){}
@Threaded
public void testAdd(int rank, int threadNum) {
}
}
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11