zoukankan      html  css  js  c++  java
  • testng.xml中groups标签使用

    XML配置如下:

    <?xml version="1.0" encoding="UTF-8"?>
    
    <suite name="suiteName">
    
        <test name="postTest">   //name在测试报告中会有体现
        
            <groups>   //groups标签必须在test标签里面
                <run>
                    <include name = "groupName1"/>  //组名为groupName1(必须在代码中真实存在),运行
                    <exclude name = "groupName2" />  //组名为groupName2,不运行
                </run>
            </groups>
            
            <classes>
                <class name = "路径+将要测试的class名称" />  //在哪个类中执行以上groups
            </classes>
        </test>
    
    </suite>

    Class用例配置简单示例如下:

    public class ClassName {  //classname与<classes>标签中的name相对应
         
         @Test(groups = {"groupname"})  // groupname与xml中的groupname相对应
         public void Method1{
             
         }
        
    }

     详细资料参考:

    https://www.ibm.com/developerworks/cn/java/j-testng/index.html

    https://www.ibm.com/developerworks/cn/java/j-test-ng/

  • 相关阅读:
    欧拉函数
    uva10870 矩阵
    poj3233 矩阵等比数列求和 二分
    hdu4990 矩阵
    hdu4549 矩阵快速幂 + 欧拉降幂
    补矩阵的题目
    CodeForces 450B 矩阵
    hoj2662 状态压缩dp
    poj3254 状态压缩dp
    zoj2770 差分约束系统
  • 原文地址:https://www.cnblogs.com/yxfeng/p/7988560.html
Copyright © 2011-2022 走看看