Skip to main content

[Specflow+ runner] - Can we exclude specific tags/tests to be executed in parallel execution

Comments

3 comments

  • Andreas Willich

    https://docs.specflow.org/projects/specflow/en/latest/Installation/Configuration.html#generator

    Configuration value: addNonParallelizableMarkerForTags

    Example:

    {
      "generator": {
        "addNonParallelizableMarkerForTags": [ "notParallel" ]
      }
    }

    The tag has to be at the feature level.

    1
  • Liam Harries

    The "addNonParallelizableMarkerForTags" option looks like the better solution however if you need to do it at a scenario level you can use thread affinity

    <TestThreads>
        <TestThread id="0">
          <TestAffinity>@Sequential | !@Sequential| testpath:Target:*Edge*</TestAffinity>
        </TestThread>
        <TestThread id="1">
          <TestAffinity>!@Sequential &amp; !testpath:Target:*Edge*</TestAffinity>
        </TestThread>
        <TestThread id="2">
          <TestAffinity>!@Sequential &amp; !testpath:Target:*Edge*</TestAffinity>
        </TestThread>
        <TestThread id="3">
          <TestAffinity>!@Sequential &amp; !testpath:Target:*Edge*</TestAffinity>
        </TestThread>
      </TestThreads>

    It works at feature and scenario level however the downside with this is you can't quickly change the number of threads because you have to have an entry for each thread, different people having different spec machines etc can't just adjust one number.

     

    0
  • Andreas Willich

    Ah, I oversaw the SpecFlow+ Runner tag. My answer only works for xUnit, NUnit and MSTest.

    Yes, this configuration is possible. But be aware, that we stopped the maintenance of the SpecFlow+ Runner over half a year ago.

    0

Please sign in to leave a comment.

Powered by Zendesk