-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Description
Description
In version 2.2.3 there is a regression (compared to 2.1.2) for this code:
[TestClass]
public sealed class MyTestClass : MyTestClassBase
{
[TestMethod]
[TestCategory("MyTests")]
public new void TestSomething()
{
base.TestSomething();
}
}
public abstract class MyTestClassBase
{
protected void TestSomething()
{
// Do something
}
}Executing this via:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "MyTests.dll" /TestCaseFilter:"TestCategory=MyTests"
Leads to this error (I had to manually translate it because the error is in German on my machine):
Exception in call of Executor "executor://mstestadapter/v2": The sequence contains more than one element.
This does not happen in version 2.1.2.
Steps to reproduce
- Create a modern-SDK test project
- Select
net48as target framework - Add code above
- Reference NuGet packages like this:
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
Run the tests via vstest.console (like shown above).
Expected behavior
There should be no exception.
Actual behavior
The exception above is thrown.
Environment
- Windows 10
- Visual Studio 2019 16.7.12
- vstest.console 16.7.0
Metadata
Metadata
Assignees
Labels
No labels