cucumber / cucumber/pretty-formatter

Test output gets mixed up when run in parallel

Open
#8 12 comments 5 reactions 0 assignees View on GitHub
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:

![image](https://user-images.githubusercontent.com/1061942/156401378-2cb3d9e0-292e-4796-a694-907b0064afab.png)

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

![image](https://user-images.githubusercontent.com/1061942/156401591-b4416dde-1cd5-4cc0-b5ac-61f9f0aebf77.png)

### ✅ 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.