Open pjoe opened 4 years ago
Found this for rust: https://github.com/bbqsrc/cucumber-rust
Thank you for filing this! It's great to see a native Rust implementation, this would be a non-option without it :)
Is there an elevator pitch on how we'd benefit from it, and what the downsides are? So far, it looks like a meta-language for tests. Is there a benefit of introducing this meta-language instead of just writing it in Rust to begin with?
I'm sure there is a better pitch to be found somewhere, but for me I've found gherkin to be useful for these reasons:
Common language across requirements, tasks, tests, bugs
Gherkin features are programming language agnostic, but you still have to implement the steps
It provides a standard way to do parameterized tests using tables and scenario outlines. Guessing that could be useful here for running variations of the same test, e.g. for different types: vec2, vec3, vec4, f16, etc. See some example of this:
That being said, I'm not sure it is always beneficial for use in unit tests.
Anyway just an idea for consideration :)
See also:
Just wondering if it could make sense to use Gherkin for some tests.
https://cucumber.io/docs/gherkin/reference/
Maybe using tables and outlines could be useful:
https://github.com/b-yond-infinite-network/jest-cucumber-fusion/blob/master/docs/GherkinTables.md
https://github.com/b-yond-infinite-network/jest-cucumber-fusion/blob/master/docs/ScenarioOutlines.md