Our documentation site has been updated to AIO Tests Knowledge Base

Behavior Driven Development (BDD)/Gherkin Cases

AIO Tests supports two types of steps writing styles - Classic steps (step-by-step) and BDD/Gherkin style steps (supporting Cucumber framework).

This article talks about how to create cases using Gherkin and the available actions.

 

Creating and Editing a BDD case

Creating a BDD case is same as creating a Classic case. The difference comes while adding steps. The below screen is displayed initially once “Add Steps” button has been clicked. By default, “Classic” is selected.

The below functions are also available while editing a case (Steps tab).

To create BDD steps,

  1. Click on BDD/Gherkin toggle

  2. New steps can added by using the “+” button, hitting “TAB” key or by pressing enter after entering the step description/data

  3. Clicking the delete symbol will allow the user to delete a particular step. The step isn’t deleted permanently but is marked for deletion. The actual deletion takes place on the click of Save/Save & Close

  4. Steps can be reordered by using the reorder handle on the left

Already added BDD steps start appearing the description drop-down as text is being entered helping user choose previously written descriptions and reduce case writing time.

Creating a Scenario Outline with Examples

Examples can be created by clicking on Examples button as below in Edit mode:

Parameter names can be created and example sets can be added as below:

To use parameters in steps, they need to be encapsulated in angular brackets <>, similar to Gherkin steps

 

Changing a Classic case to BDD

In order to change a classic case to BDD or vice-versa

  1. Delete all added steps

  2. Save changes (deletion happens on click of Save Steps)

  3. Change the toggle to the alternate steps type and add steps

  • A classic case cannot be changed to a BDD case, if it has been linked to another case .

  • If the link is removed, then the change from classic to BDD and vice-versa can happen.

  • A BDD case cannot be linked to a classic case

Importing Existing Automated Cucumber Cases

Cases can be directly created in AIO Tests if you have existing cucumber automation via Import Results option in Cycles tab or via AIO Tests public REST APIs.

Click here for more information regarding Cucumber integration.