Provar supports a Behavioral-Driven Development (BDD) approach to creating test cases for automation.
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.
Provar provides BDD APIs for Given, When and Then. Using these APIs, you can group together Test Steps based on their behavior to define pre-conditions, actions and checks respectively.
The purpose of Given in BDD is to put your system in ready state before an Interaction or Action.
In Provar, the Given API is used to group the Test Steps in your Test Sase which define a set of pre-conditions or data setup. For example, ‘User is on the Contact New Screen’:
The purpose of When in BDD is to describe the key actions that a user performs after the preconditions are met.
In Provar, the When API is used to group the Test Steps in your Test Case which perform the actions. For example, ‘User completes the form and clicks Save’:
The purpose of Then in BDD is to observe the outcomes of the interaction performed by the user.
In Provar the Thus API 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’.