Specflow Is there a way to control the background so that it runs only for certain scenarios in a function?

I have a Specflow.feature file containing several scripts.

In most scenarios, the background file is used in the function file. However, for one scenario, this background is not required.

How can I stop the background from starting for this particular scenario without having to move it to a separate function?

+4
source share
1 answer

I do not think that's possible. Options I can think of:

  • Move the code from the background to the step definition and call it explicitly in each script that it needs.
  • ,

, , , . , ,

+4

Source: https://habr.com/ru/post/1609460/


All Articles