New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Event stream formatter #962

Open
wants to merge 11 commits into
base: master
from

Conversation

4 participants
@mattwynne
Member

mattwynne commented Mar 29, 2016

The goal of this ticket is to produce a stream of JSON events that conform to the standardised cucumber event protocol

This will allow cucumber to interoperate with other tools, and ultimately perhaps enable us to use a cross-platform formatter library.

The event protocol is new and emerging, and this PR aims to keep up with that.

@l3pp4rd

This comment has been minimized.

Show comment
Hide comment
@l3pp4rd

l3pp4rd Mar 30, 2016

Member

One more thing to point out, for pretty formatter. We probably need argument list to make them bold. Which should most probably go with StepDefinitionFound event:

{
  "event":"StepDefinitionFound",
  "source_id":"features/simple.feature:3",
  "definition_id": "features/step_definitions/steps.rb:1",
  "arguments": [
    [5, 10],
    [16, 20]
  ]
}

Which could mark positions from - to in step.Text.

Member

l3pp4rd commented Mar 30, 2016

One more thing to point out, for pretty formatter. We probably need argument list to make them bold. Which should most probably go with StepDefinitionFound event:

{
  "event":"StepDefinitionFound",
  "source_id":"features/simple.feature:3",
  "definition_id": "features/step_definitions/steps.rb:1",
  "arguments": [
    [5, 10],
    [16, 20]
  ]
}

Which could mark positions from - to in step.Text.

@aslakhellesoy

This comment has been minimized.

Show comment
Hide comment
@aslakhellesoy

aslakhellesoy Apr 1, 2016

Contributor

@l3pp4rd yes, agree regarding arguments. The offsets must be from the beginning of the line, since the formatter won't know at what column the step text starts (the text that was matched, following the step keyword).

Contributor

aslakhellesoy commented Apr 1, 2016

@l3pp4rd yes, agree regarding arguments. The offsets must be from the beginning of the line, since the formatter won't know at what column the step text starts (the text that was matched, following the step keyword).

@mattwynne mattwynne added this to the 3.0 milestone Sep 2, 2016

mattwynne added some commits Mar 20, 2016

WIP: First sketch of event stream formatter
TODO:

- Tests are failing because of extra "prepare world" in-built test step.
  What should we do with this? We could make the test more flexible, or
try to disable the filter that adds this hook.
- Tests are failing because of the duration added to the event. We could
  turn it off for now, but it's useful data. It would be better to
introduce hack like we did for the test run time, and gsub it to
something predictable.

@mattwynne mattwynne changed the title from WIP: First sketch of event stream formatter to WIP: Event stream formatter Sep 4, 2016

@stale

This comment has been minimized.

Show comment
Hide comment
@stale

stale bot Nov 26, 2017

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.

stale bot commented Nov 26, 2017

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.

@stale stale bot added the Stale label Nov 26, 2017

@aslakhellesoy

This comment has been minimized.

Show comment
Hide comment
@aslakhellesoy

aslakhellesoy Nov 26, 2017

Contributor

@mattwynne do you want to keep this PR open? Should I try to move it forward or do you recommend starting over?

Contributor

aslakhellesoy commented Nov 26, 2017

@mattwynne do you want to keep this PR open? Should I try to move it forward or do you recommend starting over?

@stale stale bot removed the Stale label Nov 26, 2017

@mattwynne

This comment has been minimized.

Show comment
Hide comment
@mattwynne

mattwynne Nov 28, 2017

Member

@aslakhellesoy I think it's practically done. The only criticism I'd have is that it wasn't built test-first - I mostly manually tested it with the electron cucumber-gui spike, though it does (or did) work against the protocol described in cucumber/cucumber#172 (comment) so that was part of testing it too.

I'd have a crack and see if you can stabilise it.

Member

mattwynne commented Nov 28, 2017

@aslakhellesoy I think it's practically done. The only criticism I'd have is that it wasn't built test-first - I mostly manually tested it with the electron cucumber-gui spike, though it does (or did) work against the protocol described in cucumber/cucumber#172 (comment) so that was part of testing it too.

I'd have a crack and see if you can stabilise it.

@aslakhellesoy aslakhellesoy self-assigned this Nov 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment