cucumber icon indicating copy to clipboard operation
cucumber copied to clipboard

Running files consecutively

Open Propfend opened this issue 8 months ago • 2 comments

is there some easy way to run the files synchronously? im running acceptance tests and they are stateful. I want something like .max_concurrent_scenarios(1) but for files.

Propfend avatar Apr 14 '25 21:04 Propfend

We have multiple ways of achieving serial execution of scenarios:

  1. @serial tag оn features/scenarios
  2. --concurrency CLI option
  3. max_concurrent_scenarios() builder option

Or are you trying to achieve serial execution between multiple feature files, while concurrently executing scenarios inside those features?

ilslv avatar Apr 15 '25 08:04 ilslv

Or are you trying to achieve serial execution between multiple feature files

Yes.

while concurrently executing scenarios inside those features?

No.

i want serial execution between scnearions and files, we can have scenarios serial execution with max_concurrent_scenarios(), but the scenarios of different files are still running asynchronously.

  • @serial and max_concurrent_scenarios() work for scenarios in the same file, i want something which works for scenarios in different files.
  • I cant use flags like --concurrency, my binary has clap and tries to interpret those args.

Also i have another problem because i have same Given steps in different feature files, and regex ambiguity happens along with stuff like this:

   ✘  Scenario's Before hook failed src/tests/integration/features/balancer.feature:3:5 
Captured output: Setup Failed: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })

Propfend avatar Apr 15 '25 16:04 Propfend