unit testing - Cucumber Order of Execution - Ruby -


is there way specify order of execution inside cucumber? example, rather running cucumber feature/foo/foo.feature feature/foo/bar.feature have execute in order... want run bundle exec cucumber , run in specified order.

i know features/scenarios should independent of each other current tests i'm running it's not practical. if there no "official way" (which seems case) recommend design implement such functionality?

copying own answer here:

as mentioned here, cucumber scenarios should not dependent on each other.

according cucumber best practices, there shouldn’t sort of coupling between scenarios. or in other words, there should no state persists between scenarios.

just example why bad practice consider case when 1 scenario step adds record database, while subsequent scenarios depend on existence of record. may work, create problem if order in scenarios run changes, or run in parallel.

try review approach , see how can define scenarios differently avoid coupling. luck.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -