SpecFlow.Actions icon indicating copy to clipboard operation
SpecFlow.Actions copied to clipboard

Don't run tests on specific Targets Specflow.Actions.Browserstack

Open rightmax1234 opened this issue 2 years ago • 2 comments

Hi Guys,

I've got around 50 tests at the moment and we've just had to add another which can only be ran on a mobile device but we will want to run it on the same test run as all the other tests, as one whole run. But if we did that now, it would automatically run against the desktop browsers as we have multiple json config files, is there any way to maybe add a tag to the scenario like @ONLY_MOBILE or another way of specifying which targets a test can be run against.

Thanks in advance.

rightmax1234 avatar Jun 06 '22 11:06 rightmax1234

You can use the CurrentTargetIdentifier.Name property to know which target is executed at the moment: https://github.com/SpecFlowOSS/SpecFlow.Actions/blob/main/Plugins/SpecFlow.Actions.Configuration/SpecFlow.Actions.Configuration/CurrentTargetIdentifier.cs#L33

SabotageAndi avatar Jun 08 '22 08:06 SabotageAndi

I can't find in documentation how to set target for given test run. I have found thet target are avaible only specflow test runner. Are there also avaible on xunit or nutnit runners?

msz13 avatar Sep 03 '22 19:09 msz13