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

Running Cucumber In the Browser? #2414

Open
robmoffat opened this issue Jul 10, 2024 · 2 comments
Open

Running Cucumber In the Browser? #2414

robmoffat opened this issue Jul 10, 2024 · 2 comments

Comments

@robmoffat
Copy link

🤔 What's the problem you're trying to solve?

Hi,

I am writing a set of conformance tests for FDC3, which is a way for different applications (e.g. web apps) to collaborate in a workflow.

Ideally, I'd like to package these conformance tests as a web GUI, rather than running from the command line. This is something you can do with Mocha, say.

✨ What's your proposed solution?

Cucumber appears to have lots of dependencies on things like node:fs - are these dependencies isolated? Can they be replaced with others? For example, could I load .feature files with a URL rather than a file path?

⛏ Have you considered any alternatives or workarounds?

I've tried unsuccessfully using Vite Polyfills and also looked at Vitest Cucumber Plugin

📚 Any additional context?

No response

@dnotes
Copy link

dnotes commented Oct 19, 2024

If you're still working on this, I've made a Vitest plugin that parses Gherkin feature files at quickpickle. It's basically a replacement for CucumberJS as a test runner, but using all of the official parsing bits. Would love to hear if it would work in the browser but don't have time to test at the moment.

@valentinoli
Copy link

valentinoli commented Nov 21, 2024

Hi,

I got curious from reading this question, since I'm looking into BDD options for a project.

Have you tried Cypress? It seems to have the capability to run tests from a GUI with "Open Mode".

The below FAQ includes information about how you can use Cucumber with Cypress:

Can I use Cucumber to write tests?

Someone created a plugin to support Cucumber syntax in Cypress: cypress-cucumber-preprocessor

Edit: I'm not sure you can deploy the Cypress GUI though... which is the thing you seem to be looking for

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

No branches or pull requests

3 participants