Posted over 3 years ago. Visible to the public.

Cucumber in depth [2d]

Advanced cucumber features

Learn about the following cucumber features:

Also read through the card How to not repeat yourself in Cucumber scenarios.

Cucumber Factory

We have a very useful gem to create test data in cucumber: cucumber_factory.

Read through the README.

Integrate it into your MovieDB and replace your custom model creation steps with Cucumber Factory.

Simplify your cucumber features

Look through your MovieDB features and step definitions. Can you spot opportunities to apply what you learnt?

  • Can you move duplicate steps to a Background or turn scenarios into a Scenario outline?
  • Can you use a Harness in your step definitions? Is it worth it?

If you cannot find any opportunities to DRY up a Cucumber scenario, do this exercise (testing the file upload from before):

  • Write a scenario: User can upload a movie poster in PNG format
  • Write a scenario: User can upload a movie poster in JPG format
  • DRY up both scenarios in a single scenario outline with two examples

Owner of this card:

Tobias Kraze
Last edit:
4 months ago
by Arne Hartherz
Posted by Tobias Kraze to makandra Curriculum
This website uses cookies to improve usability and analyze traffic.
Accept or learn more