-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
shared binary #221
Comments
Thanks for bringing this up @charlierudolph! Inthink this would be a great topic for discussion at Cukenspace (preferrably Sunday as I'm busy Saturday). I have a lot of ideas that are similar to yours and I'll dump them here when I find time, hopefully before cukenspace. |
Neither Cucumber-Ruby not Cucumber-JVM have built in support for parallel execution, but there are third solutions for achieving that (parallel_cucumber, cucumber-jvm-parallel-plugin). In that direction, I have imagined what massive parallel execution on a computing grid could look like. We already have the Pickle abstraction and the Gherkin to Pickle compiler implemented in several languages, so it seems natural to use that as a foundation. I imagine a central controller dispatching Pickles Events to the different executors in the computing grid, the executors creates Test Cases from the Pickles, executes them and pass back a Test Case Result Event. In a more detailed view I imagine that an executor is generating (the normal) Test Case Started/Finished, and Test Step Started/Finished Events, but over the network they are compressed to a Test Case Result Event, from which the original events can be recreated on the controller side.
This way less events will be sent over the network (which may or may not be important), and formatters listening to event of the controller have the events from test case execution serialized which definitely simplify their implementation. With this structure it would be possible to
|
Cucumber is a good library connect tester and developer. I dont like gauge because it can not embed in source code.it's not friendly for developer. |
Some brief thoughts from me to share before we get to talk about this face-to-face.
I think I'd like to see us figure out where the seams are, and think about budding off smaller pieces, like a console formatter binary/ies that takes a stream of results NJSON and emits a stream of text, or a runtime binary that takes a stream of pickles as input, calls step definitions and emits results NDJSON. To me, building smaller, compose-able pieces like this would be a less risky approach. Gradually hollowing out the individual implementations, rather than trying to replace them in one go. |
I'm was thinking of hosting the binaries on github attached to releases (example). The individual libraries can pack the binaries with their source code if they like. I was against that to start because it means a user has the binaries for all supported os on their machine when they only need one. Pulling the binary can be done during the install process where possible or it can be pulled down and cached locally on first run. Attempting to split this large binary into smaller pieces I think we could potentially break it into the following:
The first is mostly extracted with the gherkin library but requires implementations in every language and we could shave that down to 1. After implementing the event protocol on cucumber-js, a lot of logic moved into the formatter as that was the only place that needed it. |
Yeah the interesting part of this will be building the pick-runner binary. |
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. |
This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective. |
@charlierudolph shall we open this issue again? Want to join the Slack discussion? https://cucumberbdd.slack.com/archives/C62D0FK0E/p1520406289000034 |
This is currently in progress over at https://github.com/cucumber/cucumber-pickle-runner /cc @mpkorstanje |
Currently, the pickle runner binary is a WIP I will be experimenting with on cucumber-js, once it gets to a workable state. I am happy to get feedback if the current api is not sufficient for a particular implementation. |
I'm closing this as cucumber-engine is now a thing. Please see the roadmap for details about how we'll get there. |
Woohoo! So glad to have this rolling now! |
Big thanks to you @charlierudolph for putting so much momentum behind it! |
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. |
The following is a proposal for how cucumber could be built in the future. There is binary that is responsible for all shared logic (CLI parsing, reading gherkin files, compiling pickles, basic infrastructure running, formatting results). This binary would be written in go or some other language that allows us to compile binaries for each OS. Then there are a series of language specific libraries which use the binary to run tests.
Logic for the language specific libraries:
This is similar to the cucumber wire protocol but built in a way that the ruby dependency is removed and allows language specific code to be the entry point.
I want to spike this out on cucumber-js with the shared binary being written in node for the purposes of the spike. Primary goals would be to pull the language specific code and see how the interface feels.
I’m uncertain how custom formatters / plugins would fit into this but those could potentially be done with a formatter streaming to a named pipe.
Please bring up any issues you can think of. I’m sure there are features in some of the other cucumber flavors that I am unaware of.
The text was updated successfully, but these errors were encountered: