Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSTest 2.2.4+ does not runs tests contained in classes with non alphanumeric characters in the class name #941

Closed
sylvainouel opened this issue Aug 20, 2021 · 2 comments
Assignees
Milestone

Comments

@sylvainouel
Copy link

sylvainouel commented Aug 20, 2021

This works fine with MSTest.TestAdapter and MSTest.TestFramework 2.2.3, but the test is skipped with 2.2.4 or 2.2.5.

module x.TestProject1

open System
open Microsoft.VisualStudio.TestTools.UnitTesting

[<TestClass>]
type ``babette la morue`` () =

    [<TestMethod>]
    member this.TestMethodPassing () =
        Assert.IsTrue(true);

I get the following output from dotnet test:

PS C:\Users\souellet\source\repos\TestProject1> dotnet test
  Determining projects to restore...
  All projects are up-to-date for restore.
  TestProject1 -> C:\Users\souellet\source\repos\TestProject1\bin\Debug\net5.0\TestProject1.dll
Test run for C:\Users\souellet\source\repos\TestProject1\bin\Debug\net5.0\TestProject1.dll (.NETCoreApp,Version=v5.0)
Microsoft (R) Test Execution Command Line Tool Version 16.11.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
  Skipped TestMethodPassing

None     - Failed:     0, Passed:     0, Skipped:     0, Total:     0, Duration: 2 ms - TestProject1.dll (net5.0)
PS C:\Users\souellet\source\repos\TestProject1>

Visual Studio 16.11.1
dotnet --info says:

C:\Windows\System32>dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.400
 Commit:    d61950f9bf

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.400\

Host (useful for support):
  Version: 5.0.9
  Commit:  208e377a53

AB#1642305

@Evangelink
Copy link
Member

I can reproduce the issue. Looks like the space is causing issue.

@Evangelink
Copy link
Member

This is not linked to the test ID generation but was linked to a bug in hierarchy processing. Updating our object model dependency fixed the issue.

I will close the issue and confirm fix will be included in v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants