USA: 1-623-232-1062 info@novaturetech.com

Let us understand Framework

In General, a Framework in computer systems is a real or conceptual structure to provide support and guidance for the building of applications. In other wordsframework can be defined as a set of processes, standards, structure and interactions between the components to build effective applications. Test automation Framework serves the similar way to develop and execute test automation scripts. Test automation frame work provides a platform to create test automation suits with high Re-usability, Reliability, Flexibility, Portability, Robustness, Maintainability and configurability.

Key parameters of Framework

untitled-2-copy

The key parameters that determine an efficient Test Automation Framework are

  1. Handling of scripts and Dataseparately
  1. Libraries – Common Functions and utility Functions
  2. Coding standards
  3. Extensibility and Less maintenance
  4. Structured object repository
  5. Support continues integration
  6. Configurability
  7. Structured
  8. Script/Framework version control
  9. Better Reporting – Extendable Reports, Email Reports and screenshots.
  10. Easy issue Tracking and Effective Logging
  11. Re-usability
  12. Smooth Binding

Let’s explore each of this point in detail.

1.0 Handle scripts and data separately

Automated test scripts should be clearly separated from the input data store (e.g. XMLMs-Excel files, Flat files or Databases), so that no modifications are required to the test scripts whenever data has to be changed for multiple input values.

2.0 Libraries

A library should contain all reusable components and external connections such as databases, generic functions, application functions etc. Software testers should be exposed only to the implemented libraries and tests should be performed by invoking these libraries. It could be categories as common functions and Utilities functions.

3.0 Coding Standards

Automation scripting has gained importance as a development exercise. Scripting standards are a necessity for each project and the respective documentation to be read and understood in the same way by all those involved in the project. Following are the points to be noted while building up scripting standards:

3.1 Automation Tool Standards

The standards set for automation tools must also be considered while framing the scripting standards for script development. Say for example- There are multiple things that can improve the Selenium WebDriver scripts’ speed:

3.2 Naming conventions

Standardized naming conventions for functions, variables, and data tables, scripts, and test cases should be maintained and strictly practiced.

3.3 Parameterization

It is a good practice to parameterize every instance of user input. This allows flexibility of test data and allows usage of the script for variety of input combinations.

3.4 Exception handling

Exception handling guidelines are important sections in the standards. There can be several issues, which affects the smooth execution of the script like test data failure or an application popup. These guidelines will help the script developers to take an action in such events.

3.5 Error Logging

Standardized error logging is a must. The execution log is the prime outcome of an automation test execution and a formalized log always makes it easy to analyze the test results after the test suite execution.

3.6 Documentation

Documentation standards like adding comments and indentation helps the script developers to create uniform scripts. It also offers the new script developers readability and understanding of the code.

4.0 Extensibility and Maintenance

An ideal test automation framework should steadily support all new enhancements to the software application and allow modification of existing features e.g. A reusable library can be created, which would help in enhancing application features with minimal effort. Extensibility and Less maintenance is the product of various parameters mentioned below.

The framework should be structured like Driver Scripts, Controller scripts and main scripts enabling less maintenance efforts for any enhancements. Framework should be organized such a way that should give a feature for the implementation of continuous integration. Framework should be highly configurable by maintaining the configurations, credentials and Test Data outside the scripts. Framework with Object identification as keywords or properties would enable less maintenance.  

5.0 Structured object repository

Test framework should maintain a structured object repository. Either properties or keyword should be used to identify the objects instead of recording Objects. So, that it is easy to maintain for any enhancements or any changes6.0 Support continues integration

6.0 support continues Integration.

Test framework should be designed such a way that it should support continuous integration. So, that the Test Automation can be triggered when the Code is deployed and ready for Testing.7.0 Highly Configurable

7.0 Highly Configurable

No hard coding should be there in the entire Test Automation Suites. Environment details, Browser, User credentials, scripts to be run, sequence of Scripts to be run, etc should be configurable and should be outside the actual scripts. Say for example in a Set of 100 Test Cases, Test Automation framework should give the option to select which Test cases to be run. Test Automation framework to be such a way it highly configurable for all the variables.

8.0 Highly Structured

Test Automation framework should have a well-defined structure and flow of events. It should have proper segregation of Test Input, Test Data, Test Output, Object Repository, Screenshots, Test Configurations, Libraries and Test Scripts. Test Scripts can be further categorized as Driver Scripts and Controller Scripts

9.0 Script/Framework Versioning

Versions of framework / scripts should be maintained either in a local repository or versioning tool, which would help in easy monitoring of changes to the software code.

10. Better Reporting

Test Automation Framework should be designed to provide different formats of reports for various audience. It should contain both summary and dashboard information. It should capture screenshots for easy reference. Reports should be emailed to key stake folder upon completion for them to take informed decision.

11. Easy issue Tracking and Effective Logging

Test Automation should be designed with easy issue tracking mechanism. So, the failures can be easily analyzed to work on the appropriate solution. It should have the feature enable Logging facility.

12. Re-usability

 The functions, scripts and structure should be designed such a way those are highly re-usable. So, that it greatly reduces maintenance and enhancements efforts. Test Automation framework once designed cane be used for different applications or projects

13. Smooth Binding of Components

Test Automation might use different components or API’s to perform the actions. All these components have to be effectively bound together. So, that any change in any of the components do not break the Test Automation suits and help to build and deploy the Suites in different environments with much ease 

14. Conclusion

In today’s software development environment, test automation framework has become an integral component of a software testing life cycle. By following the above test automation framework design guidelines, software testers and software testing companies can immensely benefit by executing successful and maintainable test automation projects.

 

Introducing RAFT

RAFT is Reusable Automation Framework for Testing. RAFT framework is a ready to use framework built with Selenium and other open source tools that enables cost effective solution.

Salient Features
  • Execution Reports – Frameworks provides different forms of reports. Captures time of execution, browser, OS, environment details, screenshots, Branding information and all Test execution metrics (Passed, Failed).
  • Email integration – can be configured to email the Test execution reports to all stake holders.
  • Debugging  – Captures logs for easy investigation of issues and defects.
  • Coding standards –  followed for high performance and easy maintenance.
  • Highly structured – Framework follows a very proven and established structure. It enables framework to be more robust and scalable. Establishes segregation of Object Repository, Common Functions, Utility functions, Driver Scripts, Control Scripts, Test Data, Screenshots, Logs, Test Execution Reports and Configurable Environment
  • Object Repository – Objects are maintained as properties that ease maintenance and enhancements.
  • Binding – Framework effectively utilizes Maven for build and integration that ease the maintenance

Author: Amman Garg   | Posted On: 11th June 2017   | Category: Article

© 2024 Novature Tech Pvt Ltd. All Rights Reserved.