Setup Cucumber for BDD in IntelliJ.

Testing Life Cycle

As seen in this LinkedIn Learning course about Cucumber here

  1. Define acceptance tests
  2. Define features - cover as many scenarios (write BDD tests)
  3. Write TDD unit tests

3 key components of Cucumber

  1. Feature files

Feature, Scenario, Given/When/Then, in business domain language (using Gherkin).

  • Given a pre-condition
  • When an action is done
  • Then it produces a result

Example: