visualstudio.xunit icon indicating copy to clipboard operation
visualstudio.xunit copied to clipboard

SkipReason is not deserialized for XunitSkippedDataRowTestCase

Open estrizhok opened this issue 5 years ago • 1 comments

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.

estrizhok avatar Aug 14 '20 12:08 estrizhok

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. 😀.

markm77 avatar Aug 14 '20 12:08 markm77