What is a Test Automation Framework?

A test automation framework is an application that allows you to write a series of test without worrying about the constraints of the underlying test tools.

It’s a set of protocols, rules, standards and guidelines that can be followed as a whole so you can leverage the benefits of the scaffolding provided by the framework.

They’re rules, standards and guidelines to make the life of your test team more enjoyable.

An automation framework is not a tool to perform a specific task, but rather an infrastructure that provides the solution where different tools can do their job in a unified manner. It’s an Automation Engineers common platform.

There are multiple Layers Of An Automation Framework. The part we are talking about now holds everything together. When someone says they help build automated test (like myself) they’re normally talking about this middle layer.

Testing Framework Responsibilities

So how do you know when you have an automation framework? Well if your framework can do these four things then it’s safe to say you’ve got it.

  • Define a common language for test – This can be a high level abstraction or a low level test harness. You could have a strict syntax or leave that up to the testers.
  • Work with the application your testing –  needs to host, run, or point to the application under test. From there is should be able to navigate through it.
  • It can run all your test – enough said.
  • Report the Results – at the very least it needs to let you know which test failed and what test passed.

If it walks like an automation framework, talks like an automation framework, and looks like an automation framework than it’s safe to say that it’s an automation framework. With these four things covered you’ll walk the walk and talk the talk.

8 Benefits of Building a Test Framework

Here is a list of the main benefits from a fully fleshed out test automation framework.

  1. Abstracts away low level commands
    • Let machines do what they are good at, so humans can do what they’re good at.
  2. Utilize many test tools under one umbrella
    • Test tools such as Selenium, WebDriver, etc.
    • Test runner such as unit test frameworks
    • Other common utilities
  3. Perform multiple levels and types of testing
    • Functional, regression, load, performance, unit, integration, etc.
  4. Generic test API
    • Common codebase and database
    • Exception and error handling
    • Modularized, reusable, and maintainable code and data
    • Standardized test idioms
  5. Test configuration
    • Configurable test suites
    • Global test properties
  6. Automatic test versioning
    • No need to get a specific version from the source control repository
      • Always get the latest version
    • Eliminates deployment to multiple machines for testing different versions of an application
      • Deploy to a single server machine
  7. Multi-threading
    • Run tests in parallel
    • Runs on test machines in the grid or cloud
    • Test across multiple environments and application versions simultaneously
  8. Continuous integration
    • Run in a continuous integration environment
    • Share tests and collaborate with other teams

Some of these benefits take time to develop but they’re all achievable. For most companies the effort is well worth it.