Documentation

Looking for something in particular?

Behavior-Driven Development

Automation supports a Behavior-Driven Development (BDD) approach to creating test cases for automation. Automation has several BDD test steps as well as a BDD reporting feature.

BDD is useful for ensuring that your automation focuses on business needs while meeting all user requirements. It can also help business stakeholders to understand automated tests at a high level without going into technical detail.

Using these test steps, you can group together test steps based on their behavior to define pre-conditions, actions, and checks, respectively.

BDD Test Steps


Automation provides BDD test steps for Given, When, Then, And, and But.

Given


The purpose of Given in BDD is to put your system in a ready state before an interaction or action.

In Automation, the Given test step is used to group the test steps in your test case, which define a set of pre-conditions or data setup. For example, “User is on the Contact New Screen”:

When 


The purpose of When in BDD is to describe the key actions that a user performs after the preconditions are met.

In Automation, the When test step is used to group the test steps in your test case that perform the actions. For example, “User completes the form and clicks Save”:

Then 


The purpose of Then in BDD is to observe the outcomes of the interaction performed by the user.

In Automation, the Then test step is used to group the test steps in your test case, which carry the result assertions. For example, “Assert that a contact is created and the user is redirected to the contact view screen.”

And 


And in BDD, the purpose is to combine two or more of the same type of action. And can be used with Given, When and Then.

But


The purpose of But in BDD is to create a condition statement. But it can be used with Given, When and Then.

BDD reporting


You can also use Automation’s BDD Reporting feature to report only on BDD test steps.

To use this feature, open the Export Test Run dialog, then select the BDD Report checkbox:

Click Finish.

The test report will be generated with only the BDD Test Steps.

BDD Reporting now includes sub-step screenshots


If you generate a report using the BDD Report option, Automation will include screenshots captured by test steps that are sub-steps of a BDD step, even if the test step themselves is not visible in the report.

When a BDD report is generated, the test step itself is hidden, but its screenshots are displayed against the Given test step:

This means the screenshots of many sub-steps may be included against the same BDD test step, as shown above.

Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top