Filtering tests based on browsers in NUNIT

1.Test Explorer (Able to run single browser test)

TestClass: SampleClass Test Fixture: Tests("chrome), Tests("edge"), Tests("chromeheadless") ( i can run this in test explorer seperately) Tests: SampleMethod(parameter1,parameter2,parameter3..parameter40)

  1. CommandPrompt(Not able to trigger single browser test)

dotnet test SampleProject.dll --tests SampleClass.Tests("chrome").SampleMethod (This is running all the browser mentioned in the fixture, I want to run only single browser)

I tried multiple combinations using filter not able to run it. I can run the test method but it runs the single method on all browsers.

For more explanation: Our tests require the browser change should happen from config.json so that we can select if we want to run chrome or edge or Firefox. I am getting the browser dynamically so when i run the tests using console with the following command

dotnet test SampleProject.dll --filter SampleMethodSampleMethod

It runs for whatever browsers listed in config file, if I list chrome and edge it runs chrome and edge. But I want to run single chrome or edge browser tests? So I was asking if there is any possibility?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum