farum12 / NUnitRetry.SpecFlowPlugin

Retry running tests in SpecFlow using NUnit test runner
MIT License
1 stars 4 forks source link

Allow to specify other custom retry attribute #2

Open Socolin opened 2 years ago

Socolin commented 2 years ago

When we want retry on some specific exception, NUnit provide an example of writting a custom attribute https://github.com/nunit/nunit-csharp-samples/blob/master/TimeoutRetryAttributeExample/TimeoutRetryAttribute.cs

I think it could be nice to have a way to configure it in specflow.json

  "NRetrySettings": {
    "maxRetries": 2,
    "customAttributes": {
       "Namespace.SomeCustomAttribute": {
         "tag": "CustomRetry",
          "maxRetries": 2,
          "applyGlobally": true
       }
    }
    "applyGlobally": true
  }