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

Remove browser example #1437

Closed
aslakhellesoy opened this issue Sep 14, 2020 · 13 comments · Fixed by #1508
Closed

Remove browser example #1437

aslakhellesoy opened this issue Sep 14, 2020 · 13 comments · Fixed by #1508

Comments

@aslakhellesoy
Copy link
Contributor

I'm about to make a release, and the release instructions tell me I should verify that the browser example works. I'm struggling to make it work, and I doubt many people are using it. I would like to remove it. It's too much to maintain and I don't see the value in it.

@davidjgoss
Copy link
Contributor

To be honest I’ve wondered for a while what the use case is for running cucumber in the browser rather than in Node (aside from the kind of interactive demo the browser example gives)

@aslakhellesoy
Copy link
Contributor Author

I think it was a pipe dream @jbpros had 10 years ago that never came to fruition :-)

@jbpros
Copy link
Member

jbpros commented Sep 14, 2020

Not true! ;) One use case was at the BBC, we embedded a suite run on a USB stick to run on smart TVs. The whole thing was running on the browser and sending results back through XHR! Amazing tech ;)

It was also to align with jasmine in-browser runners and other similar approaches, back in the day...

Anyway, now that we have cucumber-electron and how things have matured generally, I think we can stop supporting this!

@deepziem
Copy link
Contributor

deepziem commented Sep 14, 2020

@jbpros Here are my thoughts .. if you need electron based cucumber / web testing [ browser ?] to be faster then they need to have core javascript replacing the selenium API's. was there/is there a library that can give a testing framework? [ Ie in your example were they testing web app ? and were they using core javascript?]

Else you still need the element based actions that selenium provides and it will back to same speed right ?

@vytch
Copy link

vytch commented Oct 9, 2020

Hi, I was really interested in that browser example. I am trying to make it work also and it might not be working with the current version of cucumber.

For example the example code does not match the current typescript definition.

Would it be ok to update the example to reflect the current type definition?

Thanks

Vy

@davidjgoss
Copy link
Contributor

@vytch whats your use case for running cucumber in the browser vs in node?

@vytch
Copy link

vytch commented Oct 9, 2020

@davidjgoss I wanted to write a chrome extension.

@jbpros
Copy link
Member

jbpros commented Oct 12, 2020

@deepziem the DOM API is all you need, really. Now if you want so more declarative/expressive API, there are several tools out there. browser-monkey is one of them.

@jbpros
Copy link
Member

jbpros commented Oct 12, 2020

@vytch what did you want the chrome extension to do?

@vytch
Copy link

vytch commented Oct 12, 2020

Hi,
I am writing a chrome extension to help doing accessibility testing using a chrome extension.
The chrome extension runs a test suite, similar to a classic end-to-end test and run axe when the dom changes.
I have done that already and I am happy with the result.

One feature I wanted to add is Gherkin support. Because I wanted to hand that tool over to people with little programming skills. Also because I quite like Gherkin.

What I need from cucumber-js is pretty much what that browser example does:

  • parse the Gherkin code (from a text-area)
  • matching that against the step definition (in-build in the extension)
  • run the test
  • collect the result

I am struggling to re-use the example. I just need some guidance on the minimum I need to do the above.
One thing I wish I had is a bit of explanations on how the example is put together:

  • Cucumber.formatterHelpers
  • Cucumber.parseGherkinMessageStream

Why do I need a stream for a formatter, and why the example does not need one?

Btw I am happy to help with documentation if that's helpful.

@vytch
Copy link

vytch commented Oct 14, 2020

Hi,

Thank you for your replies, I ended up working with gherk which is more suitable to my needs.

Thanks

@davidjgoss
Copy link
Contributor

@charlierudolph @aslakhellesoy what do we think on this? Pre 7.0.0 would be a good time to do it if we're going to.

@charlierudolph
Copy link
Member

I'm good removing it. I think the main use case was just to give a demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants