Skip to content

Unable to filter benchmarks with TestAdapter #2662

Open
@olstakh

Description

@olstakh

Steps to reproduce

  1. Follow https://benchmarkdotnet.org/articles/features/vstest.html (console project + TestAdapter package + Test.Sdk)
  2. Define 2 benchmarks with different [BenchmarkCategory("MyTest1")] and [BenchmarkCategory("MyTest2")] attributes
  3. Run dotnet test -c Release --filter "Category=MyTest1"

Expected: 1 benchmark executed (category attribute is being added as a trait )

Actual: both benchmarks executed

Also [unrelated] - are these benchmarks supposed to show up in Test Explorer in VS? I'd assume they would, since dotnet test picks them up

0.14.0 version of TestAdapter is used

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions