I had the idea that when tests had a Task
attribute, one could specify a filter on the command line to run a subset of tasks, but that doesn’t seem to be the case.
To be specific, given a test like this:
[<Fact>]
[<Task(1)>]
let ``New list``() =
let expected: string list = []
newList |> should equal expected
The command
dotnet test --filter "Task = 1"
should only run tests that have that attribute. The documentation seems to support this, but it isn’t working for me:
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
No test matches the given testcase filter `Task = 1` in C:\Users\bozo\Exercism\fsharp\tracks-on-tracks-on-tracks\bin\Debug\net7.0\TracksOnTracksOnTracks.dll
The issue isn’t limited to the Tracks On Tracks On Tracks
exercise, and isn’t related to tests that are marked to be skipped.
Am I doing something wrong?