在编写测试的过程中,我们经常遇到只想执行个别或者某一部分/某一类型的测试用例,这时我们可以使用TestNG的分组测试方法
分组测试在配置时,TestNG执行的原则是:只保留最小集合进行执行
看代码:
/**
*
* <p>
* Title: TestngGroups
* </p>
*
* <p>
* 对应配置文件testng-groups.xml
* Description:使用groups进行分组测试,include和exclude的原则是保留最小集合,
* </p>
*
* <p>
* Company:
* </p>
*
* @author : Dragon
*
* @date : 2014年10月13日
*/
public class TestngGroups {
@Test(groups = { "functest"