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

Cannot run XUnit Tests in non-English VS with xunit.runner.visualstudio 2.4.3

Open y87feng opened this issue 2 years ago • 1 comments

Steps to reproduce: Prepare ENU(English) OS, install VS language packs(Turkish, Chinese) and apply

1.Create a class library(FX 4.8) 2.Add NuGet package reference to xunit, xunit.runner.visualstudio (test adapter) 3.Add code in code editor

        [Fact]
        public void TestMethod1()
        {
            Assert.Equal(1, 1);
        }

This is the settings in csproj file: image

  1. Run Test

Expected Result: Test should run passed in TE

Actual Result: Test cannot be discovered

Image:

image

Note:

  1. It's not repro on English VS

  2. When downgrade xunit.runner.visualstudio from version 2.4.3 to 2.4.1, it works, looks like a regression

y87feng avatar Sep 16 '22 21:09 y87feng

Repros on Russial language for me as well. Please fix ASAP

DoctorKrolic avatar Sep 23 '22 19:09 DoctorKrolic

I had a problem in my environment that may have the same cause.

In my case, when Visual Studio version 17.3.x, xunit.runner.visualstudio version 2.4.3 had no problem. Immediately after updating Visual Studio to 17.4, tests for test projects with .NET Frawmework selected as the target framework cannot be run from the TestExplorer.

This problem is resolved by lowering the version of xunit.runner.visualstudio to 2.4.1.

My OS and Visual Studio language is Japanese.

benutomo-dev avatar Nov 10 '22 04:11 benutomo-dev

I've observed the same issue on a german installation. A rollback to 2.4.1 solved the issue.

NecatiMeral avatar Nov 10 '22 09:11 NecatiMeral

Can confirm that this regression (which cost me 2 days of tearing out my hair) happens with VS 2022 17.4.0 German. Going back to 2.4.1 made VS run the tests again.

martinmueller4voice avatar Nov 21 '22 12:11 martinmueller4voice

Is this still reproducible on version 2.4.5?

bradwilson avatar May 20 '23 23:05 bradwilson

For my part, I can no longer reproduce the problem. Neither with version 2.4.5, nor with previous versions.

lorcQc avatar Jul 10 '23 20:07 lorcQc

Thanks, I'll close the issue then.

bradwilson avatar Jul 10 '23 20:07 bradwilson