Skip to content
Get Free Trial

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.

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 .sah files, 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.

  1. Define the flow. Write test cases as business steps, as keywords. The application doesn’t need to exist yet.
  2. Add parameters to keywords where the test needs data, such as a username. You can refine them later.
  3. Plan the test data. For data-heavy tests, decide which keywords take their data from a test data file.
  4. Organize the tests. Group scenario files into test suites, and tag test cases so you can choose what to run.
  5. 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.
  6. Check them in to version control.
  1. Automate each keyword. Record its steps in the Controller, or let AI Suggest author the keyword for you.
  2. 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.
  3. 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.

  • 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 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.

The Getting Started pages walk through BDTA step by step, on Sahi’s sample application:

To read data from Excel files or databases in keyword code, see Excel Functions and Data Drive Functions.