java - 为什么 selenium 测试用例在 windows cmd 中运行 testng.xml 时被随机跳过
问题描述
我尝试使用带有多个案例的 testng.xml 文件运行 selenium 自动化测试案例,但有些案例被跳过了。TestNG 也不显示跳过的测试用例计数,但显示总计数和失败计数。找不到原因并解决此问题。
因此,我需要使用 testng.xml 运行 tescases 的解决方案,而无需使用 cmd 行中的以下命令跳过 windows cmd;
java org.testng.TestNG %project_location%\sample_testng.xml
你能请任何人帮助我解决这个问题吗?
解决方案
你的测试没有被跳过。他们成功了。
Tests run: 19 = Total test count.
Failures: 15 = Failed tests.
Skips: 0 = Skipped tests.
Total test count - Failed tests - Skipped tests = Successful tests.
19 - 15 - 0 = 4 次成功测试
推荐阅读
- javascript - JS 加载的 PHP 文件意识到正在加载
- kotlin - 如何在这里使用 lambda 表达式?
- php - php mongo 聚合 - 遍历数组 php
- ionic-framework - 如何在 ionic 3 中禁用 android 硬件按钮
- c# - 如何在 C# 中创建一个空的 EventHandler?
- c# - 尝试在 Visual Studio (2019) 中发布时复制文件失败
- python-3.x - 我认为我的代码很干净,但我最终得到 0 行
- python - 如何在条形图中显示 y-bar 值?
- mysql - “go-sql-driver/mysql”的“Scan()”可以获取的最大列数
- ios - 如果用户未授予通知权限,则应用程序在尝试显示 UIAlert 后崩溃