10 Minute Tutorial

This is a very quick introduction to Cucumber. It assumed you already know how to:

  • write code
  • use a build tool
  • use a command line
  • use a text editor

Just follow the steps below to get an idea what it's like to work with Cucumber. You'll probably have lots of questions after that - don't worry, the rest of the documentation goes into more detail.

Install Cucumber

Add Cucumber to your project:

Maven
Node.js
Ruby
<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>${cucumber.version}</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-junit</artifactId>
    <version>1.2.4</version>
    <scope>test</scope>
</dependency>
{
  "devDependencies": {
    "cucumber": "^1.2.0"
  }
}
group :test do
  gem 'cucumber', '~> 2.4.0'
end

Download Cucumber

Maven
Node.js
Ruby
# Nothing to do at this step
npm install
bundle install

Well done - you're ready to create some files

Create a simple directory structure

Maven
Node.js
Ruby
.
├── pom.xml
└── src
    ├── main
    │   └── java
    │       └── io
    │           └── cucumber
    │               └── tutorial
    │                   └── FizzBuzz.java
    └── test
        ├── java
        │   └── io
        │       └── cucumber
        │           └── tutorial
        │               └── RunCucumberTest.java
        └── resources
            └── io
                └── cucumber
                    └── tutorial
                        └── FizzBuzz.feature
TODO
.
bundle exec cucumber --init

results matching ""

    No results matching ""