-
-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Description
If the Skip property of an [InlineData] attribute (or derived types of DataAttribute) is populated with a message that it should be skipped, either statically in code or at runtime, Visual Studio does not respect that value and runs the test when the Visual Studio Test Explorer is used.
A repo containing a solution that demonstrates this issue can be found here: https://github.com/martincostello/broken-inlinedata-skip-repro
This appears to be a regression since xunit 2.3.1.
Running dotnet test using the CLI is not affected:
PS C:\Coding\broken-inlinedata-skip-repro> dotnet test
Build started, please wait...
Build completed.
Test run for C:\Coding\broken-inlinedata-skip-repro\bin\Debug\netcoreapp2.1\broken-inlinedata-skip-repro.dll(.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 15.7.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
[xUnit.net 00:00:00.98] BrokenInlineDataSkip.Tests.Can_Add_Integers(x: 2, y: 2, expected: 4) [SKIP]
Skipped BrokenInlineDataSkip.Tests.Can_Add_Integers(x: 2, y: 2, expected: 4)
Total tests: 2. Passed: 1. Failed: 0. Skipped: 1.
Test Run Successful.
Test execution time: 2.2485 Secondsxunit 2.3.1 Behaviour
xunit 2.4.0 Behaviour
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels