c# - NUnit Retry 不适用于以下场景
问题描述
我尝试了以下代码以NUnit(3.13.2)
重试测试失败的测试方法并显示
预期:没有异常被抛出,但是是错误的
在这里,然后它不会再次重试测试。这是我的示例测试方法:
[Test, Retry(2), Category("Test")]
[Description("Verifies the URL")]
[TestCaseSource(typeof(ExcelStatic), "Method Name", new object[] { "TestData\SampleTests2.xlsx", "sampletesttab"})]
public void Test2_URL( string url, string application) {
Assert.That(
() => UtilitiesPage.URL(driver, appUrl), Throws.Nothing
); // This method is present in the other libraries
请帮忙
解决方案
推荐阅读
- python - 如何使用 Nuitka 从 Python 获取已编译二进制文件的当前路径?
- azure-devops - Azure DevOps 组织设置与项目级别的成本
- java - 为什么 lombok 不提供继承属性的 getter 方法?
- c# - 获取活动 MAC 地址的问题
- ios - 如何在请求网络中应用等待?
- mysql - 忽略我“跳过”的记录?
- javascript - React Native 最小/准系统设置
- c# - 在 ASP.NET 应用程序中关闭 MySQL 连接的最佳方法是什么?
- python - 如何在python的特定区域插入json代码?
- python - 如何将标签与 tkinter 文本小部件中的文本一起保存?