cucumber-attic / cucumber-engine

Shared go binary that can be used by all language implementations
MIT License
6 stars 0 forks source link

packaging/distribution #4

Open charlierudolph opened 6 years ago

charlierudolph commented 6 years ago

Javascript downloads binary in npm install hook and stores in the user home directory for possible reuse between the languages / multiple projects.

Bundling binaries is a better solution for corporations where downloads can only happen from internal npm/maven/gem repos. In that case could possible do multiple publications for each. Example:

mpkorstanje commented 6 years ago

You can't assume you have write permissions to a home directory, or that there even is a home directory. The latter might happen when cucumber is run in CI system (or for Java in a application server).

For java I think we can assume write permissions to a temporary folder though.

For practical reasons I'd also keep the number of publications limited and only use single delivery method (bundled). This keeps the installation instructions simple.

mattwynne commented 6 years ago

This might need a separate issue, or even be an issue in Cucumber.js but I thought I'd raise it here first.

We realised today that one drawback of using this new architecture will be that cucumber-js can no longer be run in a browser. That makes me a bit sad, and it might actually limit some options for doing in-process testing of SPA apps, or at least make them more complex to implement.

Have you thought about that at all @charlierudolph? I did start wondering about whether we could compile the Go to JavaScript...?!

charlierudolph commented 6 years ago

I was thinking the JS version could come with a tiny node server and browser adapter where the server needs to be started first and the browser adapter uses it to orchestrate the test run as it runs the step definitions in the browser. With phantomjs / jsdom and node, I don't see a great reason why people need to run cucumber-js in a browser anymore

aslakhellesoy commented 6 years ago

I don't think it's very common to run Cucumber in the browser. I don't really see it as necessary either. If you want to test DOM stuff you can use Cucumber-Electron. It's a lot more convenient as it lets you keep feature files in files rather than the HTML, and you don't have to do all that jiggery pokery to run it inside a browser.