JBehave - large number of steps in a scenario, due to preconditions and pre-steps



  • I'm having a scenario which consists of around 500 steps.

    About 490 steps out of the it are preconditions and steps that needs to be done, in order to come to a state where the actual acceptance (last 10 steps) can be done.

    Is it really bad to have a large number of steps inside a single scenario. Is there a better approach where I can keep the original scenario bit clean and separate the preconditions.



  • Just found out a tailor made solution for these kind of situations, from JBehave documentation.

    "To help the user better manager more complex scenarios, JBehave allow the specification of entire stories as a pre-requisite for another story or scenario."

    https://jbehave.org/reference/latest/given-stories.html



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2