Closed aaronc closed 1 year ago
Hi @aaronc,
Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! πΎ
In return for this generous offer we hope you will:
On behalf of the Cucumber core team, Aslak HellesΓΈy Creator of Cucumber
Hey @aaronc this looks very interesting. Am I right that with gocuke, all features and scenarios run inside of a single test?
In other words, does this run all features and scenarios?
gocuke.NewRunner(t, &suite{}).Run()
I've been wondering lately if this could be an alternative way to run Cucumber.js as well. In the JavaScript ecosystem there are so many different test runners (mocha, jest, vitest etc etc), and being able to run Cucumber within any testing tool could be quite handy.
/cc @davidjgoss
Hey @aaronc this looks very interesting. Am I right that with gocuke, all features and scenarios run inside of a single test?
In other words, does this run all features and scenarios?
gocuke.NewRunner(t, &suite{}).Run()
Thanks for your interest @aslakhellesoy ! So the above line will run all features and scenarios in the default path features/*.feature
. In practice though, we find it better to have one test file per feature file and use the Path()
option, as you can see in these examples: https://github.com/regen-network/regen-ledger/tree/main/x/ecocredit/base/keeper (such as https://github.com/regen-network/regen-ledger/blob/main/x/ecocredit/base/keeper/msg_add_class_creator_test.go#L22)
In go, tests can have sub-tests, so even though you can start with one top-level test for all features, each feature file and pickle gets run in a sub-test.
@aslakhellesoy I think about this often...unfortunately none of the JavaScript test runners have extension points for dynamically defining and running tests in the way that, say, JUnit does.
π€ What's changed?
Adds gocuke as a semi-official golang implementation on the Installation page.
Closes #830
β‘οΈ What's your motivation?
I would like to make sure that other users can find gocuke as they might find it easier to work with than the other golang implementations.
I am proposing that it be listed as "semi-official" because it uses the official github.com/cucumber/gherkin/go and github.com/cucumber/messages/go libraries under the hood and attempts to stay up to date with these dependencies.
π Checklist: