Making (Business) Sense of Automated Testing

A presentation at Agile Testing Days in November 2019 in Potsdam, Germany by Iancho Dimitrov

Slide 1

Slide 1

Iancho Dimitrov linkedin.com/in/iancho @iandim Agile Testing Days, Potsdam November 7th, 2019

Slide 2

Slide 2

GOAL To efficiently and sustainably provide actionable insight on the state of quality through efficient test execution. Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 2

Slide 3

Slide 3

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 3

Slide 4

Slide 4

Trophies | Scars | Part-of-my-job Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 4

Slide 5

Slide 5

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 5

Slide 6

Slide 6

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 6

Slide 7

Slide 7

• Test Automation is not always - appropriate / necessary - cost effective • Even when appropriate and cost effective it often fails to deliver results – and to survive Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 7

Slide 8

Slide 8

Possible BENEFITS • reduced – cost of testing – time needed for testing (i.e. “time to market/production”) • more time spent by QA Engineers on meaningful work with higher added value Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 8

Slide 9

Slide 9

Possible BENEFITS • • test EXECUTION coverage o broader (incl. versions, environments, devices) o deeper (variations of test data) o tests that are impossible to do manually DevOps, CI/CD Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 9

Slide 10

Slide 10

Possible BENEFITS • test more often –> catch bugs early –> reduced bug-fixing cost • higher reliability (people make mistakes in repetitive tasks) • motivated, fulfilled and happy QA Engineers • can be used for monitoring on production Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 10

Slide 11

Slide 11

Source: “The Evolution of Test Automation 2018” QASymphony and TechWell Survey 11

Slide 12

Slide 12

…but it comes with its COSTS • commercial tools - licenses • infrastructure resources • team members training • PoC implementation Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 12

Slide 13

Slide 13

…but it comes with its COSTS • new tests design and implementation • (!) framework architecture setup, maintenance & enhancement • (!) tests execution, results analysis, reporting and defect tracking • (!) tests maintenance • test data management Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 13

Slide 14

Slide 14

Major RISKS • focus on tool selection – instead of on strategy, plan and process • slow start, high initial costs – and canceled prematurely • (!) exploding maintenance costs (changes in SUT, platforms, etc.) • lack of needed skills – and high hopes on “snake oil” tools Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 14

Slide 15

Slide 15

Major RISKS • wrong expectations to replace almost all other QA activities • wrong expectations for quick payback • (!) failure to achieve recognizable goals (esp. with none defined) • unhappy QA Engineers • TA assets to become “shelfware” – in full or partially Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 15

Slide 16

Slide 16

Source: “The Evolution of Test Automation 2018” QASymphony and TechWell Survey 16

Slide 17

Slide 17

Source: “The Evolution of Test Automation 2018” QASymphony and TechWell Survey 17

Slide 18

Slide 18

WRAP-UP • Test Automation is NOT a fit for every project • Many possible benefits – but they come at a cost • Many risks – achieving long-term success not trivial • Hard to start and carry on Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 18

Slide 19

Slide 19

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 19

Slide 20

Slide 20

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 20

Slide 21

Slide 21

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 21

Slide 22

Slide 22

a separate long-term project initiative Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 22 22

Slide 23

Slide 23

  1. Evaluate for yourself first – benefit multipliers? • long-term project? • release often? • many combinations to test? ENVs, devices, OSs, data, etc. • CI/CD? Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 23

Slide 24

Slide 24

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 24

Slide 25

Slide 25

  1. Propose a phased approach • Research & Analysis (invest in it!) • Proof of Concept
  • 2-4 weeks • Trial Phase
  • 2-3 months • Ongoing initiative - long term Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 25

Slide 26

Slide 26

  1. Gather an experienced team • TA (initiatives) Leader • TA Technical Expert / Architect Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 26

Slide 27

Slide 27

  1. Motivated proposal • initial findings – TA applicable? • a comprehensive plan for the PoC • high-level plan for the Trial Phase • expected benefits Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 27

Slide 28

Slide 28

  1. In the project plans include: • costs/efforts estimation (budget) • expected results & deliverables • risks & mitigation plan • team and time allocation • implementation timeline …and be pessimistic in all estimations Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 28

Slide 29

Slide 29

  1. Move on – step by step • Get buy-in from the Budget Owner (adapt proposal if necessary) • Do a successful PoC – and demonstrate the results • Prepare an updated and detailed TA Trial Phase project plan • Pitch the TA Trial Phase proposal, get approval and go forward • Make sure to keep the key stakeholder(s) up to date with progress at all times Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 29

Slide 30

Slide 30

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 30

Slide 31

Slide 31

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 31

Slide 32

Slide 32

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 32

Slide 33

Slide 33

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 33

Slide 34

Slide 34

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 34

Slide 35

Slide 35

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 35

Slide 36

Slide 36

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 36

Slide 37

Slide 37

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 37

Slide 38

Slide 38

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 38

Slide 39

Slide 39

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 39

Slide 40

Slide 40

a separate long-term project initiative Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 40 40

Slide 41

Slide 41

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 41

Slide 42

Slide 42

  1. Set & track TA-Specific Measurable Goals. Examples: • Regression Test Suite for ”Sprint X-1” – 100% automated • Smoke Test Suite – up-to-date all the time • All test run results analyzed and distributed in time (e.g. < 2 hrs.) • Effort spent for maintenance < 15%, and all tests working Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 42

Slide 43

Slide 43

  1. Set & track Measurable & Realistic Goals. Anti-patterns: • “test coverage” (analyzed and well-reported test runs matter) • “test automation of sprint delivery, within the sprint” • bugs found Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 43

Slide 44

Slide 44

  1. Reusable components • 2 aspects – technical & functional • well documented • (!) strict process for technical design …crucial for both speed of implementation & maintenance! Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 44

Slide 45

Slide 45

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 45

Slide 46

Slide 46

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 46

Slide 47

Slide 47

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 47

Slide 48

Slide 48

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 48

Slide 49

Slide 49

  1. Automated “test automation” • configurable runs – different ENV/devices/SUT version • test data prep. & clean-up • scheduling • parallel runs Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 49

Slide 50

Slide 50

  1. Automated “test automation” • 100% separation of Data from Tests • (user friendly) reports, accessible by all team members – incl. screenshots, video recordings, logs Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 50

Slide 51

Slide 51

  1. Automated “test automation” • integration with Test Management system • non-TA team members enabled to execute test suites Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 51

Slide 52

Slide 52

  1. Automated “test automation” • treat it as a software development initiative: – start with the end in mind – architecture – code reviews Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 52

Slide 53

Slide 53

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 53

Slide 54

Slide 54

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 54

Slide 55

Slide 55

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 55

Slide 56

Slide 56

Track and provide transparency on: • Results achieved • Time spent • Work done • Resources used …regularly – on Sprint/Release basis, but at least once in 2 or 3 weeks. Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 56

Slide 57

Slide 57

Sample KPIs for Execution, Results Analysis and Reporting: • Number Test Suite runs • Number Test runs (and % of successful runs) • Number Executed “User actions”(→ man-hours saved) • Percentage “Test Run Results” reports delivered in time • Number Automated Test cycle time Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 57

Slide 58

Slide 58

Sample KPIs for New Tests Design & Implementation: • Percentage Sprint regression TA goal achieved (X out of Y) • Number New tests automated + “user actions” • Number New reusable components created • Number New Smoke tests automated • Number Test Cases designed for automation (and %) Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 58

Slide 59

Slide 59

Sample KPI for Maintenance: • Number Existing tests adapted/maintained Framework/Tooling Enhancement: • < highlights on framework enhancements implemented > Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 59

Slide 60

Slide 60

Sample KPIs for Time spent (quantity & percentage) on: • run results analysis and reporting • new tests implementation • test maintenance • framework/tooling enhancement • other – test data preparation, process optimization, etc. Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 60

Slide 61

Slide 61

KPIs on Doing Test Automation Right (continuous improvement) • track progress on achieving the goals in your prioritized list • track “health” status of all items already achieved (as they tend to deteriorate if not taken care of) Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 61

Slide 62

Slide 62

The regular TA Status Report should be: • short, but comprehensive – 2-3 slides • addressed to and discussed with key stakeholders: - Project Manager / Budget Owner - Test Manager - Scrum Master / Dev Team Leader

  • Product Owner / Lead BA / Product Manager Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 62

Slide 63

Slide 63

TA Status Report – sample elements Effort Distribution (%) Sprint TA Scope DONE 120 100 80 60 40 20 0 Sprint 1 New Tests Impl. Sprint 2 Results Analysis Sprint 3 Maintenance Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing Sprint 4 Framework Enhancements 63

Slide 64

Slide 64

TA Status Report – sample elements Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 64

Slide 65

Slide 65

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 65

Slide 66

Slide 66

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 66

Slide 67

Slide 67

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 67

Slide 68

Slide 68

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 68

Slide 69

Slide 69

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 69

Slide 70

Slide 70

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 70

Slide 71

Slide 71

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 71

Slide 72

Slide 72

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 72

Slide 73

Slide 73

Slide 74

Slide 74

Iancho Dimitrov iancho.d@gmail.com linkedin.com/in/iancho @iandim Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 74

Slide 75

Slide 75

Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 75

Slide 76

Slide 76

Set up Process & Responsibilities for: • planning & case design → technical design → implementation • run → results analysis → reporting & defect tracking • (!) proactive test maintenance • framework/tooling enhancement Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 76

Slide 77

Slide 77

Make the most of TA (execution) results • distribute run results to all relevant team members (mailgroups) • meaningful descriptions – incl. screenshots, input data, logs • regularly update all team members on progress on key TA goals: - could be once in 3, 4 or 6 months - semi-formal gathering (e.g. a Lunch&Learn/Brown-bag session) - gather feedback Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 77

Slide 78

Slide 78

Assure links & traceability between artifacts: • User Story / Feature • Test Case • Test Run Reports • Defects Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 78

Slide 79

Slide 79

Design for automation: • the right test cases • designed for automated testing • decomposed to the needed level of reusable components (vs. automating tests designed for manual testing) Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 79

Slide 80

Slide 80

Cross-functional team members involvement in TA • Developers – assuring TA-friendly software • BA/PO/PMs – design & prioritization, esp. “what’s next” • Test Management – integration of TA in the QA Strategy & Plan …and vice versa - TA Engineers – biz domain; features, requirements Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 80

Slide 81

Slide 81

• Do Test Automation Right - so many things to address: - make a goals list – prioritized - reap the low-hanging fruit (things mostly within your control) - work on achieving the goals, track progress • Measure | Communicate | Optimize Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 81

Slide 82

Slide 82

• Don’t expect to achieve everything quickly • Make a custom list for your initiative – and prioritize it • Reap the low-hanging fruit • Set deadlines, track progress – and work on these one step at a time Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 82

Slide 83

Slide 83

☺ Iancho Dimitrov iancho.d@gmail.com LinkedIn.com/in/iancho Agile Testing Days 2019, Potsdam – Making (Business) Sense of Automated Testing 83