您的位置:首页 > 其它

junit4同一时候測试多个測试类

2016-02-01 08:47 211 查看
两个分别须要的測试类

TestSuit001

package com.test.junit;

import org.junit.Test;

public class TestSuit001 {

@Test
public void test()
{
System.out.println("test001");
}
}


TestSuit002

package com.test.junit;

import org.junit.Test;

public class TestSuit002 {

@Test
public void test()
{
System.out.println("test002");
}
}


一个測试套件类

TestSuit

package com.test.junit;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({TestSuit001.class, TestSuit002.class})
public class TestSuit {

}


输出结果

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: