Automation Framework: Linear Automation framework

Linear framework is the most simple of all the frameworks. Linear framework has individual scripts for each test case and is executed individually. It depicts the basic record and playback approach. Linear Framework is suitable to convert small to medium size manual scripts into equivalent automation scripts – one to one basis.

Advantages of Linear framework:-

• Quick development – There is little planning or consideration of the various Quality Attributes when creating Linear scripts. As the scripts are created by recording, it does not require much effort.

• Doesn’t need through knowledge of the tool – Test automation typically requires through knowledge of the automation tool features and languages supported. One should also be aware of how the tool interacts with the application under test. The use of Record and Playback in the creation of Linear scripts dynamically creates code that replicates actions performed in the application.

• Script Independence – The scripts are independent of each other.

Disadvantages of Linear framework:-

• Issues in Playback – As the linear framework rely heavily on Record and playback, the recorded scripts do not playback properly for various reasons.

• Duplicity of work – Linear framework proceeds on individual scripts, thus reuse feature is not used in it. If some scripts require same action to be performed, it would again be recorded in the test.

• Scripts are difficult to read – As the script is auto generated, it has no comments and thus makes it difficult to read and interpret.

Automation Framework: Types of Automation Framework

Automation Frameworks can be classified into following types: 

  • Linear Framework
    • Linear framework is the most simple of all the frameworks. Linear framework has individual scripts for each test case and is executed individually.
  • Modular Framework
    • In Modular Framework, the test is divided into reusable functionalities also called as actions, so that they can be used in any test.
  • Data Driven Framework
    • Data driven framework is a systematic approach to test an application. In data-driven framework test input and output values are read/write from/to data files (Mostly Excel files) and are loaded into variables in captured or manually coded scripts.
  • Keyword Driven Framework
    • Keyword Driven framework is also known as table-driven or action-word driven framework.In this framework, an application map is defined including it’s objects, components, actions and an expected value for each component.
  • Hybrid Automation Framework
    • Hybrid framework is the combination of all of the above techniques, pulling from their strengths and trying to minimize their weaknesses.

Automation Framework – Advantages and Development Challenges

Advantages of Automation Framework:-

  • 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. There’s no need to update the scripts in case of changes to the application.
  • Standard scripting that will result in team consistency during test library design and prevent individuals from following their own coding standards, thus avoiding duplicate coding.
  • Test Automation scripts are separated from input data store and only the input data gets manipulated whereas no modification is needed for the test scripts.
  • By developing the libraries, they can be reused again and again, saving time for the entire organization/project team.
  • By giving right role-based access, the standard process of Test Automation scripting can be maintained.
  • Future Enhancements Support
  • Ensures consistency of testing.

 Test Automation Framework Development Challenges: 
  • Cear vision of what needs to be achieved out of this automation. It should address core questions like testing model, types of testing, which areas need to be automated etc.
  • Tool identification and Recommendation process is a crucial process, as it means considering critical factors like creating a standard tool evaluation checklist, types of testing, and acquiring multiple tools to perform different types of testing.
  • Framework design involves identifying requirements from multiple areas like identification of necessary utility/components, types of input data store to be communicated, communication between the systems and utility/component development, etc.
  • In order to have any chance of building a sustainable solution the Test Automation Engineer will have to a close working relationship with the development or product support – if the application has been purchased by a third party vendor.

For designing a framework, various elements need to be taken into consideration. Some of them are:

  

• Actions to be performed
• Database Communication
• Communication with additional automation tools
• Device Communication
• Log
• Error Handlers
• Custom Messages

Based on these, Test automation framework would be designed using the following guidelines like.

• Application-independent (if possible). 
• Encapsulate the testers from the complexities of the test framework.
• Identify and abstract common functions used across multiple test scripts.
• Decouple complex business function testing from navigation, limit-testing, and other simple verification and validation activities.
• Structure scripts with minimal dependencies – Ensuring scripts executing unattended even on failures.

Automation Framework

A test automation framework can be defined as a compilation of assumptions, concepts, and practices that provide support for automated software testing.

Framework comprises support programs, processes, code libraries etc to help develop and glue together the different components in a project.

Physically, Frame work is nothing but a collection of folder structure and placing all files into corresponding folders.

Problems with Record/Playback Process:-

A general conception about automation tools is that they can be used easily by using their record and playback feature. The process followed in record and playback (also called as Capture/Replay) approach is:-

  • Record the user actions using the capture/record feature of the automation testing tool. 
  • It results in an auto generated script. 
  • Complete the test cases by adding verification points in the script.  
  • Add delay and wait state points where the different actions need to be synchronized. 
  • Playback the scripts and log the results in a test management tool. 

The above process results in following issues:-

  • The script contains hard coded values which must be changed every time there is some change in the Application. 
  • The scripts are not reliable. Even if the application does not change, the scripts often fail on replay because of unhandled scenarios which were not recorded. 
  • If the tester makes an error entering data, etc., the test must be re-recorded 
  • If the application changes the test must be re-recorded. 
  • This method turns out to be costly (time consuming) in long run.