You are on page 1of 9

6 TIPS

FOR WRITING
efficient
Test Cases using
Cucumber

@DharaDedaniya Swipe
Write Clear Feature Files

Avoid generic phrases; be specific


about the actions being performed.

Swipe
@DharaDedaniya
Scenario Outline for Data Driven
Tests

Use scenario outline for data-driven


tests. It allows you to run the same
scenario with different sets of data.
Swipe
@DharaDedaniya
Background Keyword for Pre
conditions

Use Background keyword for steps that


are common across scenarios. It helps
in reducing duplication.

Swipe
@DharaDedaniya
Tags for Test Categorization

Tags in Cucumber helps in running


specific subsets of tests based on tags.

Swipe
@DharaDedaniya
Use Cucumber Hooks

Hooks allow you to perform setup and


teardown operations before and after
scenarios.
Swipe
@DharaDedaniya
Use Regular Expression

Swipe
@DharaDedaniya
Every Sunday, I send
actionable Tips on QA
Automation that you can
implement in your projects
immediately. Consider
subscribing to my
newsletter. (Link is in my
Profile).

@DharaDedaniya
@DharaDedaniya
REPOST THIS
WITH YOUR
NETWORK IF YOU
ENJOYED IT!

@DharaDedaniya

You might also like