nunit / nunit3-vs-adapter

NUnit 3.0 Visual Studio test adapter for use under VS 2012 or later
https://nunit.org
MIT License
203 stars 105 forks source link

Add partition filter parsing to the adapter #1138

Closed stevenaw closed 2 months ago

stevenaw commented 10 months ago

We added partitioning to the framework in https://github.com/nunit/nunit/issues/4391

https://github.com/nunit/nunit/blob/6fa2c0cc21c08e2b229c248b1af228e4596f4e71/src/NUnitFramework/framework/Internal/TestFilter.cs#L191-L193

Parsing support was added to the console in https://github.com/nunit/nunit-console/pull/1346

@OsirisTerje noted that we need to add parsing support in the adapter as well https://github.com/nunit/nunit/issues/4391#issuecomment-1763468866

OsirisTerje commented 10 months ago

@plasma Do you want to grab this one too?

chris-smith-zocdoc commented 4 months ago

@OsirisTerje I may have some bandwidth to take this, can you point me at the correct file I should be looking at?

chris-smith-zocdoc commented 4 months ago

@OsirisTerje I took a look at this, and it appears to already work with the latest master/pre-release version on myget.

<PackageReference Include="NUnit3TestAdapter" Version="5.0.0-beta.2" />

I see the partitioning working when I run it like this

dotnet test -v:n -- NUnit.Where='partition==2/2' NUnit.Verbosity=5

Is there somewhere I can track for the 5.0.0 release? I'll see if we're able to use the myget version until its published on nuget

chris-smith-zocdoc commented 4 months ago

It does look like the partition isn't passed directly though though, the test discovery appears to transform it into

<filter><or><test>one</test><test>two</test></or></filter>

which isn't ideal