Note: This project is not actively maintained. Consider instead cucumber-rust, a Cucumber implementation with no external dependencies.
Please checkout the calculator example! That example is a full cargo project example showcasing Cucumber tests on real-ish behavior, and outputting a binary. It'll hopefully let you know if you like the testing style before really commiting to it.
In your rust project:
- Install Ruby, preferably the same version as the one used here
- Add a gemfile containing
gem 'cucumber'
, similar to the example- Note: The examples don't have a Gemfile because they piggyback off of the gemfile in the main project
- Add the cucumber dependency to your Cargo.toml
- Add a feature directory, containing the following basic files
- Add a cargo test entry to your Cargo.toml to hook cucumber tests into
cargo test
(based off example)
- Run cargo test, and verify that cucumber executes with no steps
- Add your
*.feature
files and step defintions as normal
Just cargo test
. Its configured (as in the examples) to be run with the rest of the tests.