Professional Documents
Culture Documents
Why?
• Manual Testing of all workflows, all fields, all negative scenarios is
time and money consuming
• It is difficult to test for multilingual sites manually
• Automation does not require Human intervention. You can run
automated test unattended (overnight)
• Automation increases the speed of test execution
• Automation helps increase Test Coverage
• Manual Testing can become boring and hence error-prone.
Which Test Cases to Automate?
• High Risk - Business Critical test cases
• Test cases that are repeatedly executed
• Test Cases that are very tedious or difficult to perform manually
• Test Cases which are time-consuming
The following category of test cases are not suitable for automation:
• Test Cases that are newly designed and not executed manually at least once
• Test Cases for which the requirements are frequently changing
• Test cases which are executed on an ad-hoc basis.
Automated Testing Process:
Test tool selection
• Test Tool selection largely depends on the technology the Application
Under Test is built on. For instance, QTP does not support Informatica. So
QTP cannot be used for testing Informatica applications. It's a good idea
to conduct a Proof of Concept of Tool on AUT.
Define the scope of Automation
• The features that are important for the business
• Scenarios which have a large amount of data
• Common functionalities across applications
• Technical feasibility
• The extent to which business components are reused
• The complexity of test cases
• Ability to use the same test cases for cross-browser testing
Planning, Design, and Development
• Automation tools selected
• Framework design and its features
• In-Scope and Out-of-scope items of automation
• Automation testbed preparation
• Schedule and Timeline of scripting and execution
• Deliverables of Automation Testing
Test Execution
• Automation Scripts are executed during this phase. The scripts need
input test data before there are set to run. Once executed they
provide detailed test reports.
• Execution can be performed using the automation tool directly or
through the Test Management tool which will invoke the automation
tool.
• Example: Quality center is the Test Management tool which in turn it
will invoke QTP for execution of automation scripts. Scripts can be
executed in a single machine or a group of machines. The execution
can be done during the night, to save time.
Maintenance
1) Linear Scripting
• Advantages
• Fastest way to generate a script
• Automation expertise not required
• The easiest way to learn the features of the Testing Tool
• Disadvantages
• Little reuse of scripts
• Test data is hardcoded 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
2) The Test Library Architecture Framework.
• 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.
3) The Data-Driven Testing Framework.
• Step 1) Create a Test - Data file which could be Excel , CSV , or any
other database source.
• Step 2) Develop Test Script and make references to your Test- Data
source.
3) The Data-Driven Testing Framework.
• Advantages
• Changes to the Test Scripts do not affect the Test Data
• Test Cases can be executed with multiple Sets of Data
• A Variety of Test Scenarios can be executed by just varying the Test Data in the
External Data File
• Disadvantages
• More time is needed to plan and prepare both Test Scripts and Test Data
4) The Keyword-Driven or Table-Driven Testing Framework
• If you observe in this case the Keywords Set , Click , Verify remain the same for
which corresponding component functions are already developed. All you need to
do is change the Application Mapping (Object Repository) from earlier Flight
Reservation to Yahoo Mail , with a change in argument values and the same script
will work!
4) The Keyword-Driven or Table-Driven Testing Framework
• Advantages
• Provides high code re-usability
• Test Tool Independent
• Independent of Application Under Test, the same script works for AUT (with
some limitations)
• Tests can be designed with or without AUT
• Disadvantages
• Initial investment being pretty high, the benefits of this can only be realized if
the application is considerably big and the test scripts are to be maintained for
quite a few years.
• High Automation expertise is required to create the Keyword Driven Framework.
5) The Hybrid Test Automation Framework.
• Smoke Testing
• Unit Testing
• Integration Testing
• Functional Testing
• Keyword Testing
• Regression Testing
• Data Driven Testing
• Black Box Testing
How to Choose an Automation Tool?
• Environment Support
• Ease of use
• Testing of Database
• Object identification
• Image Testing
• Error Recovery Testing
• Object Mapping
• Scripting Language Used
• Support for various types of test - including functional, test management, mobile, etc...
• Support for multiple testing frameworks
• Easy to debug the automation software scripts
• Ability to recognize objects in any environment
• Extensive test reports and results
• Minimize training cost of selected tools