visualstudio.xunit
visualstudio.xunit copied to clipboard
SkipReason is not deserialized for XunitSkippedDataRowTestCase
Given the following test class:
public class UnitTest1
{
[Theory]
[MemberData("SimpleData", Skip = "rgre")]
public void TestWithSimpleData(int i)
{
Assert.True(i > 1);
}
public static IEnumerable<object[]> SimpleData()
{
yield return new object[] { 1 };
yield return new object[] { 2 };
}
}
After tests are discovered, an attempt to run a particular test-case will actually run it, despite it being a XunitSkippedDataRowTestCase with a non-null SkipReason.
This happens because ITestFrameworkExecutor.Deserialize does not honor serialized value of the SkipReason property.
Not sure if that is intended.
NB we are having a discussion about this issue here: https://youtrack.jetbrains.com/issue/RIDER-49097. I view the ability to run a skipped test manually as really useful. 😀.