Cucumber is a tool that can execute plain-text functional descriptions. And also it’s BDD(Behaviour Driven Development) automated tests. It is written by Ruby, and now it supports more than 40 languages, such as Java, C# and Scala etc.

Install

Firstly, we need to install Ruby and RubyGems, to check whether the installation of Ruby and RubyGems is successful. You can inputx the commands to terminal, just like as below:

1
2
3
4
~  ruby --version
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
~ gem --version
2.0.14

And then we can run the command below to install Cucumber:

1
~  gem install cucumber

After this, put below command to see how to use it.

1
~  cucumber --help