Skip to main content

[SpecFlow.xUnit] Add a possibility to parallelize tests per scenario by reassigning all test cases to a new collection



  • Micah Rairdon

    I've dug into this as well. It seems all we'd have to do is copy this class into the specflow xUnit plugin and make this line use it instead of the built-in test class runner.

  • Marcin Osiadacz

    Micah Rairdon were you able to somehow do it locally and test if this works? 

  • Micah Rairdon

    I got something close in the xUnit provider but it's actually blocked by the way SpecFlow is currently architected.

    It's possible they may enable parallelization in SpecFlow v4 but until then you can't even parallelize in unit.


    Check out this summary issue on the topic:

    Until then, the solution some people are using (I haven't tried this out myself) is to split your feature files into being one scenario per feature file programmatically in the CI pipeline. Not very pretty but it does enable full parallelization. There's a mention of the solution in the GitHub issue linked above.


Please sign in to leave a comment.

Powered by Zendesk