automated testability. the missing link in test automation · 2019-07-25 · software testing...

26
John A. Fodeh [email protected] Automated Testability The Missing Link in Test Automation W14 – Dec. 1 th 2004

Upload: others

Post on 28-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

John A. [email protected]

Automated TestabilityThe Missing Link in Test Automation

W14 – Dec. 1th 2004

Page 2: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide2

Contents

Rationale for Test AutomationWhat is Automated TestabilityDesign for Automated TestabilityApplying a Risk Based Approach

Page 3: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide3

Rationale for Test Automation

Increasing software size and complexity

Demanding regulations

Shorter time-to-market

Better quality

Agile development methodologies

Artist Unknown, Circa 1895From Computer Desktop Encyclopedia© 2001 The Computer Language Co. Inc.

Page 4: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide4

Many test automation initiatives fail!

A key factor for failure is that software is not developed with test/automation in mind

Missing management awareness

Test/automation needs not included in requirements

Automation applied late, taking too much time

Immature approaches using Capture/Replay through the Graphical User Interface

Page 5: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide5

What is Automated Testability“Automated testability is the degree to which

the software under test facilitates the implementation, execution and maintenance

of automated testing”

Automated testability is about interfaces:Between software under test and test softwareBetween requirements and implemented features Between developers and testers

Page 6: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide6

The Price of Poor Automated Testability

Higher implementation effort Higher maintenance effortBuggy and unstable scriptsAutomating what is easy to automate instead of what is important!Loss of confidence in test tool”Shelfware”

Page 7: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide7

Quality Attributes of Automated Testability

VisibilityControlPersistenceConsistencyReliabilityDocumentation

Page 8: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide8

VisibilityAbility to identify: output, states, properties, system interactions, resource usage, errors

Completion of actionsCurrent stateIntermediate resultsError messagesDisk space, memory and CPU usage

Visibility is essential for synchronization

Page 9: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide9

ControlAbility to exercise system

Enter input Trigger events Invoke methods Manipulate GUI widgetsUsing interfaces

Custom and dynamic GUI controls are problematic!

Page 10: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide10

Persistence

The extent and frequency of change in the software under test

Change frequency has great impact on maintenance of automated tests

Changes must be well considered and carefully planned

Impact on test/automation (and side-effects) must be evaluated

Changes must be communicated

Page 11: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide11

GUI ChangesVersion 1.23 Version 1.24

Blue Blue

Window captionsControl typeAdditions and replacements

Default valuesInvisible changes (e.g. internal control name/ID)

Page 12: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide12

ConsistencyThe level of coherence in the look, operation and performance of the software under test Consistency is essential for developing automation librariesTest design patterns

Page 13: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide13

Reliability

The ability of a system to perform its intended function for a specified period of timeTests repeated under identical conditions produce the same resultsA buggy and unstable system can block testing and automation

Page 14: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide14

Documentation

Well specified system and interface is a prerequisite for automation (and testing)Technical documentation should be available and accurateTesters should have access to relevant resources and “oracles”Changes should be communicated

Page 15: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide15

Benefits

Robust, cost-effective and efficient test automationSide benefits:

Testers gain better understanding of system design and behaviorEasier way to reproduce bugsBetter manual testingBetter debugging facilitiesImproved software maintainabilityImproved learnability and usability of system

Page 16: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide16

Test Automation is Software Development

Apply software development best practicesCoding standardDesign for maintainability, reusabilityVersion and source controlReviewDesign documentationError handlingTest

Page 17: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide17

Typical Development and Test Organization

Business Analyst

Software Analyst

Software Developer

Test Analyst

Test Developer

Test Case

Requirements

System Under Test

Test System

Page 18: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide18

A Practical Development and Test Organization

Business Analyst

Software Analyst

Software Developer

Test Analyst

Test Automator

Test Case

Test System

Requirements

Test Designer

System Under Test

Page 19: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide19

Automation Impact Repeatability

Regression tests, smoke test of daily buildNumber of supported platforms, hardware configurations

ImportanceHigh risk functionalityTedious but valuable test

Customer ValueUsage intensity

Effort to run manuallyComplex test, requires specialized skills

Page 20: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide20

Applying a Risk-Based Approach

Assess automation impact: Repeatability, Importance, Customer Value, Effort to run manually

Assess automated testability: Visibility, Control, Persistence, Consistency, Reliability and Documentation

Rank each factor using scale:Low (1)

Medium (2)

High (3)

Plot in matrix

Page 21: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide21

Applying a Risk-Based Approach

Automate

?Don’t automate

?

Automated Testability

OH

RG

IW

EFExample:Installation wizard (IW)Export facility (EF)Report generator (RG)Online help (OH)

Automation Impact

Page 22: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide22

Promoting Automated Testability

Early involvement of testersTest and automation requirementsAssessment of automated testability on prototypesSecurity issues must be considered

Coding standardsNaming convention

Examples: Check Box chkReadOnly (MSDN)

Guidelines for software design (especially GUI)

Page 23: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide23

Promoting Automated Testability

Application ArchitectureSelf-test (automated test incorporated in AUT)Test interface for special controlsAlternative interfaces: Application Programming Interface, Command Line Interface, Protocol Interface

Test Team StructureEstablishing quality gates throughout the processMaking test automation a project issueCommunicating impact of poor automated testability

Page 24: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide24

Summary

Test automation requires a collaborative effort from testers, developers and project managers

Early involvement of testersAutomation requirements are well-defined and communicated at project startAutomation is an integrated part of development

Cost-effective test automation calls for automated testability

Automated testability benefits manual testingAutomated testability helps building better systems

Page 25: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide25

Further InfoMark Fewster and Dorothy Graham, Software Test Automation, Addison Wesley, 1999

www.grove.co.ukLinda Hayes, Automated Testability Tips, StickyMinds.com, Column: Nov 11, 2002

www.stickyminds.comSoftware Testing Hotlist

www.testinghotlist.comHans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software Testing and Quality Engineering, issue nov/dec 1999, Software Quality Engineering

www.stqemagazine.comEd kit: Integrated, Effective Test Design and Automation, Software Development online, issue February 1999

www.sdmagazine.com

Page 26: Automated Testability. The Missing Link in Test Automation · 2019-07-25 · Software Testing Hotlist Hans Buwalda and Maartje Kasdorp, Getting Automated Testing under Control, Software

© 2003 John Fodeh Slide26

Speaker Details

John A. FodehTest coordinator at OticonSeveral years in the field of software testing, test automation and process improvementKey person the SPI project “WHEN”ISEB foundation certificate in software testing Presentations at EuroSPI, EuroSTAR, BCS SIGIST and STARWESTMsc. From the Technical University of Denmark