Skip to content
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

cucumber-messages: add cucumber-implementation to TestRunStarted message #616

Conversation

SabotageAndi
Copy link
Contributor

PR is based on #615

Summary

Ths PR adds a field cucumberImplementation to the TestRunStarted message.
The reason for is, that you know on the receiving end who generated the cucumber-messages.

Motivation and Context

Cucumber-formatters know which cucumber implementation generated the messages.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

@@ -0,0 +1,22 @@
Feature: Sending TestRunStarted messages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this feature file processed? I don't see anything running it in this repo.

I'm not convinced Cucumber is the right tool to test the messages. I'm not even sure the messages need to be "tested" as they have no logic, they are just structs.

@aslakhellesoy
Copy link
Contributor

As a general principle I would like us to adopt a consumer-driven contract mindset when evolving the protocol.

Do we have any consumers of this message yet? If we do, what will the consumer(s) do with the cucumberImplementation information? Are there other things we want to know about, such as version, OS, CPU etc?

@aslakhellesoy
Copy link
Contributor

This assumes that a test run executes all scenarios on the same platform. This would not be the case for a distributed execution with multiple agents. For example, some scenarios could be executed on SpecFlow and others on Cucumber.js.

I think it might make more sense to add this information to the TestCaseStarted message.

Moreover, I wonder if it might make more sense to wrap all metadata about the execution platform:

message TestCaseStarted {
  string pickleId = 1;
  google.protobuf.Timestamp timestamp = 2;
  Platform platform = 3;
}

message Platform {
  // The runner implementation. For example "SpecFlow", "Cucumber-JVM", "Behat" etc.
  string implementation = 1;
  // The version of the runner
  string version = 2;
  // The operating system
  string os = 3;
  // The CPU architecture
  string cpu = 4;
  // More fields here as needed...
}

WDYT?

@aslakhellesoy
Copy link
Contributor

This is superseded by #626

@lock
Copy link

lock bot commented Jun 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants