cucumber-rs / cucumber

Cucumber testing framework for Rust. Fully native, no external test runners or dependencies.
https://cucumber-rs.github.io/cucumber/main
Apache License 2.0
563 stars 69 forks source link

Readme example is overly complicated #316

Open technomage opened 9 months ago

technomage commented 9 months ago

The feature and step examples in the readme involve a dependency (which requires more than a simple dependency line), and introduces async behavior with delays without making it clear if those are required or just to slow down the example run. Also, the paths for each file should be shown to make it clear where things are assumed to be. As a new rust user trying to get a project setup for the first time with cucumber this is overly complicated. A comment should be added to note that the path in the main function is to the features directory to run.

tyranron commented 9 months ago

@technomage would love to see a PR from you, which makes things more clear on your opinion.

corebreaker commented 6 months ago

So much question, no solution can be found in documentation:

exo-cortex commented 5 months ago

The readme example does not run for me. I think there are a lot of extra steps that I don't know about. Which parts of Tokio do I have to add? Running cargo add cucumber tokio does not work apparently. IMHO the code example should either come with more (full) instructions to get it running, or it should be simpler. Maybe the example int he book with the Cat that is being fed would be better? Ideally there would also be an examples-folder in the repo which contains this example So that it actually runs (which is easier to test if it exists as actual code instead of cited code in a markdown document. The Cucumber Rust Book which is referenced to in the readme has lots and lots of examples that I cannot find anywhere. The first I tried I didn't get to run. There are a lot of missing pieces that someone more experienced might intuitively know. If one could really just run the example in the readme and it works out of the box then it is much more likely that someone keeps using it.

If examples do not exist in an examples folder that a directory-tree of the needed files and their locations would be very helpful.