-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Open up const { Cli } = require('@cucumber/cucumber')
for programmatic usage
#1710
Comments
You are not the only one using the internal APIs for a programmatic usage. I think it would be a good idea to stabilize such an API and to document it. @cucumber/cucumber-js what do you think? |
Hey @nicojs, your timing is impeccable! I'm writing a proposal for a new programmatic API this morning that hopefully will be of benefit to you. I'll tag you there as it would be great to get your initial feedback. |
Going to close this as we're having a good discussion over on #1711 about a new API to solve this need. I'll just add that the intent is to leave the |
another use case: we have AWS env on VPC with very limited access from outside. I would like to have a cucumber on this env for tests. So i wrapped my cucumber project in a docker and deployed it on that VPC. it works like a charm but it is very cumbersome to invoke the tests - you have to enter the docker and run the test by |
Is your feature request related to a problem? Please describe.
I'm in the process of adding support for cucumber-js in StrykerJS, the mutation testing framework for JavaScript and friends. See stryker-mutator/stryker-js#2970
I would like to use cucumber programmatically. In fact, I'm already doing that in the MR. However, I realize that I'm using an undocumented API, which I don't like doing, since the implementation could break in a patch release version. I strive to use public APIs only.
Describe the solution you'd like
Would you accept a PR that documents the use of the
Cli
class for public usage?I would add it to your docs directory. Either in a new file (
programmatic-usage.md
) or add it to thecli.md
file.Describe alternatives you've considered
Additional context
In order to make mutation testing feasible, we need a programmatic API. Simply calling
childProcess.exec
to execute cucumber-js would work, but is terrible for performance since Stryker will run cucumber-js many times during a mutation testing run.The text was updated successfully, but these errors were encountered: