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
add global hooks #102
base: main
Are you sure you want to change the base?
add global hooks #102
Conversation
A bit of a chicken and egg problem with the perl tests here - they rely on the current published version of the CCK, whose messages don't include the new field, which is causing the failure. Any thoughts on how to address this @ehuelsmann? |
@ciaranmcnulty looks like the acceptance tests against the CCK are not invoked for PHP:
|
@davidjgoss looking at the test I think we can change them a little so. So instead of comparing the round trip Though I think it would be even better to include a |
@@ -36,6 +39,10 @@ public java.util.List<TestStep> getTestSteps() { | |||
return testSteps; | |||
} | |||
|
|||
public Optional<String> getTestRunStartedId() { | |||
return Optional.ofNullable(testRunStartedId); |
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.
What is the rationale for making the field optional? I don't think there is a sensible behavior for a consumer that needs this field when it is absent.
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.
If we make it required now, the new code will be immediately incompatible with messages generated from the old code. This means e.g. we'd need to wait for all implementations to add this before we could use the new messages version in formatters.
If we're fine with that then I'm happy to change. But it seemed better to add it as optional, and maybe circle back and make it required down the line once it's established everywhere.
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.
Okay, that's acceptable. Can you make a ticket so we won't forget to make it required?
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.
Done #113
🤔 What's changed?
id
toTestRunStarted
so that the corresponding finish event, test cases and global hooks can be tied back to itTestStepResult
into its own file⚡️ What's your motivation?
Per #66 we want to represent global hooks in the messages, because currently if they fail (thus causing the test run to fail) they aren't visible in reporting.
Putting an
id
onTestRunStarted
is an approach we've discussed before and roughly agreed on in the context of global attachments per cucumber/cucumber-js#1394 (comment) - this PR doesn't address the attachments problem directly, but does lay the groundwork for it, and also means it starts to look more possible to have multiple test runs in the same stream of messages and be able to differentiate them. Note that Gherkin messages and support code aren't linked to a test run because they can be reused - it'sTestCase
that has the link.🏷️ What kind of change is this?
id
is required onTestRunStarted
)📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.