SlideShare a Scribd company logo
1 of 29
A Test Automation
Framework
Gregory Solovey
Alcatel–Lucent
www.qualitymanagementconference.com
1
2
www.qualitymanagementconference.com
Test related
Processes
Provide
decomposition/
abstraction
Design Tests
Build Harness
Automate
Testing
Include in CI
Framework
There is nothing new under the Sun
3
www.qualitymanagementconference.com
• 10 minutes to automate a test case
• 10 minutes to identify an error
• 10 minutes to update the testware
10/10/10 Goals for Test
Automation Projects
4
www.qualitymanagementconference.com
To paraphrase a quote from Tolstoy’s Anna Karenina:
All successful test automation projects
are alike; each unsuccessful automation
project fails in its own way.
Test Automation
5
www.qualitymanagementconference.com
Test Tools Implementation
Programming language Test language
Data
structures
variables, arrays, hashes TS,UC,TC,TA, buffer
Control
statements
if, case compare
for, while, until loop for TS,UC,TC,TA
Functions subroutine, procedure TC {set, test, compare, tear
down}
Control
flow
algorithm unconditional sequence
Users Developers prefer to use
open source software
which can be adapted
Testers prefer to use
commercial tools, with
technical support
6
www.qualitymanagementconference.com
The Three Pillars of a Framework
• testware hierarchy
• testware organization
• test language
7
www.qualitymanagementconference.com
Application
Layer
Abstraction
Layer
Middleware
Layer
Driver
Layer
Behavior Layer
User documents
Structural Layer
Architectural documents
Functional Layer
Requirements documents
Interface Layer
Design documents
System Hierarchies
8
www.qualitymanagementconference.com
Test Design Techniques:
• Boundary analysis
• Path sensitization
Derived Test Design Methods:
• Arithmetic expressions
• Relational expressions
• Logical expressions
• Algorithm
• State machine
• Instruction set
• Syntax
Test Design Techniques
From test techniques to test methods,
Professional Tester, issue 29, October 2014
9
www.qualitymanagementconference.com
• Test Set (TS) is a part of the testware that verifies a
particular architectural unit of the system.
• Use Case (UC) is a collection of end-to-end scenarios to
cover the functionality of a subsystem.
• Test Case (TC) is a single verification act that moves the
object-to-test from an initial state, executes a test, compares
the actual and expected results, and returns it back to its
initial state; a UC consists of TCs.
• Test Action (TA) is the simplest act of communication with
the object-to-test. A TA supports the interfaces of the object-
to-test (CLI, GUI, SNTP, HTTP).
Testware Hierarchy
Testware Hierarchy
10
www.qualitymanagementconference.com
TS1
UC1
TC1
TA1
TA2
TC2
TA3
TA4
TA5
UC2
TC3
TA6
TA7
TC4
TA1
TA3
TA4
TS2
UC3
TC7
TA30
TA32
TA36
TC8
TA41
TA42
UC4
TC12
TA50
TA55
TC13
TA90
TA92
UC
5
TC21
TA77
TA78
Test
Script 2
Testware File Organization
11
www.qualitymanagementconference.com
Language Commands
interface action words
Test Case calls
business action words
Test
Script 1
Test
Script 3
Config file
TS1
UC1
TC1
TA1
TA2
TC2
TA3
TA4
TA5
UC2
TC3
TA6
TA7
TC4
TA1
TA3
TA4
TS2
UC3
TC7
TA30
TA32
TA36
TC8
TA41
TA42
UC4
TC12
TA50
TA55
TC13
TA90
TA92
UC5
TC21
TA77
TA78
Driver
Libraries
Test case
Libraries
Testware File Organization
12
www.qualitymanagementconference.com
Language Commands
interface action words
Test Case calls
business action words
Config file
Driver
Libraries
Test case
Libraries
TS: ‘verifyMidleware’, ‘verifyAudioDrivers’,
‘verifyMapApplication’
UC: ‘vrfBufferManagement’,
‘vrfProgramMonitor’, ‘vrfFaultNotifications’,
‘vrfNetworkManager’
TC: ‘createBuffer’, ‘FillBuffer’, ‘SendMessage’,
‘SendAlarm’’
TA: ‘set’, ‘send’, ‘push button’, ‘compare’,
‘repeat’, ‘connect’
Testware Scale
13
www.qualitymanagementconference.com
Number
per unit
Total Unique
TS 2-50 25 25
scripts 1-4 60 60
UC 2-10 250 250
TC 2-30 5,000 50
TA 2-10 25,000 25
Test Language
• A test is presented as an unconditional
sequence of TS/UC/TC/TA executions
• The instruction set includes the following
command groups:
– run TS/UC/TC commands (one or multiple
times)
– connection commands
– compare commands
– variable manipulation commands
– limited control commands-pause/stop/exit
14
www.qualitymanagementconference.com
Reliability
• returning the object to its initial state
• handling multiple echoes
• support for stimulus-response
synchronization
• multiple connection attempts
15
www.qualitymanagementconference.com
Output Buffer Structure
16
www.qualitymanagementconference.com
Text
Text
Text
Text
Text
Match Text
Test Case Structure
17
www.qualitymanagementconference.com
Test Case
Tear down phase
Test phase Action
Action
Action
Compare
Action
Action
Verdicts
18
www.qualitymanagementconference.com
Test
object
Verdict Conditions
TA OK
TIMEOUT
ERROR
‘MATCH’ detected in Output Buffer
‘MATCH’ not found after predefined elapsed time
Predefined error detected in Output Buffer
TC PASS
FAIL
All TAs are ‘OK’ & expected result is found in
Output Buffer
At least one TA is not ‘OK’ or a compare failed
UC PASS
FAIL
All TCs ‘PASS’ed
At least one TC ‘FAIL’ed
TS PASS
FAIL
All UCs ‘PASS’ed
At least one UC ‘FAIL’ed
userFuncLib.pm
Framework Structure
19
www.qualitymanagementconference.com
tesToy.pl
ssh/ telnet/ ksh
Failed Cases
Result Log
Debug Log
Capture Log
Config file
connectLib.pm
testCommLib.pm
fullPathib.pm
Test Script
Test Script
Test Script
Test Script
Test Script
Test Script
Test Script
TC Library
Object to
test
The test framework is a data driven
application that reads test data,
provides syntax checking and compiles
the data into internal test structures,
creates the necessary connections to
the object to test, executes the tests
and finally creates the log and result
files.
20
www.qualitymanagementconference.com
Framework Functionality
Debug Log Structure
• Supports TS/UC/TC/TA hierarchy and IDs
• TA: output buffer, rules to capture it, and
how verdict was determined, based on the
buffer content.
• TC: expected and real results and how
verdict was determined, based on the
comparison constraints.
• UC/ TS: how verdict determined, based on
the children verdicts
21
www.qualitymanagementconference.com
10/10/10 Goals
• Test design in 10 minutes
A framework shifts the testers’ focus from writing new
test scripts to reusing existing ones
• Error detection in 10 minutes
The debug file structure allows for easy error
identification and creation of “defect tracker”
• Testware maintenance in 10 minutes
Testware is organized in a fashion that allows to make
unique changes for any single changes in the object-to-
test.
22
www.qualitymanagementconference.com
Example: Triangle Algorithm
23
www.qualitymanagementconference.com
a< b+c and
b<a+c and
c<a+b
a = b a = c
b = c b =c
Not a
triangle (NT)
Equilateral
(ET)
Isosceles
(IT)
Regular
(RT)
0
2
1
1
1
1
0
0
00
Enter a, b, c
1
53
4
1
24
www.qualitymanagementconference.com
TC # description a b c result
1-14 less than 3 parameters , symbols, negative and 0 values for
each parameter
NT
15-17 a<b+c 6
6
11
2
3
3
3
3
9
NT
NT
RT
18-20 b<a+c 2
3
3
6
6
11
3
3
9
NT
NT
RT
21-23 c<a+b 2
3
3
3
3
9
6
6
11
NT
NT
RT
24-26 2: a=b 11
11
3
3
11
11
9
9
9
RT
IT
RT
27-29 3: b=c (a=b) 3
11
11
3
11
11
2
11
3
IT
ET
IT
30-32 4: a=c (a<>b) 3
11
11
11
9
9
12
11
3
RT
IT
RT
33-35 5: b=c (a<>b and a<>c) 11
9
9
3
11
11
2
11
3
RT
IT
RT
Triangle Test Set
tesToy Configuration File
25
www.qualitymanagementconference.com
[tt_defaults]
testwareDir = "/home/user/testware"
swDesc="Triangle Test"
prompt_base = "myServer!user> "
time_out = 5
logDir = '/home/user/logs'
keep_going = 1
expectEchoes = 1
debug_level = 3
[test_files]
TS "verify triangle application" "telnet" "myServer"
run triangle.uc
[libraries]
/home/user/libs/general.lib
[user_vars]
myServer = "135.135.135.135"
tesToy Test Script
26
www.qualitymanagementconference.com
UC set test environment
run general::setDir ("/home/user/bin")
UC verify out-boundary data
run general::whichTriangle ( "", "", "", "error")
run general::whichTriangle ("5", "", "", "error")
run general::whichTriangle ("5", "5", "", "error")
run general::whichTriangle ( "", "5", "5", "error")
run general::whichTriangle ("5", "5", "a", "error")
UC verify that length of first side is less than other two
run general::whichTriangle ( "6", "2", "3", "NT")
UC verify 'a=b' condition
run general::whichTriangle ("11", "3", "9", "RT")
run general::whichTriangle ("11","11", "9", "IT")
tesToy Library
27
www.qualitymanagementconference.com
# execute any command and compare results
TC setDir
send ("cd $P[0]")
send ("pwd")
compare ("$P[0]")
reset_phase
end_of_case
# execute the triangle application and verify output
TC whichTriangle
send ("bin/triangle.pl $P[0] $P[1] $P[2]")
compare ($P[4])
reset_phase
end_of_case
Further Reading
• Embedding testability, Professional Tester, issue 27, August 2014,
8– 15. – how to build testability for an embedded system
• From test techniques to test methods, Professional Tester, issue
29, October 2014, 4 – 14. – how to build the minimum number of
tests that covers all implementation errors
• Automating Inside the Lines, Professional Tester, 2015, issue 30.
– how to build a test automation framework
• A Continuous Integration Test Framework, Testing Experience,
issue 28, December 2014, 30 – 34. – how to build a continuous
integration test framework
• QA of Testing, Professional Tester, issue 28, October 2014, 9 – 12.
- how to automatically monitor the test completeness
28
www.qualitymanagementconference.com
Thank you for attending this session
Send your comments or questions to
gregory.solovey@alcatel-lucent.com
29
www.qualitymanagementconference.com

More Related Content

What's hot

Pragmatic Java Test Automation
Pragmatic Java Test AutomationPragmatic Java Test Automation
Pragmatic Java Test Automation
Dmitry Buzdin
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven Testing
Maveryx
 
Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteria
basma_iti_1984
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
WSO2
 
automation framework
automation frameworkautomation framework
automation framework
ANSHU GOYAL
 
Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automation
srivinayak
 

What's hot (19)

Pragmatic Java Test Automation
Pragmatic Java Test AutomationPragmatic Java Test Automation
Pragmatic Java Test Automation
 
Data driven automation testing of web applications using selenium
Data driven automation testing of web applications using seleniumData driven automation testing of web applications using selenium
Data driven automation testing of web applications using selenium
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
Centralized test automation framework implementation
Centralized test automation framework implementationCentralized test automation framework implementation
Centralized test automation framework implementation
 
Data Driven Testing
Data Driven TestingData Driven Testing
Data Driven Testing
 
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoftTest Automation Demonstration with Dr Yongyan Wang by XBOSoft
Test Automation Demonstration with Dr Yongyan Wang by XBOSoft
 
Automated Testing
Automated TestingAutomated Testing
Automated Testing
 
Test Automation Framework Development Introduction
Test Automation Framework Development IntroductionTest Automation Framework Development Introduction
Test Automation Framework Development Introduction
 
Build Your Custom Performance Testing Framework
Build Your Custom Performance Testing FrameworkBuild Your Custom Performance Testing Framework
Build Your Custom Performance Testing Framework
 
Software Automation Testing Introduction
Software Automation Testing IntroductionSoftware Automation Testing Introduction
Software Automation Testing Introduction
 
Testing Tool Evaluation Criteria
Testing Tool Evaluation CriteriaTesting Tool Evaluation Criteria
Testing Tool Evaluation Criteria
 
Mobile Test Automation Framework : Presented By Shankar Garg
Mobile Test Automation Framework : Presented By Shankar GargMobile Test Automation Framework : Presented By Shankar Garg
Mobile Test Automation Framework : Presented By Shankar Garg
 
How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?How to Build Your Own Test Automation Framework?
How to Build Your Own Test Automation Framework?
 
Keyword Driven Automation
Keyword Driven AutomationKeyword Driven Automation
Keyword Driven Automation
 
WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
 
automation framework
automation frameworkautomation framework
automation framework
 
Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automation
 
Regression Test Automation Framework
Regression Test Automation Framework Regression Test Automation Framework
Regression Test Automation Framework
 
Ivan Pashko - Simplifying test automation with design patterns
Ivan Pashko - Simplifying test automation with design patternsIvan Pashko - Simplifying test automation with design patterns
Ivan Pashko - Simplifying test automation with design patterns
 

Similar to A Test Automation Framework

Mercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using SlidesMercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using Slides
telab
 
project introduction
project introductionproject introduction
project introduction
stinmon
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
Atul Pant
 
ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)
Libero Maesano
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
ankit.das
 

Similar to A Test Automation Framework (20)

A Continious Integration Test Framework
A Continious Integration Test FrameworkA Continious Integration Test Framework
A Continious Integration Test Framework
 
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
TMPA-2017: Regression Testing with Semiautomatic Test Selection for Auditing ...
 
How Manual Testers Can Break into Automation Without Programming Skills
How Manual Testers Can Break into Automation Without Programming SkillsHow Manual Testers Can Break into Automation Without Programming Skills
How Manual Testers Can Break into Automation Without Programming Skills
 
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
 
Maestro_Abstract
Maestro_AbstractMaestro_Abstract
Maestro_Abstract
 
Snow Leopard
Snow LeopardSnow Leopard
Snow Leopard
 
04 test controlling and tracking
04   test controlling and tracking04   test controlling and tracking
04 test controlling and tracking
 
[DevDay2019] Power of Test Automation and DevOps combination - One click savi...
[DevDay2019] Power of Test Automation and DevOps combination - One click savi...[DevDay2019] Power of Test Automation and DevOps combination - One click savi...
[DevDay2019] Power of Test Automation and DevOps combination - One click savi...
 
Mercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using SlidesMercury Testdirector8.0 using Slides
Mercury Testdirector8.0 using Slides
 
project introduction
project introductionproject introduction
project introduction
 
Windows Azure Acid Test
Windows Azure Acid TestWindows Azure Acid Test
Windows Azure Acid Test
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
 
Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahu
 
ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Testing in a distributed world
Testing in a distributed worldTesting in a distributed world
Testing in a distributed world
 
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 

A Test Automation Framework

  • 1. A Test Automation Framework Gregory Solovey Alcatel–Lucent www.qualitymanagementconference.com 1
  • 2. 2 www.qualitymanagementconference.com Test related Processes Provide decomposition/ abstraction Design Tests Build Harness Automate Testing Include in CI Framework There is nothing new under the Sun
  • 3. 3 www.qualitymanagementconference.com • 10 minutes to automate a test case • 10 minutes to identify an error • 10 minutes to update the testware 10/10/10 Goals for Test Automation Projects
  • 4. 4 www.qualitymanagementconference.com To paraphrase a quote from Tolstoy’s Anna Karenina: All successful test automation projects are alike; each unsuccessful automation project fails in its own way. Test Automation
  • 5. 5 www.qualitymanagementconference.com Test Tools Implementation Programming language Test language Data structures variables, arrays, hashes TS,UC,TC,TA, buffer Control statements if, case compare for, while, until loop for TS,UC,TC,TA Functions subroutine, procedure TC {set, test, compare, tear down} Control flow algorithm unconditional sequence Users Developers prefer to use open source software which can be adapted Testers prefer to use commercial tools, with technical support
  • 6. 6 www.qualitymanagementconference.com The Three Pillars of a Framework • testware hierarchy • testware organization • test language
  • 7. 7 www.qualitymanagementconference.com Application Layer Abstraction Layer Middleware Layer Driver Layer Behavior Layer User documents Structural Layer Architectural documents Functional Layer Requirements documents Interface Layer Design documents System Hierarchies
  • 8. 8 www.qualitymanagementconference.com Test Design Techniques: • Boundary analysis • Path sensitization Derived Test Design Methods: • Arithmetic expressions • Relational expressions • Logical expressions • Algorithm • State machine • Instruction set • Syntax Test Design Techniques From test techniques to test methods, Professional Tester, issue 29, October 2014
  • 9. 9 www.qualitymanagementconference.com • Test Set (TS) is a part of the testware that verifies a particular architectural unit of the system. • Use Case (UC) is a collection of end-to-end scenarios to cover the functionality of a subsystem. • Test Case (TC) is a single verification act that moves the object-to-test from an initial state, executes a test, compares the actual and expected results, and returns it back to its initial state; a UC consists of TCs. • Test Action (TA) is the simplest act of communication with the object-to-test. A TA supports the interfaces of the object- to-test (CLI, GUI, SNTP, HTTP). Testware Hierarchy
  • 11. Test Script 2 Testware File Organization 11 www.qualitymanagementconference.com Language Commands interface action words Test Case calls business action words Test Script 1 Test Script 3 Config file TS1 UC1 TC1 TA1 TA2 TC2 TA3 TA4 TA5 UC2 TC3 TA6 TA7 TC4 TA1 TA3 TA4 TS2 UC3 TC7 TA30 TA32 TA36 TC8 TA41 TA42 UC4 TC12 TA50 TA55 TC13 TA90 TA92 UC5 TC21 TA77 TA78 Driver Libraries Test case Libraries
  • 12. Testware File Organization 12 www.qualitymanagementconference.com Language Commands interface action words Test Case calls business action words Config file Driver Libraries Test case Libraries TS: ‘verifyMidleware’, ‘verifyAudioDrivers’, ‘verifyMapApplication’ UC: ‘vrfBufferManagement’, ‘vrfProgramMonitor’, ‘vrfFaultNotifications’, ‘vrfNetworkManager’ TC: ‘createBuffer’, ‘FillBuffer’, ‘SendMessage’, ‘SendAlarm’’ TA: ‘set’, ‘send’, ‘push button’, ‘compare’, ‘repeat’, ‘connect’
  • 13. Testware Scale 13 www.qualitymanagementconference.com Number per unit Total Unique TS 2-50 25 25 scripts 1-4 60 60 UC 2-10 250 250 TC 2-30 5,000 50 TA 2-10 25,000 25
  • 14. Test Language • A test is presented as an unconditional sequence of TS/UC/TC/TA executions • The instruction set includes the following command groups: – run TS/UC/TC commands (one or multiple times) – connection commands – compare commands – variable manipulation commands – limited control commands-pause/stop/exit 14 www.qualitymanagementconference.com
  • 15. Reliability • returning the object to its initial state • handling multiple echoes • support for stimulus-response synchronization • multiple connection attempts 15 www.qualitymanagementconference.com
  • 17. Test Case Structure 17 www.qualitymanagementconference.com Test Case Tear down phase Test phase Action Action Action Compare Action Action
  • 18. Verdicts 18 www.qualitymanagementconference.com Test object Verdict Conditions TA OK TIMEOUT ERROR ‘MATCH’ detected in Output Buffer ‘MATCH’ not found after predefined elapsed time Predefined error detected in Output Buffer TC PASS FAIL All TAs are ‘OK’ & expected result is found in Output Buffer At least one TA is not ‘OK’ or a compare failed UC PASS FAIL All TCs ‘PASS’ed At least one TC ‘FAIL’ed TS PASS FAIL All UCs ‘PASS’ed At least one UC ‘FAIL’ed
  • 19. userFuncLib.pm Framework Structure 19 www.qualitymanagementconference.com tesToy.pl ssh/ telnet/ ksh Failed Cases Result Log Debug Log Capture Log Config file connectLib.pm testCommLib.pm fullPathib.pm Test Script Test Script Test Script Test Script Test Script Test Script Test Script TC Library Object to test
  • 20. The test framework is a data driven application that reads test data, provides syntax checking and compiles the data into internal test structures, creates the necessary connections to the object to test, executes the tests and finally creates the log and result files. 20 www.qualitymanagementconference.com Framework Functionality
  • 21. Debug Log Structure • Supports TS/UC/TC/TA hierarchy and IDs • TA: output buffer, rules to capture it, and how verdict was determined, based on the buffer content. • TC: expected and real results and how verdict was determined, based on the comparison constraints. • UC/ TS: how verdict determined, based on the children verdicts 21 www.qualitymanagementconference.com
  • 22. 10/10/10 Goals • Test design in 10 minutes A framework shifts the testers’ focus from writing new test scripts to reusing existing ones • Error detection in 10 minutes The debug file structure allows for easy error identification and creation of “defect tracker” • Testware maintenance in 10 minutes Testware is organized in a fashion that allows to make unique changes for any single changes in the object-to- test. 22 www.qualitymanagementconference.com
  • 23. Example: Triangle Algorithm 23 www.qualitymanagementconference.com a< b+c and b<a+c and c<a+b a = b a = c b = c b =c Not a triangle (NT) Equilateral (ET) Isosceles (IT) Regular (RT) 0 2 1 1 1 1 0 0 00 Enter a, b, c 1 53 4 1
  • 24. 24 www.qualitymanagementconference.com TC # description a b c result 1-14 less than 3 parameters , symbols, negative and 0 values for each parameter NT 15-17 a<b+c 6 6 11 2 3 3 3 3 9 NT NT RT 18-20 b<a+c 2 3 3 6 6 11 3 3 9 NT NT RT 21-23 c<a+b 2 3 3 3 3 9 6 6 11 NT NT RT 24-26 2: a=b 11 11 3 3 11 11 9 9 9 RT IT RT 27-29 3: b=c (a=b) 3 11 11 3 11 11 2 11 3 IT ET IT 30-32 4: a=c (a<>b) 3 11 11 11 9 9 12 11 3 RT IT RT 33-35 5: b=c (a<>b and a<>c) 11 9 9 3 11 11 2 11 3 RT IT RT Triangle Test Set
  • 25. tesToy Configuration File 25 www.qualitymanagementconference.com [tt_defaults] testwareDir = "/home/user/testware" swDesc="Triangle Test" prompt_base = "myServer!user> " time_out = 5 logDir = '/home/user/logs' keep_going = 1 expectEchoes = 1 debug_level = 3 [test_files] TS "verify triangle application" "telnet" "myServer" run triangle.uc [libraries] /home/user/libs/general.lib [user_vars] myServer = "135.135.135.135"
  • 26. tesToy Test Script 26 www.qualitymanagementconference.com UC set test environment run general::setDir ("/home/user/bin") UC verify out-boundary data run general::whichTriangle ( "", "", "", "error") run general::whichTriangle ("5", "", "", "error") run general::whichTriangle ("5", "5", "", "error") run general::whichTriangle ( "", "5", "5", "error") run general::whichTriangle ("5", "5", "a", "error") UC verify that length of first side is less than other two run general::whichTriangle ( "6", "2", "3", "NT") UC verify 'a=b' condition run general::whichTriangle ("11", "3", "9", "RT") run general::whichTriangle ("11","11", "9", "IT")
  • 27. tesToy Library 27 www.qualitymanagementconference.com # execute any command and compare results TC setDir send ("cd $P[0]") send ("pwd") compare ("$P[0]") reset_phase end_of_case # execute the triangle application and verify output TC whichTriangle send ("bin/triangle.pl $P[0] $P[1] $P[2]") compare ($P[4]) reset_phase end_of_case
  • 28. Further Reading • Embedding testability, Professional Tester, issue 27, August 2014, 8– 15. – how to build testability for an embedded system • From test techniques to test methods, Professional Tester, issue 29, October 2014, 4 – 14. – how to build the minimum number of tests that covers all implementation errors • Automating Inside the Lines, Professional Tester, 2015, issue 30. – how to build a test automation framework • A Continuous Integration Test Framework, Testing Experience, issue 28, December 2014, 30 – 34. – how to build a continuous integration test framework • QA of Testing, Professional Tester, issue 28, October 2014, 9 – 12. - how to automatically monitor the test completeness 28 www.qualitymanagementconference.com
  • 29. Thank you for attending this session Send your comments or questions to gregory.solovey@alcatel-lucent.com 29 www.qualitymanagementconference.com