NUNIT3-CONSOLE exclude specific test category
Asked Answered
N

2

6

The old NUnit 2 console runner had an /exclude parameter to exclude tests with a specific Category attribute. Does anybody know if the console runner of NUnit3 supports this feature?

.\nunit3-console.exe --help doesn't state an exclude parameter. I only can see a Where parameter, can it be used for this purpose?

Nonsectarian answered 6/11, 2017 at 6:36 Comment(0)
N
6

The description of the selection language can be found under this link. Based on that it should be possible to exclude a category via --where "cat != YourCategoryToExclude".

Nonsectarian answered 7/11, 2017 at 13:27 Comment(0)
M
0

If you are using MSBuildTasks you can specify the same Where statement. For example:

<NUnit3 Assemblies="@(NUnitIntegrationAssemblies)" 
ToolPath="$(NUnitRepositoryDir)" 
OutputXmlFile="$(MSBuildStartupDirectory)\Tools\Log\NUnit.xml" 
Where="cat != DatabaseContentDependent" 
Framework="v4.0.30319" />
Multilingual answered 9/4, 2020 at 12:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.