-
Notifications
You must be signed in to change notification settings - Fork 754
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
Summary issue to fix Parallel Execution on Scenario-Level #2225
Comments
Are the docs incorrect when stating that Specflow+Runner can run scenarios in parallel? Understand this is hard, but I'm now having to decide between either single scenario per feature or not using specflow. |
@JontyMC No, docs are correct. This issue was wrong. |
I believe it's easy implementation. I just tried to play within modifying auto-generated code in nunit provider, and discovered that it's achievable. There is only one problem we should resolve: |
I am always happy to review PRs. |
Hi there, since SpecFlow+ Runner end of support the problem of executing tests within one feature in parallel becomes more urgent. Unfortunately non of the exciting test runners doesn't support scenario level parallelization. Could you please give some update is there any plans to implement such functionality for n/xUnit test runners? TEMPORARY SOLUTION |
@VitaliiDolotov - Is it possible to share the powershell script you have created to achieve this. Thanks in advance. |
Hi @JagadeesanV, here is the example of the script. Hope it will help you $code = @" namespace App
} Add-Type -TypeDefinition $code -Language CSharp |
Any movement on this please? we are stuck between using a supported product with slower execution times or sticking to specrun+ which wont be suitable in the longer term. |
@savagerob No movement currently and planned to do. This would need a major part of SpecFlow changed and we are only a small team. This is out of scope for us at the moment. |
Throwing out my support/need for scenario level parallel execution. This is quickly becoming a problem for us from an execution time perspective. |
Any chance this will make it in the upcoming SpecFlow v4 release? Still have a very large need for this on our end. |
This is our team's biggest need. We're currently having to split feature files in to multiple parts just so we can utilize all machines/threads in the Selenium Grid. It's not a very clean way to design a test suite. We need scenarios in a single feature file to be able to run parallel. We're all hoping this will be added in the next release. |
Yep, would like to see this in SF v4. |
Same from us as well. |
This might be a relevant note for tackling this in xUnit: PR to use as reference: #2711 *NOTE: It runs into the same problems described here with state. Included only to show that scenario level parallelization should be doable on all three runners. |
My take on the feature file splitting @VitaliiDolotov introduced. This puts each scenario into its folder so they can keep the same feature name. https://gist.github.com/Tiberriver256/9ff2bf300873f70ff499255706743201 |
Hi @SabotageAndi, Any update on this? |
@sampath-ganesan Sorry, I can't help you. I don't work for Tricentis and SpecFlow anymore. |
What get's executed parallel: multiple Scenarios in one Feature file
This mode of execution doesn't work with SpecFlow at the moment.
Reason:
In the generated code-behind classes we are saving the TestRunner in a static field. The TestRunner is currently "pinned" to a thread. The TestRunner is responsible for executing the Before/After Feature Hooks.
Having this static field is a problem when it is called via multiple threads.
So the whole state management of SpecFlow has to be rethink when we want to change this.
One challenge is, that there are different behaviors in the unit test runner. E.g. NUnit uses the same instance on multiple threads, as the others create an instance per thread.
Supporting Test Runners:
Known Issues:
Open Questions:
The text was updated successfully, but these errors were encountered: