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/
testng.xml中groups标签使用的更多相关文章
- Mybatis配置文件SqlMapConfig.xml中的标签
SqlMapConfig.xml配置文件中的属性 1 配置内容 properties(属性) settings(全局配置参数) typeAliases(类型别名) typeHandlers(类型处理器 ...
- Tomcat6和7版本对web.xml中taglib标签的配置差异
原来部署在Tomcat6中的应用在Tomcat7中运行时报错如下错误: java.lang.IllegalArgumentException: taglib definition not consis ...
- AndroidManifest.xml中data标签中所有属性的含义
属性(ATTRIBUTES): android:host 这个属性用户定义URI授权的主机部分,除非给过滤器也指定了<data>元素的scheme属性,否则这个属性没有意义. 注意:在An ...
- 解决上一篇bean.xml中<bean>标签报错“ Error while downloading 'http://www.springframework.org/schema/beans/spring-beans.xsd........”
在xml文件中,头部报错如题 一开始查询,说是头部少了“<?xml version="1.0" encoding="UTF-8"?>”,但是我并没有 ...
- web.xml中<welcome-file-list>标签不起作用
之前也都提到过,web.xml会通过<servlet>和<servlet-mapping>来确定url和指定contoller文件,乃至于jsp页面的联系. 但是有一个< ...
- maven项目pom.xml中parent标签的使用(转)
原文地址:https://blog.csdn.net/qq_41254677/article/details/81011681 使用maven是为了更好的帮项目管理包依赖,maven的核心就是pom. ...
- 使用dom4j工具:获取xml中的标签属性(三)
package dom4j_read; import java.io.File; import java.util.List; import org.dom4j.Attribute; import o ...
- pom.xml中build标签
1.分类 (1)全局配置(project build) 针对整个项目的所有情况都有效 (2)配置(profile build) 针对不同的profile配置 <project xmlns=&qu ...
- testng xml中按顺序执行java类
如红字部份,将安顺序执行4个类 <?xml version="1.0" encoding="UTF-8"?><suite name=" ...
随机推荐
- php7.2连接Sqlserver2008 r2
下载Sql Server PHP扩展 Microsoft Drivers for PHP for SQL Server https://github.com/Microsoft/msphpsql/re ...
- windows共享文件夹至centos系统文件夹下
1. window 共享文件夹 https://jingyan.baidu.com/article/358570f6633ba4ce4624fc48.html 2. 在访问Windows共享资料之前, ...
- allegro把formate symbol文件从一个文件拷入另一个文件的方法
allegro画好PCB后经常需要添加一些说明谢谢,比如叠层信息.阻抗表等,但是每次都自己画太麻烦,现在就写下如何重复使用各种格式. 1.打开包含这些信息的板子,FILE-> Export -& ...
- 谷歌AM HTML视频代码amp-video示例
ntroduction Use amp-video to embed videos into your AMP HTML files. Video source files must be serve ...
- centos7.5 安装gaussian09和 gaussianview4
一.安装gaussian09 1. 解压安装包 $ mkdir Gaussian$ cd Gaussian$ tar xvf g09_linux.tar 2. 设置环境变量 #gaussian09 e ...
- .net 操作web.config文件
XmlDocument doc = new XmlDocument(); string wc = HttpContext.Request.PhysicalApplicationPath + @&quo ...
- 安装linux虚拟机
虚拟机安装流程 1. 安装系统 安装完成 2. 安装VMware tools linux(ubuntu 18.04 Desktop) 手动安装 1) 加载光驱 2) 双击进入光驱,在光驱的目录下,打开 ...
- python 练习1(流控制)
#!/usr/bin/python #_*_ coding:utf-8 _*_ #练习题 #1.使用while循环输入 1 2 3 4 5 6 8 9 10 #a.定义一个变量存放数字 #b.用whi ...
- java实现人民币数字转大写(转)
原文:http://www.codeceo.com/article/java-currency-upcase.html 0 希望转换出来的结果为: 零元零角零分 1234 希望转换出来的结果为: 壹仟 ...
- Why ngx-uploader doesn't like to cooperate with .net core 2.x?
The POST action seems to have no effect on the .net core controller. If you put [IgnoreAntiforgeryTo ...