Behavior-driven development
Provar supports a Behavior-Driven Development (BDD) approach to creating test cases for automation. Provar has a number of 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
Provar 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 Provar, 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 Provar, the When test step is used to group the test steps in your test case which 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 Provar 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
The purpose of And in BDD is to combine two or more 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 can be used with Given, When and Then.
BDD reporting
You can also use Provar’s BDD Reporting feature to report on BDD test steps only.
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 showing:
Variable values in BDD reports
When a BDD test step is created with a variable, e.g. {NOW}, this variable will be resolved during the execution so that the actual value is shown in the Test Runner and in reporting.
In Test Runner:
In reporting:
BDD Reporting now includes sub-step screenshots
If you generate a report using the BDD Report option, Provar will include in the report any 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.
For example, this test step includes screenshots and is a sub-step under a Given test step:
When a BDD report is generated, the test step itself is hidden but its screenshots are displayed against the Given test step:
This means that the screenshots of many sub-steps may be included against the same BDD test step, as shown above.
- General information
- Licensing Provar
- Provar trial guide and extensions
- Using Provar
- API testing
- Behavior-driven development
- Creating and importing projects
- Creating test cases
- Custom table mapping
- Functions
- Debugging tests
- Defining a namespace prefix on a connection
- Defining proxy settings
- Environment management
- Exporting test cases into a PDF
- Exporting test projects
- Override auto-retry for Test Step
- Managing test steps
- Namespace org testing
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- Reload Org Cache
- Reporting
- Running tests
- Searching Provar with find usages
- Secrets management and encryption
- Setup and teardown test cases
- Tags and Service Level Agreements (SLAs)
- Test cycles
- Test plans
- Testing browser options
- Tooltip testing
- Using the Test Palette
- Using custom APIs
- Callable tests
- Data-driven testing
- Page objects
- Block locator strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript locator support
- Label locator strategies
- Maintaining page objects
- Mapping non-Salesforce fields
- Page object operations
- ProvarX™
- Refresh and reselect field locators in Test Builder
- Using Java method annotations for custom objects
- Applications testing
- DevOps
- Introduction to test scheduling
- Apache Ant
- Configuration for Sending Emails via the Provar Command Line Interface
- Continuous integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Provar secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines Using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Provar CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team foundation server
- Version control
- Salesforce testing
- Adding a Salesforce connection
- Assert Page Error Messages on Add/Edit Product
- Dynamic Forms
- Internationalization support
- List and table testing
- Salesforce Release Updates
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) locator support
- Salesforce console testing
- Visualforce Testing
- Performance Best Practices
- Testing best practices
- Troubleshooting
- Browsers
- Configurations and permissions
- Connections
- DevOps
- Error messages
- Administrator has blocked access to client
- JavascriptException: Javascript error
- macOS Big Sur Upgrade
- Resolving failed to create ChromeDriver error
- Resolving Jenkins license missing error
- Resolving metadata timeout errors
- Test execution fails – Firefox not installed
- Update to Opportunity field validation behaviour
- Licensing, installation and firewalls
- Memory
- Test Builder and test cases
- Release notes