cucumber / react-components

React components for Cucumber
MIT License
31 stars 10 forks source link

add timeline visualisation for parallel runners #126

Open aslakhellesoy opened 4 years ago

aslakhellesoy commented 4 years ago

We're in the process of removing tight coupling to Gherkin 5 from Cucumber-JVM. Its TimelineFormatter is tightly coupled to Gherkin 5, and should be removed.

Moreover, the very useful functionality in TimelineFormatter should be available to users of other Cucumber implementations that support parallelism (currently only Cucumber.js).

We already have early stage support for rendering Cucumber in [cucumber-react](), which is wrapped as a standalone command-line tool in html-formatter. It would make sense to improve cucumber-react with the ability to render the same UI as the Cucumber-JVM TimelineFormatter (using React).

Also see cucumber/common#755

/cc @charlierudolph @boaty82 @mpkorstanje @vincent-psarga

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

davidjgoss commented 8 months ago

Do we have any screenshots that show what the timeline formatter did?

mpkorstanje commented 8 months ago

Sure. The purpose of the timeline is to show which thread/worker executed a scenario. This is helpful when analyzing the performance of parallel execution.

I put some 60-70 tests into a single file and ran it parallel with a random delay in one of the steps.

Feature: Belly

  Scenario: a few cukes 1
    Given I have 42 cukes in my belly
    When I wait 1 hour
    Then my belly should growl

    ... repeat lots

Screenshot from 2023-11-11 13-46-24

The thread name can be derived from the TestCaseStarted.workerId event.

Relevant sources:

davidjgoss commented 8 months ago

Thanks @mpkorstanje, yeah we could totally do this with the messages now.