Skip to main content
TEST AUTOMATION
Ganesh Pagade
Introduction
 Automation – Testing which can be done
programmatically.
 Far more efficient than manual testing
 More complex than it appears
Testing and Automation are Different
Economic Evolvable
Exemplary
Effective
Automated
tests (after
many runs) Manual
test
First run of
automated test
Promises of Test Automation
 Run existing tests on a new version of a program
 Run more tests more often
 Perform tests which would be difficult or impossible
to do manually
 Better use of resources
Promises of Test Automation…
 Consistency and repeatability of tests
 Reuse of tests
 Earlier time to market
 Increased confidence
Automation and Agile
Development
Team
Create
Application Code
Create Tests
Automate Tests
QA Testers
Automation
Team
Create
Application Code
Create Tests
Automate Tests
Create
Application Code
Create Tests
Automate Tests
Start of
Development
End of
Iteration 1
End of
Iteration 2
End of
Iteration 3
Continuous Integration Continuous Integration Continuous Integration
What to Automate?
Identify
Design
Build
Execute
Check
Governs the quality of tests
Good to automate
Intellectual
Clerical
Scripting
 Test Script – data and/or instructions with a formal
syntax, used by a test execution automation tool,
typically held in a file.
 Writing scripts is much like writing a computer
program.
 Reduce amount of scripting.
Attributes of a Script Set
 Number of Scripts
 Size of Scripts
 Function
 Documentation
 Reuse
 Structured
 Maintenance
Automated Comparison
 Verification by comparison
 Dynamic comparison
 Post-execution comparison
 Integration of test execution and post-execution
comparison
Automated Comparison…
Start test tool,
select and run
test cases
Determine
test case
success or
failure
Run
comparator(s)
Determine
post-execution
comparison
success or
failure
Run test cases
(including
any dynamic
comparisons)
Perform
comparisons
Manual Tasks
Tool Tasks
Automated Comparison…
Start test tool,
select and run
test cases
Determine
test case
success or
failure
Determine
post-execution
comparison
success or
failure
Run test cases (including
any dynamic
comparisons) and post-
execution comparisons
Manual Tasks
Tool Tasks
Testware Architecture
 Testware – all the artifacts required for testing
 Architecture – arrangement of all of these artifacts
 Test Sets – logical collection of testware artifacts
 Test Suite – collection of Test Sets to meet a given test
objective
 Testware Library – a repository of the master
versions of all Testware Sets
Testware Architecture…
Test Suite
Script Set Test Set Data Set Utility
Set
Scripts
Input
Documentation
Expected
Outcome
Data Utilities
Configuration
Items
Testware
Artifacts
Baseline
Automating Pre & Post Processing
Manual Process
Pre & Post Processing
Select/Identify test cases to run
Set up test environment:
• Create test environment
• Load test data
Repeat for each test case:
• Set up test prerequisites
• Execute
• Compare results
• Log results
• Clear up after test case
Clean up test environment:
• Delete unwanted data
• Save important data
Summarize Results
Analyze test failures
Report defects
Automating Pre & Post Processing…
 Pre-processing tasks – Create, Check, Reorganize,
Convert
 Post-processing tasks – Delete, Check, Reorganize,
Convert
 Processing at different stages
 What should happen after test case execution?
Limitations of Automation
 Does not replace manual testing
 Manual tests find more defects than automated tests
 Greater reliance on the quality of the tests
 Test automation does not improve effectiveness
 Test automation may limit software development
 Tools have no imagination
Career Opportunities
 Test Automation Architect – designs the overall structure
of the automation
 Test Automator – responsible for designing, writing,
and maintaining the automation software
 Bridge between the Tester and the Tool
 Good Programming Skills – SDET
 Scripting – Perl, Python, Shell, sed, AWK etc
 Debugging and Analysis
References
 Software Test Automation - Dorothy Graham and
Mark Fewster
 Experience of Test Automation - Dorothy Graham
and Mark Fewster
 Presentations and White Papers from cigital.com