Sunday, January 8, 2012

Test Automation Framework

Who should create automation framework?


Integrated Testing Solutions =
[Test Specialist’s Domain Expertise] +
[Manual Testing] +
[Automated Testing: Reusable Framework &
Application Specific Scripts]

# re: Choosing a test automation framework

Frame Work:

1.Smoke
2.Driver
3.Application Business Functionality Execution
4.Verification checker
5.Reporter generation
6.Terminator

There are five kind of framework for any automation tools.
1.Test Modularity
2.Test Library Architecture
3.Keyword Driven framework
4.DataDriven framework (We generally use this framework with above mentioned three framework)
5.Record n Playback

The best one is 'Test Library Architecture'.
In this you can maintain
Application Library
DataBase Library
Error Handling
General Library....etc.

Framework approach in automation


A framework is an integrated system that sets the rules of Automation of a specific product. This system integrates the function libraries, test data sources, object details and various reusable modules. These components act as small building blocks which need to be assembled to represent a business process. The framework provides the basis of test automation and simplifies the automation effort.

A test automation framework is a set of assumptions, concepts and tools that provide support for automated software testing. The main advantage of such a framework is the low cost for maintenance. If there is change to any test case then only the test case file needs to be updated and the Driver Script and Startup script will remain the same. Ideally, there is no need to update the scripts in case of changes to the application.

reusable automation architecture


Test automation interface are platforms that provides a single workspace for incorporating multiple testing tools and frameworks for System/Integration testing of application under test. The goal of Test Automation Interface is to simplify the process of mapping tests to business criteria without coding coming in the way of the process. Test automation interface are expected to improve the efficiency and flexibility of maintaining test scripts.[2]


Types of automation frameworks

They are categorized on the basis of the automation component they leverage. These are:
  1. Data-driven testing
  2. Modularity-driven testing
  3. Keyword-driven testing
  4. Hybrid testing
  5. Model-based testing

Various framework/scripting techniques are generally used:

  1. Linear (procedural code, possibly generated by tools like those that use record and playback)
  2. Structured (uses control structures - typically ‘if-else’, ‘switch’, ‘for’, ‘while’ conditions/ statements)
  3. Data-driven (data is persisted outside of tests in a database, spreadsheet, or other mechanism)
  4. Keyword-driven
  5. Hybrid (two or more of the patterns above are used)



Popular framework requirements

One must keep satisfying popular requirements when thinking of test automation:

  • Platform and OS independence
  • Data driven capability (Input Data, Output Data, Metadata)
  • Customizable Reporting (DB Access, crystal reports)
  • Easy debugging and logging
  • Version control friendly – minimal binary files
  • Extensible & Customizable (Open APIs to be able to integrate with other tools)
  • Common Driver (For example, in the Java development ecosystem, that means Ant or Maven and the popular IDEs). This enables tests to integrate with the developers' workflows.
  • Support unattended test runs for integration with build processes and batch runs. Continuous integration servers require this.
  • Email Notifications (automated notification on failure or threshold levels). This may be the test runner or tooling[clarification needed] that executes it.
  • Support distributed execution environment (distributed test bed)
  • Distributed application support (distributed SUT)

  1. defining the format in which to express expectations
  2. creating a mechanism to hook into or drive the application under test
  3. executing the tests
  4. reporting results

Whats the difference between automation tool and automation framework?

Tools are specifically designed to target some particular test environment. Such as: Windows automation tool, web automation tool etc. It serves as driving agent for an automation process. However, automation framework is not a tool to perform some specific task, but is an infrastructure that provides the solution where different tools can plug itself and do their job in a unified manner. Hence providing a common platform to the automation engineer doing their job.



How can earn more ROI?

Choosing the right framework/scripting technique helps in maintaining lower costs. The costs associated with test scripting are due to development and maintenance efforts. The approach of scripting used during test automation has effect on costs.


What are test automation framewrok consists of?

Test Automation Interface comprises of the following core modules:

  • Interface Engine
  • Interface Environment
  • Object Repository


  • Interface engine


Interface engines are built on top of Interface Environment. Interface engine comprises of a parser and a test runner. The parser is present to parse the object files coming from the object repository in to the test specific scripting language. Test runner deals with executing the test scripts using a test harness.

  • Interface environment


Interface environment comprises of Product/Project Library and Framework Library. Framework Library have modules related with the overall test suite while the Product/Project Library have modules specific to the application under test.[2]

  • Object repository