Quality Testing

Quality is delighting customers

What is a Framework ?

Instead of providing a bookish definition of a framework, lets consider an example.
I am sure you have attended a seminar / lecture / conference where the participants was asked to observe the following guidelines:-

* Participants should occupy their seat 5 minutes before start of lecture
* Bring along a notebook and pen for note taking.
* Read the abstract so you have an idea of what the presentation will be about.
* Mobile Phones should be set on silent
* Use the exit gates at opposite end to the speaker should you require to leave in middle of the lecture.
* Questions will be taken at the end of the session

What are the various Automation Frameworks available?
1) Linear Scripting
2)The Test Library Architecture Framework.
3)The Data-Driven Testing Framework.
4)The Keyword-Driven or Table-Driven Testing Framework.
5)The Hybrid Test Automation Framework.

1) Linear Scripting - Record & Playback

It is the simplest of all Frameworks and also know as "Record & Playback".In this Framework , Tester manually records each step ( Navigation and User Inputs), Inserts Checkpoints ( Validation Steps) in the first round . He then , Plays back the recorded script in the subsequent rounds.

Ex : Consider logging into Flight Reservation Application and checking wether the application has loaded on successful log-on. Here , the tester will simply record the steps and add validation steps.

SystemUtil.Run "flight4a.exe","","","open"

Dialog("Login").WinEdit("Agent Name:").Set "Guru99"

Dialog("Login").WinEdit("Password:").Set "Mercury"

Dialog("Login").WinButton("OK").Click

'Check Flight Reservation Window has loaded after successful log-on

Window("Flight Reservation").Check CheckPoint("Flight Reservation")

Advantages

* Fastest way to generate script
* Automation expertise not required
* Easiest way to learn the features of the Testing Tool

Disadvantages

* Little reuse of scripts
* Test data is hard coded into the script
* Maintenance Nightmare

2) The Test Library Architecture Framework

It is also know as "Structured Scripting" or "Functional Decomposition".

In this Framework , test scripts are initially recorded by “Record & Playback” method. Later, common tasks inside the scripts are identified and grouped into Functions. These Functions are called by main test script called Driver in different ways to create test cases.
Ex: Using the same example as above, the function for logging in to Flight Reservation will look like .

Function Login()

SystemUtil.Run "flight4a.exe","","","open"

Dialog("Login").WinEdit("Agent Name:").Set "Guru99"

Dialog("Login").WinEdit("Password:").Set "Mercury"

Dialog("Login").WinButton("OK").Click
End Function

Now, you will call this function in the main script as follows

'Driver Script

Call Login()

----------------------------------------------------

Other Function calls / Test Steps.

----------------------------------------------------

Advantages

* Higher level of code reuse is achieved in Structured Scripting as compared to “Record & Playback”
* The automation scripts are less costly to develop due to higher code re-use
* Easier Script Maintenance

Disadvantages

* Technical expertise is necessary to write Scripts using Test Library Framework.
* More time is needed to plan and prepare test scripts.
* Test Data is hard coded within the scripts

3) The Data-Driven Testing Framework

In this Framework , while Test case logic resides in Test Scripts, the Test Data is separated and kept outside the Test Scripts.Test Data is read from the external files (Excel Files, Text Files, CSV Files, ODBC Sources, DAO Objects, ADO Objects) and are loaded into the variables inside the Test Script. Variables are used both for Input values and for Verification values. Test Scripts themselves are prepared either using Linear Scripting or Test Library Framework.

Ex: Developing the Flight Reservation Login script using this method will involve two steps.

Step 1) Create a Test - Data file which could be Excel , CSV , or any other database source.



AgentName

Password

Jimmy

Mercury

Tina

MERCURY

Bill

MerCURY

Views: 32

Tags: Automation, FrameWorks, Test

Comment

You need to be a member of Quality Testing to add comments!

Join Quality Testing

Comment by Sriya Rajan on April 14, 2010 at 4:12pm
Siva,

Can you explain other two frame works also.

Thanks in advance

Regards,
Sriya

TTWT Magazine

Advertisement

You Can


Call for Articles

Advertisement

Videos

  • Add Videos
  • View All

Badge

Loading…

© 2012   Created by Quality Testing.

Badges  |  Report an Issue  |  Terms of Service