首页 > 解决方案 > 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

请帮忙

标签: c#seleniumnunitparameterizednunit-3.0

解决方案


推荐阅读