selenium - TestNG Runner 类忽略测试
问题描述
我正在通过 TestNG 运行器类运行我的测试用例,但问题是当运行器类中只有 1 个类时,所有测试都正确执行。正确执行 xml 而如果在运行器类中有超过 1 个类,我会被忽略测试用例和套件仅从两个类运行 1 个测试用例(方法)。 有人可以建议。
解决方案
Try @Test(alwaysRun = true)
, For before methods ( beforeSuite
, beforeTest
, beforeTestClass
and beforeTestMethod
, but not beforeGroups
):如果设置为 true,则无论它属于哪个组,都将运行此配置方法。对于 after 方法 ( afterSuite
, afterClass
, ...):如果设置为 true,即使之前调用的一个或多个方法失败或被跳过,也会运行此配置方法。
推荐阅读
- coldfusion - Mura 自定义表单验证问题
- python - Python 3 IPv6 多播
- mongodb - mongodb 索引的工作方式不同
- angular - 使用 Angular 5 时向 MongoDB 发送数据错误
- awk - awk 中打印字段的顺序发生了什么
- java - 如何编写methode indexOf()的Junit?
- javascript - 如何在javascript中的字符串内的某个索引处附加字符
- javascript - 无线电输入触发器(单击)事件上的 Angular 2 keydowns
- java - 无法让 jOOQ CodeGen 工具工作
- django - 如何保存和显示与其他数据关联的 DetailView 数据