Business-Driven Test Automation (BDTA)
Business-Driven Test Automation is how Sahi Pro is built: write tests as business steps first, and automate each step when the application is ready.
In many teams, automation can only start once the application is ready. Tests are written after the feature is built, so they fall behind every release, and the people who know the business can’t easily check what the tests do.
Sahi Pro is built for Business-Driven Test Automation (BDTA). You write a test in the language of the business first, and automate its steps when the application is ready. Tests can be defined as soon as a feature is, and they stay readable to everyone on the team.
How Sahi Pro Structures a Test
Section titled “How Sahi Pro Structures a Test”Every test in Sahi Pro follows the same structure, which keeps the business view and the technical details apart:
- A scenario file (
.s.csv) holds test cases. - A test case is a list of keywords, named after the steps of the business process, such as Login, Add Books and Logout.
- Each keyword holds its steps, the actions on the application. They live in
.sahfiles, apart from the test cases that use them.
The test cases say what the business does. The keywords say how each step is done. One keyword can be used in many test cases, so a change to a step updates every test that uses it.
The BDTA Way of Working
Section titled “The BDTA Way of Working”Before the Application Is Ready
Section titled “Before the Application Is Ready”- Define the flow. Write test cases as business steps, as keywords. The application doesn’t need to exist yet.
- Add parameters to keywords where the test needs data, such as a username. You can refine them later.
- Plan the test data. For data-heavy tests, decide which keywords take their data from a test data file.
- Organize the tests. Group scenario files into test suites, and tag test cases so you can choose what to run.
- Review. Scenarios read like plain test cases, so subject matter experts and managers can check them. Testers can use them as manual test cases until they’re automated.
- Check them in to version control.
When the Application Is Ready
Section titled “When the Application Is Ready”- Automate each keyword. Record its steps in the Controller, or let AI Suggest author the keyword for you.
- Keep elements in one place. Store the elements your keywords use, such as buttons and fields, in the Accessor Repository, so a change in the application is fixed once.
- Run the tests and check the reports.
Most of the automation work happens before the feature is ready, so the tests are ready when the feature is.
Write Good Keywords
Section titled “Write Good Keywords”- Name keywords after business steps, such as Add Books, not browser actions, such as Click Add Button.
- Keep keyword names unique, and agree on a naming convention for your project.
- Split the flow into reusable parts. Keywords can be reused across test cases and scenario files, so a keyword like Login is written once.
Keywords in Your Team’s Language
Section titled “Keywords in Your Team’s Language”Keywords can be written in English, German, Dutch, Chinese (Traditional) and other business languages. Each linked language opens a video of a test written in it. This is supported since Sahi Pro v10.0.0; older versions support only English.
Try It
Section titled “Try It”The Getting Started pages walk through BDTA step by step, on Sahi’s sample application:
- Create Your First Test Scenario: add the keywords first, then record and run them.
- Parameters and Data Generators: give keywords new data on every test run.
- Loop Through a Test Data File: run a test case once for each row of data.
- Run Tests in a Suite: run many scenario files together.
To read data from Excel files or databases in keyword code, see Excel Functions and Data Drive Functions.

