visualstudio.xunit
visualstudio.xunit copied to clipboard
XUnit can't skip theory tests correctly
XUnit tests seems like can't skip test correctlly for theory tests. Example:
using System;
using Xunit;
namespace XUnitTestProject2
{
public class UnitTest1
{
[InlineData(true)]
[InlineData(false, Skip = "Skip")]
[InlineData(null, Skip = "Skip")]
[Theory]
public void Test1(bool? flag)
{
Assert.True(flag);
}
}
}
Screenshot by using command line:
Screenshot by using Visual Studio (15.9.6)
Turn off Source Based Test Discovery in Options panel first, then select the test in Test Explorer and run it by right click:
With the .NET Framework console runner:
With dotnet test --filter
:
Seems like there's something amiss with the VSTest adapter, so I'm going to send this bug over for Oren to take a peek at.
This bug still exists, will it be fixed in the near future?
@bradwilson Duplicate of https://github.com/xunit/xunit/issues/1782
Closing as duplicate.