Showing posts with label Automation Framework. Show all posts
Showing posts with label Automation Framework. Show all posts

Wednesday, 1 May 2013

How to Identify Test Automation Framework


Automation Framework Requirements


The framework should facilitate automating test scenarios and allows anyone to run them from anywhere and at anytime.

  • Easy to maintain and update the scripts with newer releases or to accommodate changes  done to the application
  • Have Modular, Scalable and Extendable design.
  • Has high reusability so that development efforts should be minimum.
  • Framework should support the automation of test suite to cover the full breadth and depth of the application being tested
  • Easy to do selective test execution
  • Framework would be capable of handling any kind of unexpected errors.
  • Should generate a comprehensive report which is easy to analyse.


Framework Design Principles


Various factors need to be considered while designing an Automation Framework. Design and architecture is an important aspect of automation. The design has to represent all requirements in modules and in the interactions between modules. The guiding principles that are being followed when developing automation Framework are mentioned below.

  • Maintainability and Extendibility - The automation suite would be easily maintainable. This would imply that the design of individual elements be kept simple and intuitive. Nomenclature of the scripts and functions be kept simple and the code be well commented. The suite also needs to be extendible. This would imply building a common framework and standards on which more enhancements to application or test scenarios can be easily added. All test scripts will strictly adhere to the framework and standards
  • Ease of Customization - Test data would be parameterized into constants or data files. A tester should not be required to modify a test script in order to setup a test run. The only things that could need changes during a setup of a test run should be a few constants and/or the data tables to setup the scripts with the right data. Even with the constants and data tables, the changes should be easy and well defined.
  • Scalability - Framework would allow scheduling all test scripts or targeted test scripts from different modules for execution single run/test. This provides the flexibility that there is no dependency that different module to be tested or executed separately.
  • Modularity - Framework would be Modular. Different components of the Framework would be divided into separate modules. This would lead to ease in usage and maintenance of the framework
  • Error Handling – Framework would be capable of handling any kind of unexpected errors.
  • Reporting – Framework would generate a comprehensive report which is easy to analyse and can be shared with client.

Types of Test Automation Framework


Test Automation Framework is the philosophy on which Automated Testing as well as Automated Testing tools are based on, in precise terms it is a set of assumptions, concepts, and practice that provide support for automation.

In real time projects, we use to call, Frame work as a folder. This folder contains the components such as, Object Repository, logs, test data, script, result...etc. so whatever files are created to develop a script are stored in a separate folder, which is nothing but a framework

Frame work means we can create a folder structure for reusable purpose. The folders like function folders, script folders, reusable folders, paramaterizing folders etc. we generate the script and save in the respective folders, in future we need we can paste and modify the script, we run another script


1-Test Script Modularity Framework-This framework is quite similar to what we have been using in our day to day programming i.e. dividing a large program in to modules. The test script modularity framework requires the creation of small, independent scripts that represent modules, sections, and functions of the application-under-test. These small scripts are then used in a hierarchical fashion to construct larger tests, realizing a particular test case.


2-Test Library Architecture Framework-The test library architecture framework is very similar to the test script modularity framework and offers the same advantages, but it divides the application-under-test into procedures and functions instead of scripts.


3-Keyword-Driven or Table-Driven Testing Framework-The Keyword-Driven or Table-Driven framework requires the development of data tables and keywords, independent of the test automation tool used to execute them and the test script code that "drives" the application-under-test and the data. In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test.


 4-Data-Driven Testing Framework-In this framework we create data files (data pools, ODBC sources, cvs files, Excel files, ADO objects etc.) and use them in our test cases at run time  When we execute a test case we need to pass some parameters in the application under test, that’s were Data-Driven framework comes into the picture. In this framework, variables are used for both input values and output verification values. Navigation through the program, reading of the data files, and logging of test status and information are all coded in the test script.

Example: Filling a webpage with appropriate parameters using the data files (Excel in this case).
  
5-Hybrid Test Automation Framework-As the name suggests this frame is the combination of one or more frameworks discussed above pulling from their strengths and trying to mitigate their weaknesses. This hybrid test automation framework is what most frameworks evolve into over time and multiple projects.