Skip to main content
Version: current

Create BDD test cases in Katalon Studio

This section shows you how to create BDD test cases in Katalon Studio.

Include a feature file in test cases

To include a Cucumber feature file in Katalon Studio test case, you can use Cucumber keywords in your test case. Katalon Studio supports Cucumber keywords along with the original built-in keywords. You do not have to import Cucumber libraries into Katalon Studio.

Use casesCucumber keywords
Execute a single Feature File (with or without tags)
Execute multiple Feature Files (with or without tags)
Execute using Cucumber Runner
For example:

feature file in a test caseAfter you execute your BDD tests, you can view BDD report files generated from Katalon Studio or upload and view reports on Katalon TestOps. See View BDD reports.

Create a BDD test case with Cucumber hooks

  1. To create a BDD test case with Cucumber hooks in Katalon Studio, first, you need to set up Cucumber hooks in Katalon Studio. See Set up Cucumber hooks.

  2. Create a new test case. You can refer to this document: Create a new test case in Katalon Studio.

  3. In the Manual view of the new test case, click on the Add dropdown button and select Cucumber Keywords.

    Add Cucumber Keywords

  4. Select the Run Feature File keyword.

    Select Run Feature File keyword

  5. To get the relative path, right-click on the Feature file and select Copy ID.

    Copy ID of Feature file

  6. Double-click on the Input cell of the Run Feature File keyword. In the displayed Input dialog, paste the copied relative path from step 3 as the input value.

    Paste keyword input value

  7. Run the test and verify the message of the Cucumber hooks in the Console log:

    Cucumber hooks message