<VSTest> element determines the behavior when using SpecFlow+ Runner in conjunction with VS Test.
- By default, a test that initially fails is treated as having failed, even if the retries are successful. This can result in test execution results that show the same test as both failing (the initial test) and passing (the subsequent retries). This is particularly common when testing web applications if the initial test times out. In some cases, you may want to determine that a test should be treated as passing, even if one or other of the tests fails, allowing you to discount tests that time out.
Separate: When retrying tests, separate test results are output for each execution of the test: the initial (failing) execution and all retries. (Default)
Unified: A single unified result is output for the test. If the percentage of successful tests (the initial test + all retries) exceeds the threshold (passRate), the test is treated as passing.
- Determines the percentage threshold (default = 100%) used to determine when a test should be treated as passing when using the
Unifiedoption. For example, if the
passRateRelativeis set to 50%, the test is only counted as passing if at least half the tests pass.
- Determines the absolute number of successful retries to determine when a test should be treated as passing when using the
Note: You can either specify
passRateAbsolute. If you specify both, you will get an error.
<VSTest testRetryResults="Unified" passRateAbsolute="1"/>