Automation Frameworks, Linear Scripting, Data Driven Framework

Before starting the framework details, we should know what is called Test Automation Framework. Test Automation Framework is a set of guidelines like coding standards, Test data handling, object repository treatment, library files etc which when followed during automation scripting produces the beneficial outcomes like increase code re-usage, script portability, reducing maintenance cost etc.
Just remember that the above mentioned guidelines are not rules and also not mandatory to be following. We can still write the scripts without following the guidelines. The only drawback is we'll miss out the advantages of having a Framework.

Now we can look into the different frameworks available.

Linear Scripting:
This is the simplest of the Frameworks and also called as "Record and Playback" framework. In this the automation tester manually records the steps like navigation and user inputs, Inserts checkpoints in the first round itself. Then the test script is played back in the subsequent rounds.

For example we can take the loin functionality of the Flight application.

SystemUtil.Run "flight4.exe","","","open"
Dialog("Login").WinEdit("UserName").Set "aaaa"
Dialog("Login").WinEdit("Password").SetSecure "bbbb"
Dialog("Login").WinButton("OK").Click
'Check whether the flight application is loaded after successful login
Window("Flight Reservation").Check Checkpoint("Flight Reservation")

We have the following advantages when using Linear Scripting.
  • We can generate the script in fast manner
  • We no need to have the automation expertise
  • We can easily learn the features of the automation tool
We have the following disadvantages when using Linear Scripting.
  • We can't re-use the script across the different versions of the application when user interface is changed.
  • We are hard coding the test data. So, repeated testing is not possible.
  • Maintenance is very tough when the user interface and feature enhancements are happened.
Data Driven Framework:
In this Framework, the Test case logic and Test data are separated. Test case logic resides in Test script and the test data is stored in an external file. The external file can be Text file, DAO Objects, Excel, XML etc. The test data is loaded and assigned to the variables which resides in the script. The variable can be used as Input values as well as verification variables. Test scripts are prepared either using Linear scripting or Test Library Framework.


For example, we can take the same Flight Login functionality. It involves 2 steps in Data Driven Framework.


Step#01:Prepare the Test data in any one of the external file. Here we are going to use excel sheet.

          UserName       Password
           u_aaaa           p_aaaa
           u_bbbb           p_bbbb
           u_cccc            p_cccc

Step#02: Develop Test script and make references to the Test Data resource which are prepared in  Step#01 .

  SystemUtil.Run "Fligt.exe","","","Open"
  Dialog("Login").WinEdit("Username"). SetDataTable("UserName",dtGlobalSheet)
  Dialog("Login").WinEdit("Password"). SetDataTable("Password",dtGlobalSheet)
  Dialog("Login").WinButton("OK").Click
  Window("Flight").Check CheckPoint("Flight Reservation")

We have the following advantages when using Data Driven Framework.
  • Changing test script will not affect the test data and vice verse
  • We can execute the test cases with the multiple set of data
  • Variety of test scenarios can be executed by changing the test data
We have the following disadvantage when using Data Driven Framework.
  • Time consuming for preparing Test data and Test scripts
SHARE

About அமரகோசம்

    Blogger Comment
    Facebook Comment

5 comments:

  1. Hello,
    The Article on Automation FrameWorks linear Scripting
    is good give detail information about it.Thanks for Sharing the information about Automation Frameworks.Software Testing Company

    ReplyDelete
  2. Thanks for sharing this post and the efforts you have made in writing this. If you have more info about Software testing companies, please share. Looking forward to hearing from you.

    ReplyDelete