|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Cucumber Ruby||5,147||30,581||2,415||a month ago||186||May 19, 2022||20||mit||Ruby|
|Cucumber for Ruby. It's amazing!|
|Uyuni||316||5 hours ago||363||gpl-2.0||Java|
|Source code for Uyuni|
|Dtective||9||10 months ago||14||December 15, 2021||7||apache-2.0||Java|
|Dtective Boilerplate||1||4 years ago||1||Gherkin|
|📐 Template for using dtective test framework|
Cucumber is a tool for running automated tests written in plain language. Because they're written in plain language, they can be read by anyone on your team. Because they can be read by anyone, you can use them to help improve communication, collaboration and trust on your team.
See CONTRIBUTING.md for info on contributing to Cucumber (issues, PRs, etc.).
Everyone interacting in this codebase and issue tracker is expected to follow the Cucumber code of conduct.
Cucumber for Ruby is a Ruby gem. Install it as you would install any gem: add
cucumber to your Gemfile:
then install it:
or install the gem directly:
$ gem install cucumber
Later in this document, bundler is considered being used so all commands are using
bundle exec. If this is not the case for you, execute
cucumber directly, without
Using Ruby on Rails? You can use cucumber-rails to bring Cucumber into your Rails project.
If you need to, initialize your
features directory with
$ bundle exec cucumber --init
This will create the following directories and files if they do not exist already:
features step_definitions support env.rb
Create a file named
rule.feature in the
features directory with:
# features/rule.feature Feature: Rule Sample Rule: This is a rule Example: A passing example Given this will pass When I do an action Then some results should be there Example: A failing example Given this will fail When I do an action Then some results should be there
And a file named
# features/step_definitions/steps.rb Given("this will pass") do @this_will_pass = true end Given("this will fail") do @this_will_pass = false end When("I do an action") do end Then("some results should be there") do expect(@this_will_pass) end
$ bundle exec cucumber
To execute a single feature file:
$ bundle exec cucumber features/rule.feature
To execute a single example, indicates the line of the name of the example:
$ bundle exec cucumber features/rule.feature:7
To summarize the results on the standard output, and writte a HTML report on disk:
$ bundle exec cucumber --format summary --format html --out report.html
For more command line options
$ bundle exec cucumber --help
You can also find documentation on the command line possibilities in features/docs/cli.
Copyright (c) Cucumber Ltd. and Contributors. See LICENSE for details.