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

XUnit can't skip theory tests correctly

Open Cosifne opened this issue 5 years ago • 3 comments

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: image

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: image

Cosifne avatar Mar 29 '19 00:03 Cosifne

With the .NET Framework console runner:

image

With dotnet test --filter:

image

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.

bradwilson avatar Apr 02 '19 22:04 bradwilson

This bug still exists, will it be fixed in the near future?

DerHulk avatar Feb 05 '20 21:02 DerHulk

@bradwilson Duplicate of https://github.com/xunit/xunit/issues/1782

jzabroski avatar Aug 19 '20 18:08 jzabroski

Closing as duplicate.

bradwilson avatar May 26 '23 07:05 bradwilson