Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Tests ran in parallel clash with each other #77

Closed
oryz opened this issue Feb 26, 2022 · 4 comments
Closed

Tests ran in parallel clash with each other #77

oryz opened this issue Feb 26, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@oryz
Copy link

oryz commented Feb 26, 2022

Hi there,

We've been playing around with this SpecFlow plugin, and got it to work for us except for one issue: we don't seem to be able to run tests in parallel.

For example, the ScenarioContext gets shared between different scenarios that execute at the same time. Another example is that we'd get a clash in the [ScenarioDependencies] method if we don't put a lock in it.

Is the reason for this related to the limitations described in PR #74?

@mbhoek mbhoek added the question Further information is requested label Feb 26, 2022
@mbhoek
Copy link
Member

mbhoek commented Feb 26, 2022

Hello @oryz, thanks for your question. Before I dive into this, can you please confirm that this is an issue with the plugin and not one of the restrictions of SpecFlow itself? This document describes how SpecFlow handles parallel execution: https://github.com/SpecFlowOSS/SpecFlow/blob/master/docs/Execution/Parallel-Execution.md

Also I know of this SpecFlow issue: SpecFlowOSS/SpecFlow#2225

Again, I'm most happy to dive into your issue but I am aware of SpecFlow itself having problems with parallel execution so that's why I'd like to confirm it. Hope you understand!

@oryz
Copy link
Author

oryz commented Feb 28, 2022

Hi Mark and thanks for the response.

I understand the concern you raise, to be completely clear we have a mature solution in which we could run tests in parallel successfully before adding this plug in (due to a refactor we needed a better dependency injection framework than the SpecFlow built in one).

So the issue is definitely not with SpecFlow itself.

Could you first confirm that we should be able to run tests in parallel?

@mbhoek mbhoek added bug Something isn't working and removed question Further information is requested labels Mar 11, 2022
@mbhoek mbhoek self-assigned this Mar 11, 2022
@mbhoek
Copy link
Member

mbhoek commented Mar 11, 2022

Ok understood. Marked this as a bug and will investigate.

@oryx Sorry for bothering you, but would it be possible to provide an example of what type of parallel tests fail?
The very limited set in this project won't fail, so that makes it hard to look at the problem. Any help would be appreciated!

@oryz
Copy link
Author

oryz commented Oct 26, 2022

Not sure what we've done or changed but it's all working good now so closing this issue.

@oryz oryz closed this as completed Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants