Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rightmax1234 opened this issue Jun 6, 2022 · 2 comments
Open

Comments

@rightmax1234
Copy link

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.

@SabotageAndi
Copy link
Contributor

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

@msz13
Copy link

msz13 commented Sep 3, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants