-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
update gherkin etc, validate against cck #1318
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
Conversation
TODO implement `transpose`
needed to import @cucumber/messages without error
That all sounds good to me David.
|
And we are green. |
@charlierudolph good to merge? |
Awesome having cck and formatter tests passing! Let me take a look. |
'nanos', | ||
'seconds', | ||
// errors | ||
'message', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we expecting all of these to be excluded long term? I would hope with predictable ids that big block could be fixed. Do you think its worth having an issue to try to drive this list down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree - when I was working against a slightly earlier CDK version I think it was only the testCase
ordering that made the ids not line up.
But cck has changed from using predictable ids to uuids so not sure what the intent is there or where that leaves us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The predictable ids and timestamps are a dead end. The cck no longer uses them.
It's a dead end because various Cucumber implementations emit messages in slightly different order than what fake-cucumber
(the engine behind the cck) emits. It would be too much work to make them all emit in the same order.
So what we opted for instead is a validation mechanism where certain values (ids, timestamps) are not compared. We pair this with smoke tests that send the generated messages through 2 of the most advanced message consumers we have - cucumber-html and json-formatter. If these don't crash and a cursory eye-balling looks OK, we're confident enough that the emitted messages are ok.
Time reporting looks a bit off:
Update: think this is due to the result of a testCase being the worst case step result and using that duration instead of the sum of the steps. I'll work on a fix for this. Update 2 pushed fix:
Timing still seems a bit off though as the timestamps in messages goes up to 34 (I'm guessing difference between pure user code and some cucumber overhead but not sure) |
Will hit merge on this in the morning if no other issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo! Thanks for all your work on this @davidjgoss
More or less copied the approach from cucumber-jvm.
To run:
(Or, run
compatibility/cck_spec.ts
from your IDE.)Done:
World
andIWorldOptions
in public APIlog
function to the World which attaches text with the cucumber log media typeDataTable
Meta
message at start of run - fixes Emit a Meta message at the beginning of the run. #1310timestamp
on various messagesstepMatchArgumentsLists
are now being emitted withintestCase.testSteps
pickleAccepted
andpickleRejected
messages are now not emittedtestCaseFinished.testResult
is now not emitted (see Move or removewill_be_retried
fromTestStepResult
common#902)testRunFinished.success
is now not emittedQuestions:
testCase
messages per CCK fixtures should be emitted together at start of run, rather than before each test case is started (non-trivial refactor - do we need this right away?)