Making Test Automation Work in Agile Projects

Similar documents
Seven Key Factors for Agile Testing Success

SQDG May Janet Gregory, DragonFire Inc. With material from Lisa Crispin. Copyright 2011

Seven Key Factors for Agile Testing Success

The Secret to Successful Test Automation

AgileBill Krebs. Agile3d Academy. Enterprise Open Distributed. Agile Quality. Years 30 Books 240. Certs 8. Badges 6. O, Rq, Pm, Qa, Ns, Agile 01

Testing in an Agile Environment Understanding Testing role and techniques in an Agile development environment. Just enough, just in time!

Beginning with the End in Mind: Driving Development with Acceptance Tests

Test Automation Practice STC 2012

Agile, Testing, and Quality: Looking Back, Moving Forward

BEHAVIOR DRIVEN DEVELOPMENT BDD GUIDE TO AGILE PRACTICES. Director, Strategic Solutions

Test Driven Development

Test Automation. Fundamentals. Mikó Szilárd

Testing in the Agile World

Shift Left Testing: are you ready? Live Webinar, Sept 19

About Us. Services CONSULTING OUTSOURCING TRAINING MENTORING STAFF AUGMENTATION 9/9/2016

Seven Deadly Sins of Agile Testing

Agile Test Automation ICAgile

Extreme programming XP 6

A few more things about Agile and SE. Could help in interviews, but don t try to bluff your way through

Agile Testing Practices Good Food for all Teams

ICAgile Learning Roadmap Agile Testing Track

How technical excellence helps in LeSS adoption. Anton Bevzuk Dodo Pizza Chief Agile Officer

Test-driven development

Story Writing Basics

How Testers Can Help Drive Agile Development

Completely

Development Processes Agile Adaptive Planning. Stefan Sobek

Bob Galen. Bob began as a developer, then moved to Project Management and Leadership, then Testing.

WEB & MOBILE AUTOMATION

Project Automation. If it hurts, automate it! Jan Pool NioCAD University of Stellenbosch 19 March 2008

Let s Test South Africa. Tim Coulter, 2014

Test Automation: Agile Enablement for Business Intelligence Teams

Agile Tester Foundation E-learning Course Outline

Eclipse Summit Europe Summary

Agile Testing Course: 15 16/11

A Tale of Continuous Testing

Maja Schreiner. 9th Lean, Agile & Scrum Conference 2017

A CONFUSED TESTER IN AGILE WORLD

Evolutionary Architecture and Design

Architecture and Design Evolution

Designed in collaboration with Infosys Limited

How Can Testing Teams Play a Key Role in DevOps Adoption?

Introduction to Automated Acceptance Testing

How Can a Tester Cope With the Fast Paced Iterative/Incremental Process?

How to Build an Appium Continuous Testing Pipeline

Requirement Engineering within an Agile Environment BY KEJI GIWA. Digital Bananas Technology

Automated Acceptance Testing

Software Testing Workshop 2014 Introduction

Ready for Scrum? Steve Hutchison DISA T&E

Software Development Process Models

Adapt your tes-ng approach for Agile

CONFERENCE PROCEEDINGS QUALITY CONFERENCE. Conference Paper Excerpt from the 28TH ANNUAL SOFTWARE. October 18th 19th, 2010

Final Paper. Automation in Agile Testing. Vijay Kumar - Senior Software Engineer - Testing CenturyLink Technologies

You Bet Your Life. Playing The Automation Tool Selection Game. Paul Grizzaffi

Introduction to. and. Scott W. Ambler Source Documents

The Business and Test Analysts Guide to Acceptance Test-Driven Development. Dale Emery

Inverting the Pyramid

Utilizing Fast Testing to Transform Java Development into an Agile, Quick Release, Low Risk Process


3 Continuous Integration 3. Automated system finding bugs is better than people

XP Evolution Rachel Davies

CS 307: Software Engineering. Lecture 10: Software Design and Architecture

Test-Driven Porting. 1 Introduction

QMS ISO 9001:2015 CERTIFIED COMPANY Software Testing TRAINING.

AN ISO 9001:2008 CERTIFIED COMPANY. Software Testing TRAINING.

VIEW POINT. Choosing the right automation tool and framework is critical to project success. Harsh Bajaj, Technical Test Lead ECSIVS, Infosys

Ride the wave of automation to survive the digital transformation storm. December, 2017

Agile is from Mars Usability is from Venus

Test Automation Strategies in Continuous Delivery. Nandan Shinde Test Automation Architect (Tech CoE) Cognizant Technology Solutions

The 4 Ts of Test Automation: Your Planning Guide to Success Workshop. Presented By: David Dang Questcon Technologies

Moving from a Paper to Paperless validation effort and how to get the most efficient mix of Manual vs. Automated testing.

The ROI of UI Toolkit Standardization

One of the fundamental kinds of websites that SharePoint 2010 allows

Agile Manifesto & XP. Topics. Rapid software development. Agile methods. Chapter ) What is Agile trying to do?

Refactoring Without Ropes

Agile vs Fragile. Susmit Bhattacharya, Solution Architect, Asia Pacific. - The need for Automation in Agile Tricentis GmbH. All Rights Reserved.

Achieving Right Automation Balance in Agile Projects

Automated testing in Agile SW development

SECURITY AUTOMATION BEST PRACTICES. A Guide on Making Your Security Team Successful with Automation SECURITY AUTOMATION BEST PRACTICES - 1

Sahi. Cost effective Web Automation

Final Paper/Best Practice/Tutorial Advantages OF BDD Testing

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an with the URL Grading:

Acceptance Testing What does it mean to you?

Analysis of the Test Driven Development by Example

The Power of Unit Testing and it s impact on your business. Ashish Kumar Vice President, Engineering

I keep hearing about DevOps What is it?

Open Source Test Automation: Riding the Second Wave

a brief introduction to creating quality software continuously Copyright 2011 Davisbase, LLC

The Art of Unit Testing

Software Engineering 2 (SWT2)

Agile Behaviour Driven Development (BDD) and Integrated Testing with the Cucumber Framework. Melbourne ANZTB SIGIST, 15 th June 2011

Story Refinement How to write and refine your stories so that your team can reach DONE by the end of your sprint!

DevOps CICD for VNF a NetOps Approach

Security Automation Best Practices

Exam Questions

Using Storyotypes to Split Bloated XP Stories

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Acceptance Testing. How CSlim and FitNesse Can Help You Test Your Embedded System. Doug Bradbury Software Craftsman, 8th Light

Shift Left, Automation, and Other Smart Strategies for Getting Ahead in QA

Agile Software Development Agile UX Work. Kati Kuusinen TUT / Pervasive / IHTE

Transcription:

Making Test Automation Work in Agile Projects StarEast 2011 Lisa Crispin With Material from Janet Gregory 1

Introductions: Experience, Goals 2

Introduction - Me Programming background Test automation from mid-90s Agile from 2000 Many new automation possibilities! 3

Introduction - You Main role on team? Programming, automation experience? Using agile approach? Current level of automation? (Test, CI,deployment, IDEs, SCCS...) 4

Takeaways Foundation for successful test automation Whole Team approach When to automate Apply agile principles, practices Good test design principles Identifying, overcoming barriers Choosing, implementing tools First steps We won t do any hands-on automation, but will demo some examples 5

Exercise: Your Learning Goals 6

Why Automate? Free up time for most important work Repeatable Safety net Quick feedback Help drive coding Tests provide documentation 7

Barriers to Test Automation What s holding you back? 8

Pain and Fear Programmers don t feel manual test pain Testers treated as safety net Fear Programmers lack testing skills Testers lack programming skills 9

Effort Initial Investment Hump of pain Legacy code, changing code Tools, infrastructure, time Time

It s Worth It ROI explain to management Present value of automated tests Acknowledge hump of pain 11

Economics of Test Design Poor test practices/design = poor ROI Tests had to understand, maintain Good test practices/design = good ROI Simple, well-designed, refactored tests 12

Exercise 13

Questions? 14

Getting Over the Hump The test automation pyramid The agile testing quadrants What should be automated What shouldn't Difficult areas Test design 15

Test Automation Pyramid 16

Agile Testing Quadrants 17

What Should We Automate? Quadrant 1 tests Unit, component, TDD Quadrant 2 tests Behind GUI, API, web services Quadrant 4 tests Load, performance, stress Quadrant 3 tests? Leverage automation where useful 18

What Shouldn t We Automate? Quadrant 2 tests Wizard of Oz, prototyping Quadrant 3 tests Usability, UAT, ET Tests that will never fail? Assess risk ROI not enough One-off tests 19

Where Should We Be Careful? GUI tests Need to test the GUI Watch ROI End-to-End tests Push testing down to lowest level Robust lower-level tests = better ROI Remember the Pyramid 20

Hard to Automate? Legacy code Hard to automate, or just lack of skill? Working Effectively with Legacy Code Feathers Strangling Fowler, Thomas 21

Exercise: Low-Hanging Fruit 22

Agile Automation Strategy What hurts the most Layered approach Applying agile principles Whole team approach Small chunks/thin slices Smart test design Choosing the right tools 23

What Hurts the Most Keep an impediment backlog What s biggest obstacle? Time Tools Code design... 24

Multi-Layered Approach Example: Developers address unit tests While testers write GUI smoke tests 25

Whole-Team Approach Team responsible for testing, quality Testable architecture Team responsible for testing activities Whole team has all the skills needed Good code design skills essential Team designs for ease of test automation 26

Exercise: Skills 27

Simplicity Address one or two needs at a time Understand the problem first Try simplest approach first Work in small chunks, thin slices Incremental & iterative 28

Automate a Slice at a Time Example: 4-step UI to validate, upload profit sharing contribution data Thread 1: All four pages with navigation Thread 2: Select year, enter description on page 1, display on page 2, browse and upload file on page 2 Thread 3: Validate data in file, display on page 3 Thread 4: Persist data, display success message on page 4 29

Thin Slice Example 30

Mind Map Example 31

Good Test Design Essence of each test is clear Readable by business experts Hide incidental details Create & use a standard template DRY don t repeat yourself Extract duplication using macros, modules, variables, classes, mixins Pair, peer review Use retrospectives, address pain points Refactor 32

Demo Let s illustrate some test design principles with a simple test in FitNesse Your handout has a separate example in Robot Framework. 33

Iterative Feedback Commit to trying new tool/framework/technique for N iterations Plan automation tasks for each iteration Use retrospective to evaluate 34

Learn by Doing Courage don t be afraid to fail Use agile coding practices for automation Simple design Pairing Refactoring Object-oriented, libraries, modules Test-first if scripts have logic Remember small chunks Experiment 35

Questions About Automation Strategy? 36

Exercise: Thin Slices Given this story: As an Internet shopper, I want to know the shipping cost of an item during checkout based on the shipping address, weight and method. Assumptions: User has already entered valid shipping address. User will be able to choose different options for different items. The options are USPS, Ground, 2 day and Overnight. PO Boxes are USPS only. Items > 20 lbs are Ground only. API to cost calculator available, takes postal code and weight Mind map this on a big sheet of paper Identify a basic end-to-end slice of functionality that can be coded, tested and automated 37

Choosing Tools Must be team decision Find time for evaluating Story for tool evaluation Iteration for development team Determine requirements Focus on goals, problems, not tools. Experiment 38

Understand the Purpose What s being automated? eg. Ajax, SSL support; load; embedded s/w Speeding up exploratory testing, test data Documentation Existing tools, environment eg., integration with build process Reporting needs Who s writing, maintaining the tests? Who s using the tests? What for? 39

What Fits Your Situation Existing skills on team Language of application under test Collaboration needs Utilities (automating tedious tasks) vs. Testing Life span, future use of tests 40

Vendor Tools - Pros Existing expertise Some built on open-source libraries Fast ramp-up for non-programmers Perceived as safe choice Training, support Part of existing tool set May have robust features 41

Vendor Tools - Cons Tend to be heavyweight Tend to be programmer-unfriendly Scripts may be brittle, high-maintenance Capture-playback problematic Not designed for long-term maintainability Can be pricey 42

Open-Source Tools - Pros Designed by test-infected programmers Designed for agile environments Designed for maintainability Programmer-friendly May have excellent support, tutorials, doc Easily customized Low up-front cost 43

Open-Source Tools - Cons May be difficult for non-programmers Depends on the tool/framework Future enhancements may be uncertain Training, support can be an issue Be sure to look for active development community 44

Home-Brewed - Pros Programmer-friendly Integration with app, IDEs Development framework may support Rails, Ruby, Groovy Can build on top of existing framework Fit, Slim, Watir, RSpec Specifically tailored to needs Someone s there to address problems 45

Home-Brewed - Cons Team needs enough bandwidth, expertise Reporting framework Allow test specification by nonprogrammers Could be harder sell to management 46

Where To Find Tools www.softwareqatest.com/qattls1.html www.testingfaqs.org www.opensourcetesting.org awta.wikispaces.com/2009toolslist groups.yahoo.com/group/agile-testing http://bit.ly/agiletesttools - aa-ftt spreadsheet 47

Example: My Team s Tool Choices IntelliJ Idea, Eclipse for IDEs CruiseControl, Hudson for CI JUnit for TDD, unit, component FitNesse for functional, behind GUI Canoo WebTest for GUI regression smoke tests Watir to aid exploratory testing JMeter for load, performance testing Perl scripts for comparing files, making files human-readable Java programs for concatenating forms, cover letters 48

Exercise: Tools 49

Making Test Automation Work Time to do it right Learning culture Testable architecture Test data Managing tests 50

Time To Do It Right Limit scope, don t over-commit Write automation task cards Quality must be team goal Long-term, will let you go faster 51

Learning Culture OK to make mistakes Lots of small experiments Slack Evolve right design 52

Testable Architecture Layered architecture eg. UI, business logic, data access Ports and Adapters pattern App can work without UI or database Ports accept outside events Adapters convert for human or automated users 53

Test Data Avoid database access when possible Setup/Teardown Independent, rerunnable tests Canonical data Refresh before each test run Customizable data for ET Production-like data Get customers to provide example data 54

Managing Automated Tests Documenting tests Tests as documentation Finding what you need Running tests Continuous Integration Reporting results Analyze failures Test coverage 55

Tests as Documentation Automated tests can be readable by everyone Examples can be turned into tests easily by a framework Automation can be hidden or built in Given/When/Then BDD style is one way Do or Scenario fixture is another way Must work for YOUR company Tests automated in CI must pass = documentation is up to date! 56

Any Example Can Become a Test 57

Given/Then/When Example Scenario: Valid name search returns results GIVEN that Kant is a supervisor with employees AND Kant has an employee named Smith WHEN Kant navigates to the employee name search page AND enters the value S THEN Kant will see a search result that includes Smith 58

FitNesse Do Fixture Example: My Team s Tool Choices 59

Test Management Tools Tool may include management framework FitNesse Wiki documentation + executable tests Hierarchy Rasta spreadsheets to organize tests Twist uses Eclipse IDE What problem are you trying to solve? Simplest approach Check tests into same sccs as production code 60

Exercise: Tests as Documentation 61

Key Success Factors Whole team approach Simple approach Iterative feedback Good test design Agile principles, practices Learning culture 62

Succeeding with Test Automation Don t overcommit budget time to automate tests Well-designed tests mean speed later Need testable architecture, design But don t get stuck, find a way Keep feedback loop short use CI Team designs how much coverage is enough Focus on feature coverage, not % of code Tests are documentation 63

Exercise: Breaking Barriers 64

Remember It s a team problem! Build foundation of core agile practices Design investment, refactoring pay off Experiment Baby steps 65

Questions? Aha Moments? 66

Agile Testing: A Practical Guide for Testers and Agile Teams By Lisa Crispin and Janet Gregory www.agiletester.ca Copyright 67 2010: Lisa Crispin

Now Available Beautiful Testing: Leading Professionals Reveal How They Improve Software Edited by Tim Riley, Adam Goucher Includes chapter by yours truly Copyright 68 2010: Lisa Crispin

Test Patterns Xunit Test Patterns: Refactoring Test Code By Gerard Meszaros Copyright 69 2010: Lisa Crispin

Bridging the Communication Gap Specification By Example and Acceptance Testing Gojko Adzic 70 Copyright Copyright 2008 Janet 2010: Gregory, Lisa Crispin DragonFire

Specification by Example How successful teams deliver the right software Gojko Adzic Case studies from > 50 teams 71 Copyright Copyright 2008 Janet 2010: Gregory, Lisa Crispin DragonFire

Agile Test Automation Resources dhemery.com/pdf/writing_maintainable_automated_accep tance_tests.pdf lisacrispin.com janetgregory.ca gokjo.net exampler.com agile-testing@yahoogroups.com testobsessed.com testingreflections.com pairwith.us 72