cucumber / cucumber/pretty-formatter
Test output gets mixed up when run in parallel
- Dominant language
- Java
- Stars
- 4
- Forks
- 0
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 4
Description
_This issue was initially reported in `cucumber/cucumber-js` as https://github.com/cucumber/cucumber-js/issues/1949. See discussion there why it was moved here._
### 👓 What did you see?
When tests are run with `--parallel` flag, the output (for example, steps description) gets mixed.
When run without `--parallel` option:

With `--parallel` you can see that scenarios (and steps) are printed as they come from different workers and get mixed:

### ✅ What did you expect to see?
I would expect that each Scenario (or entire Feature, so could be multiple scenarios) would be printed as a whole, one after another.
### 📦 Which version are you using?
```
"@cucumber/cucumber": "^7.3.2",
"@cucumber/pretty-formatter": "^1.0.0-alpha.1",
```
### 🔬 How could we reproduce it?
I'm coming from [Scramjet](https://github.com/scramjetorg/) and we are using Cucumber for running BDD tests in multiple repos. The screenshots are based on tests from https://github.com/scramjetorg/transform-hub. You can reproduce it by running tests from this repo:
```
git clone https://github.com/scramjetorg/transform-hub.git
cd transform-hub
yarn install && yarn build:all
yarn test:bdd-ci --name="E2E" --parallel 4
```
Please keep in mind you may need some stuff from [setup steps](https://github.com/scramjetorg/transform-hub#installation-clamp) too.
### 🤔 Anything else?
I'm happy to provide more details/context if needed.
Contributor guide
Research direction
Reproduce the issue by cloning scramjetorg/transform-hub and running yarn test:bdd-ci --name="E2E" --parallel 4, after the listed install and build commands. Compare parallel output with the non-parallel example; done means each Scenario or Feature is printed as a whole without steps from different workers being mixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100