Filter by category for NUnit MSBuild tasks?

I am creating an MSBuild project to run some NUnit test using the MSBuild Community Tasks Project .

With these settings, I can run NUnit tests:

<Target Name="Test" DependsOnTargets="Build"> <CreateItem Include="$(ProjectTestDir)\$(ClassLibraryOutputDirectory)\*.Tests.dll"> <Output TaskParameter="Include" ItemName="TestAssembly" /> </CreateItem> <NUnit Assemblies="@(TestAssembly)" /> </Target> 

... but how can I run only certain tests - say, those that have a certain category? We added different categories to our tests - some of them ran all the time, some of them worked only in nightly builds, etc.

I donโ€™t see any settings allowing me to filter this, or am I missing something? Are some of you faced with this problem and somehow decided? He should not use this msbuild community task project.

+3
source share
1 answer

Looking in CHM, is there a IncludeCategory property ... similar to what you are looking for? (The CHM file is installed in C: \ Program Files (x86) \ MSBuild \ MSBuildCommunityTasks)

+4
source

Source: https://habr.com/ru/post/1482896/


All Articles