cucumber-js
cucumber-js copied to clipboard
Running Cucumber In the Browser?
🤔 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
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.
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