Specflow: Question: How to execute specflow scenario using dotnet test command along with multiple filters?

Created on 3 Mar 2020  路  3Comments  路  Source: SpecFlowOSS/SpecFlow

I would like to execute scenario by it's tag and using dotnet test command

@alpha
Scenario: A
@alpha
Scenario: B
@beta
Scenario: C
@gama
Scenario: D

I have four scenarios I would like to run them using

This runs 2 scenario perfectly fine
dotnet test --no-build TestApp.csproj --filter TestCategory=alpha

This says No test matches the given testcase filter
dotnet test --no-build TestApp.csproj --filter "CategoryAttribute=alpha&CategoryAttribute=beta"

Does anyone has experience to run specflow scenarios along with dotnet test CLI?

Most helpful comment

All 3 comments

Filter and syntax was wrong. Below is correct command to run specflow nunit test with dotnet test CLI.

dotnet test --no-build TestApp.csproj --filter "(TestCategory=alpha | TestCategory=beta)"

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.

Was this page helpful?
0 / 5 - 0 ratings