Contributing to Cucumber
Thank you for considering contributing to Cucumber!
This document will first introduce different ways to get involved before focusing on how to contribute to the code.
Code of Conduct
Everyone interacting in this codebase and issue tracker is expected to follow the Cucumber code of conduct.
How can I contribute?
If you're reading this, you are certainly looking to contribute to the code. Cucumber is not this single repository. It is made up of several packages around several repositories. So before going further with the code, you may consider the following first, in order to get your bearings.
If you just want to know how to contribute to the code, go to Contribute to the code.
If you want to report an issue, or suggest an enhancement, go to Report bugs and submit feature requests.
Meet the community, the maintainers, and other Cucumber developers
Smartbear hosts a community message board. This is a good place to meet users, the community, and to ask questions.
Testing Cucumber, especially new features, is a great way to contribute. We cannot put a price on (early) feedback.
Contribute to the documentation
You don't know how to contribute but would like to help? Telling other people about Cucumber on the Internet - social media, reviews, blogs - but also in real life is already a big help! Join us on Slack to share your publication and to discover new ones.
Report bugs and submit feature requests
The short version is:
- Find the appropriate repository
- Try to check there is not already an issue or pull request that deals with your bug or request
- Explain your issue and include as much details as possible to help other people reproduce your problem or understand your request
- Consider submitting a pull request if you feel confident enough
You can find more details for each of these steps in the following sections.
Find the appropriate repository
The current repository,
cucumber-ruby, is actually the tip of the iceberg. It
provides a user interface through a CLI, some built-in formatters, and the
execution environment you may know as the
An important repository is cucumber/common. It is a mono-repo with a lot of libraries. You will find there what is related to:
- parsing Gherkin documents - aka
- parsing tag expressions - the options you use to filter an execution with tags
- parsing Cucumber expressions - the expressions that link a Gherkin step to a step definition
- everyting related to the HTML formatter
cucumber-ruby is also composed of cucumber-ruby-core: this is the engine that
will execute the test cases computed from a parsed Gherkin document
Last but not least, there is also a repository for cucumber-rails, the gem that brings Cucumber to Rails 5.x and 6.x.
In any case, if your are not sure, best places to open an issue are the current
cucumber-ruby - and the mono-repo at cucumber/common.
Look for existing issues and pull requests
Search in the current repository, in the mono-repo, but also in the whole cucumber organization if the problem or feature has already been reported. If you find an issue or pull request which is still open, add comments to it instead of opening a new one.
If you're not sure, don't hesitate to just open a new issue. We can always merge and de-duplicate later.
Submitting a pull request
When submitting a pull request:
- create a draft pull request
- try to follow the instructions in the template
- if possible, sign your commits
- update CHANGELOG.md with your changes
- once the PR is ready, request for reviews
More info on how to contribute to the code can be found below.
Opening a new issue
To open a good issue, be clear and precise.
If you report a problem, the reader must be able to reproduce it easily. Please do your best to create a minimal, reproducible example.
Consider submitting a pull request. Even if you think you cannot fix it by yourself, a pull request with a failing test is always welcome.
If you request is for an enhancement - a new feature - try to be specific and support your request with referenced facts and include examples to illustrate your proposal.
Contribute to the code
You can then fork and clone the repository. If your environment is set-up properly, the following commands should install the dependencies and execute all the tests successfully.
bundle install bundle exec rake
You can now create a branch for your changes and submit a pull request!
If you want to check the code coverage during your development, execute
bundle exec rake cov.
As seen here: Find the appropriate repository,
you may need to work with other repositories in order to accomplish your
development. Beside the mono-repo in cucumber/common, cucumber-ruby-core is
also a big piece of
Using a local Gemfile
A local Gemfile allows you to use your prefer set of gems for your own
development workflow, like gems dedicated to debugging. Such gems are not part
.bundle have been added to
.gitignore so local changes cannot be accidentaly commited and pushed to the
Gemfile.local may look like this:
# Gemfile.local # Include the regular Gemfile eval File.read('Gemfile') # Include your favorites development gems group :development do gem 'byebug' gem 'pry' gem 'pry-byebug' gem 'debase', require: false gem 'ruby-debug-ide', require: false end
Then you can execute bundler with the
bundle install --gemfile Gemfile.local, or with an environment variable:
BUNDLE_GEMFILE=Gemfile.local bundle [COMMAND].
To use your local Gemfile per default, you can also execute
bundle config set --local gemfile Gemfile.local.
First timer? Welcome!
Looking for something simple to begin with? Look at issues with the label 'good first issue'.
Remember: Cucumber is more than
cucumber-ruby. You can look for good first
issues in other cucumber reporistories.
Having trouble getting started with the code? We're here to help!
If you have trouble setting-up your development environment, or getting started with the code, you can join us on Slack. You will find there a lot of contributors.
Additional documentation and notice
You can find additional documentation in the docs directory such as (non-exhaustive list):