Closed hawisback closed 3 years ago
I created a small repro project, but sadly I was not able to reproduce this with the latest SpecFlow and SpecFlow+ Runner. It would be helpful, if you could send us a small repro project.
We could then try the test category filters locally, e.g.:
vstest.console.exe "C:\Temp\TestProject\bin\Debug\Tests.dll" /TestCaseFilter:"TestCategory!=Manual"
Also, can you please share your package versions with us? Do you have an srprofile for the Runner? If yes, it could be helpful if you share that too with us.
Closed because of inactivity
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Test Filter Criteria does not exclude tests when run in pipeline.
SpecFlow Version:
Used Test Runner
Version number:
Project Format of the SpecFlow project
packages.config
<PackageReference>
tags.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation
NuGet packageSpecFlowSingleFileGenerator
custom toolVisual Studio Version
Enable SpecFlowSingleFileGenerator Custom Tool
option in Visual Studio extension settingsAre the latest Visual Studio updates installed?
<Major>.<Minor>.<Patch>
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config or content of specflow.json
Repro Project
Cannot share the project as it is hosted on secured server. ### Issue DescriptionMy test build runs perfectly fine and there are no issues with that. When running in pipeline, we are now having to exclude some tests due to some dependencies and we got this "Test filter criteria" option in Task "Visual Studio Test". The Test filter criteria works fine when we use "=" IS EQUAL and executes the tests with traits that satisfy the condition. While the same fails to exclude tests when using "!=" for NOT condition.
Examples: Works fine: “TestCategory=automated” – executes the scenarios marked with @automated
Does not work fine: Expected: “TestCategory!=Manual” – executes the scenarios that are not marked with @Manual Actual: “TestCategory!=Manual” – executes all the scenarios including the ones that are marked with @Manual
Steps to Reproduce
Create a build. Set the Test filter criteria in Visual Studio Test with below filter criteria. TestCategory!=Manual Expected: Executes the scenarios that are not marked with @Manual