Organizational Dysfunctions on Testing - Agile Remedies. 2017, Bill Allen / Kieran Murphy. All Rights Reserved.

Similar documents
Automated Test Design as an Improvement to TDD and BDD for Agile Testing

Agile Manifesto & XP

Collaborative Testing: Why We CAN Have Nice Things. How to bring agile acceptance test driven development to the front of the development cycle

Delivering Software Certainty. Atomic Object, Grand Rapids based software development firm Started in 2001 by Carl Erickson and Bill Bereza

04. Agile Development

HARDCORE SCRUM. Focus shift to 4 P s Upping your game Copyright mxm9.com - Maxime Groenewoud

BDD Behaviour Driven Development. Marek Majchrzak, Andrzej Bednarz Wrocław,

Introduction to Agile Life Cycles. CSCI 5828: Foundations of Software Engineering Lecture 07 09/13/2016

Measuring Business Value with Agile

Improving Agile Execution in the Federal Government

Software engineering Facts. CSC Compiler Construction Software Engineering Topics. What is software engineering? What is software?

Behaviour-Driven Development

improving It s what we do. TM

Systems Modernization Strategies August 2017

Software Engineering Lecture 5 Agile Software Development

FIT2101 Software Engineering Process and Management

THE TOP 8 MISTAKES IN REQUIREMENTS ELICITATION

The Three Pillars Approach to an Agile Testing Strategy

Agile Software Development. Agile Software Development Basics. Principles of the Agile Alliance. Agile Manifesto. Agenda. Agile software development

Agile and Automated Testing. Helmut Steineder JIPP.IT GmbH 2015

Agile at Mid-Scale. Al Shalloway. Introducing FLow for Enterprise Transformations (FLEX)

Changing our Ways to Deliver Greater Value

Advice on Conducting Agile Project Kickoff. Meetings

Foundations of Software Engineering. Process: Agile Practices Michael Hilton

Chapter 7. Project Reporting Keeping Everything Visible

Standard Work and the Lean Enterprise Net Objectives Inc. All Rights Reserved.

BEHAVIOR DRIVEN DEVELOPMENT Ritesh Mehrotra. TechTalks, 2018

AN INTRODUCTION TO SCRUM GUIDE SLIDERS

Agile Engineering. for Managers. Introducing agile engineering principles for non-coders

Using Business Analysis to Meet IT Challenges. UW Tech Talks February 14, 2018 Piet Niederhausen, Enterprise Business Architect, UW-IT

NEW! The Project Manager & The Business Analyst. by Barbara A. Carkenord, CBAP, PMP, PMI-ACP

Agile Quality Management

Lecture 1. Topics covered. Rapid p development and delivery is now often the most important requirement for software systems.

l e a n Eight Failure Modes of Agile Software Development software development Those who do not learn from history are doomed to repeat it.

Chapter 3 Agile Software Development. Part 1b

Software Design COSC 4353/6353 D R. R A J S I N G H

Agile Teamwork: 3 Ways to Minimize Handoffs. by Mike Cohn 8 Comments originally published in Better Software on

The Business Value of Agile Transformation

Chapter 3 Agile Software Development

No Bull Agile. Marc J. Balcer September 2017

Agile Test Plan How to Construct an Agile Test Plan

How to Run Agile Development for SAP

On various testing topics: Integration, large systems, shifting to left, current test ideas, DevOps

The Implications of DevOps for Traditional Project Managers. Q: What is the minimum number of days/weeks between releases?

EXtreme Programming explained: embrace change by Kent Beck, Addison Wesley, September 1999.

By: Ronny Trefftzs CSCI 5828: Foundations of Software Engineering Spring 2012 Professor: Kenneth Anderson

Requirements Engineering in Agile Development. Presented by: Rafi Alam

Introduction to Agile and Scrum

Bridging the gap between business and technology

How to do Agile when your organization and/or a business partner does Waterfall? -Commitment from leadership

The tension between agile and architecture

THE AGILE WAY: A complete guide to understanding Agile testing methodologies

BOOKS MORE AGILE TESTING AIDABRAIDS

We are agile but... Gitte Ottosen

Behavior Driven Development

Software Engineering Chap.3 - Agile Software Development

HOW YOUR CAREER BACKGROUND CAN HELP YOU BECOME A BUSINESS ANALYST

Lecture 8 Agile Software Development

What is Continuous Integration. And how do I get there

The Essential Product Owner Partnering with the Team

Scrum er ikke en religion

Child Welfare Digital Services Project Decision Making Framework

Crossing the Chasm Helping Testers Make an Agile Transition Lisa Crispin With material from Janet Gregory

Assessor-3 Release-1 Retrospective-ESI

Tuesday, October 25. Announcements

Mike Vincent. mvasoftware.net

Introduction to the Testing Maturity Model Enhanced TM (TMMe)

7 TIPS TO HELP YOU ADOPT CONTINUAL SERVICE IMPROVEMENT, BY STUART RANCE 1

Scrum - Introduction. Petri Heiramo. Agile Coach, CST

Building a Product Users Want: From Idea to Backlog with the Vision Board

REQUIREMENTS ENGINEERING

Achieving Balance: The New Pivotal Points of Software Development

ABHELSINKI UNIVERSITY OF TECHNOLOGY

Finally! A Model for Evaluating Agile Performance: The Agile Performance Holarchy. Darian Poinsetta Senior Executive Agile CxO

Business Analyst and Product Owner Where do they meet & conflict? Cherifa Mansoura

Sign up to mailing list Join Slack, teaching team is available. All links are on the course website Slides are uploaded there too

7 Misconceptions of Enterprise Agile. August 15

Agile Testing Without Automation

THE STATE OF CITIZEN DEVELOPMENT REPORT SEPTEMBER 2015

Agile Essentials Track: Business Services

MANAGING PEOPLE: A LOST CRAFT

SOLUTION BRIEF CA AGILE REQUIREMENTS DESIGNER FOR CA AGILE CENTRAL. CA Agile Requirements Designer for CA Agile Central

Agile Program Development. Agile Manifesto 9/3/2013. What is Agile Development? 12 Principles of Agile Development 1 of 4

Part 1. Software engineering Facts. CSC 4181 Compiler Construction Software Engineering Lectures. What is software engineering? What is software?

Agile Development Processes. CSCE Lecture 3-08/31/2017

Solution Spotlight AGILE ALM: ATDD TO CONTINUOUS INTEGRATION

How To Evolve a Context-Driven Test Plan

Nitty Gritty of QA Project Management. 11-Feb-09 Carol Perletz

SAFe in a Nutshell SCALED AGILE FRAMEWORK

Our Software Delivery Methodology What to Expect in the Development Process

Project Management CTC-ITC 310 Fall 2018 Howard Rosenthal

Extreme Programming, an agile software development process

Virtually Agile. Astro Sabre (Matt Ganis) IBM, Senior Technical Staff Member Hawthorne, NY - September 20, 2007

Lecture 5. Software Processes CSC 4700 Software Engineering. Software Development Processes. The software process

D25-4. How Intertech Uses Agile

Requirements engineering

Critical Skills for Writing Better Requirements (Virtual Classroom Edition)

Scrum Test Planning. What goes into a scrum test plan?

Handling Product Management Across The Enterprise. copyright Net Objectives, Inc.

The Agile Performance Holarchy

Transcription:

Organizational Dysfunctions on Testing - Agile Remedies 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 1

Introductions: Bill Allen - agile Innovation Labs Bill@agileInnov.com Kieran Murphy - ThoughtWorks KiMurphy@ThoughtWorks.com 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 2

What does testing look like in your organization? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 3

Who does testing? Are any tests business facing? When? % Manual? % Automated? What tools for automation? Are testing and dev in same sprint? What does testing look like in your organization? Challenges? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 4

Typical testing challenges we see Developers: 1. "These is no time to write test cases" 2. "There's no project time allocated to perform unit testing" 3. "It is difficult keeping unit tests up to date" 4. "Deadlines (The DATE) prohibit good testing" 5. "Challenging to know that code is thoroughly tested" 6. "Testers are unfamiliar with coding. They only do manual. They have no visibility into the code operation." 7. "Challenges with early prototyping" 8. "Legacy applications are fragile and difficult to change" 9. "Getting viable test data is difficult" 10."Business test cases vs code test cases (translation: Testing Business Facing vs Code Facing)" 11."We'll write unit tests, but only after we write the code and only if we have time" Testers: "We're told that Automating Acceptance Testing could be beneficial, but we don't code and we don't work closely with the developers. Senior Management: Yes, we see the need for change but planning for it takes too much time. 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 5

Correctness-Driven Development 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 6

Not Testing practices, but instead whole team analysis QA Test Engineer BA PM PO Developer 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 7

Test-Driven Development (TDD) *from Test-Driven Development by Example - Kent Beck 1. Red - Write a little test that doesn t work, and perhaps doesn t even compile at first. 2. Green - Make the test work quickly, committing whatever sins necessary in process. 3. Refactor - Eliminate all of the duplication created in merely getting the test to work. Red/green/refactor the TDD mantra. (preface, p.x) In other chapter the same order is described as general TDD cycle : 1. Write a test 2. Make it run 3. Make it right The goal is clean code that works (thanks to Ron Jeffries for this concise summary) First we ll solve the that works part of the problem. Then we ll solve the clean code part. (p.11) 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 8

Behavior Driven Development Dan North and Chris Matts, 2003-2004, published 2006 While using and teaching agile practices like test-driven development...programmers wanted to know where to start, what to test and what not to test, how much to test in one go, what to call their tests, and how to understand why a test fails. * Tooling for test driven development at the time was primitive, JUnit was a leaky framework and imposed inelegant language on developers practicing TDD Dan North began JBehave in late 2003 intending it to be a replacement for JUnit, removing all reference to test and using behavior instead I found the shift from thinking in tests to thinking in behaviour so profound that I started to refer to TDD as BDD, or behaviour- driven development. * In 2004, after implementing JBehave, Dan North and Chris Matts (BA who collaborated on JBehave), realized that their behavior driven language was an analysis language: If we could develop a consistent vocabulary for analysts, testers, developers, and the business, then we would be well on the way to eliminating some of the ambiguity and miscommunication that occur when technical people talk to business people. * Drives development from outside in, in pull-based fashion, from business-facing tests BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale, high-automation, agile methodology ** * Dan North, Introducing BDD : https://dannorth.net/introducing-bdd/ ** Dan North, Agile Testing, Specifications and BDD Exchange, 2009 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 9

Acceptance Test Driven Development (ATDD) involves team members with different perspectives (customer, development, testing) collaborating to write acceptance tests in advance of implementing the corresponding functionality. customer perspectives what problem are we trying to solve? development perspectives how might we solve this problem? testing perspectives what about? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 10

BDD is TDD people who finally discovered a lamer version of ATDD. In the end they are all just more noisy label to spin on and around. I tend to think of these spaces as: Developer testing (by the geeks for the design) they tell the story of the code Story testing (by the community for the product) they tell the story of the product * David Hussman, DevJam, Minneapolis,MN 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 11

Project Example: Payroll System 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 12

2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 13

BDD / TDD in Action 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 14

Can you give me an example? A ubiquitous language for analysis Can you make it do? How does it do that? What if? Behaviors (examples) 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD QA Test Engineer BA PM PO Developer 15

Gherkin - a formal language for specifying behaviors Feature: Some terse yet descripive text of what is desired Textual descripion of the business value of this feature Business rules that govern the scope of the feature Any addiional informaion that will make the feature easier to understand Scenario: Some determinable business situaion Given some precondiion When some acion by the actor Then some testable outcome is achieved Scenario: Some other determinable business situaion Given some precondiion When some acion by the actor Then some testable outcome is achieved... 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 16

What does whole team analysis look like? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 17

As a team, we will develop a single feature - Add a hourly employee to the payroll system. Discuss Form a team: Product Owner, Developer, Tester; discuss mpayroll system. Tell a story about add a new employee to mpayroll: 1. Why does the feature provide benefit? 2. How will you know the feature works? 3. Ask PO for examples of how this feature should behave. How can we expose the existing payroll system to the network, for access by apps, devices, web browsers? How do I perform C R U D actions? What does an employee records contain? What happens when a new employee is created? What happens if that employee s record already exists? How do I verify that a new employee was created? Feature: Add a new employee Discuss behaviors 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 18

2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 19

Discuss Distill Form a team: Product Owner, Developer, Tester; discuss mpayroll system. Tell a story about add a new employee to mpayroll: 1. Why does the feature provide benefit? 2. How will you know the feature works? 3. Ask PO for examples of how this feature should behave. Feature: Add a new employee Notes: Use HTTP POST to create an employee record? Scenario: Add a new hourly employee Given The employee resource is available And A new hourly employee record When I submit the employee record Then A new hourly employee is created (Behavior Test) Feature: Admin can add a new employee Notes: Use HTTP POST to create an employee record? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 20

BDD Example You can implement missing steps with the snippets below: @Given("^A new hourly employee record$") public void a_new_hourly_employee_record() throws Throwable { // Write code here that turns the phrase above into concrete actions throw new PendingException(); } @When("^I submit the employee record$") public void i_submit_the_employee_record() throws Throwable { // Write code here that turns the phrase above into concrete actions throw new PendingException(); } Develop @Then("^A new hourly employee is created$") public void a_new_hourly_employee_is_created() throws Throwable { // Write code here that turns the phrase above into concrete actions throw new PendingException(); } @feature Feature: Add new employees 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 21

Run mpayroll [ ] { }, { }, { } Demo firstname: "Bill", lastname: "Allen", type: "Commissioned", rate: 0.10000000149011612 firstname: "Stanley", lastname: "Heron", type: "Hourly", rate: 10 firstname: "Kieran", lastname: "Murphy", type: "Hourly", rate: 10 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 22

Pause Applause (optional) 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 23

Top 5 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 24

BILL S - TOP FIVE REASONS TO USE BDD 1. Drives collaboration and communication between business and developers. 2. Provides a common language for the whole-team to understand what is being developed. 3. Allows Business to have quantitative insight on the progress of development. 4. Provides business the answer to the question, What can the software do? 5. Allows behaviors to be written in a natural Business orientated language -- the Given/When/Then format, meaning some can be written by the business. 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 25

KIERAN S - TOP FIVE REASONS TO USE TDD 1. Improved technical architecture - SOLID Principles come for free 2. Results in the least amount of code possible to get the job done 3. Software built from a process of constant incremental change is easy to change later 4. Fosters collaboration and transparency among developers, QA, immediate business stakeholders and management 5. Very satisfying practice 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 26

What would BDD / TDD look like for you? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 27

BDD / TDD in your organization Will it solve your challenges? What can you control: Who performs testing? When? Are testing and dev in same sprint? What % are manual? What % are automated? What tools are used for automation? What % are business facing? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 28

How would BDD/TDD resolve these testing challenges Developers: 1. "These is no time to write test cases" 2. "There's no project time allocated to perform unit testing" 3. "It is difficult keeping unit tests up to date" 4. "Deadlines (The DATE) prohibit good testing" 5. "Challenging to know that code is thoroughly tested" 6. "Testers are unfamiliar with coding. They only do manual. They have no visibility into the code operation." 7. "Challenges with early prototyping" 8. "Legacy applications are fragile and difficult to change" 9. "Getting viable test data is difficult" 10."Business test cases vs code test cases (translation: Testing Business Facing vs Code Facing)" 11."We'll write unit tests, but only after we write the code and only if we have time" Testers: "We're told that Automating Acceptance Testing could be beneficial, but we don't code and we don't work closely with the developers. Senior Management: Yes, we see the need for change but planning for it takes too much time. 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 29

Questions? 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 30

Resources: focus test-driven development Professionalism and Test-Driven Development Robert C. Martin, Object Mentor Test-driven development is a discipline that helps professional software developers ship clean, flexible code that works, on time. Professional software developers ship clean, flexible code that works on time. It seems to me that this statement is the minimum standard for professional behavior for software developers. Yet, in my travels as a software consultant, I ve met many software developers who don t set the bar this high and instead ship late, buggy, messy, and bloated code. Actually, I don t think any software developer You may not write more of a unit test than is truly content to ship code that falls below is sufficient to fail. the bar. The truth is that most developers simply don t know how to reach that bar or don t than is sufficient to make the failing unit You may not write more production code believe reaching it is possible. All too often test pass. they commit to deadlines that they later find they can t meet, and so, through high-stress heroics, These three laws lock you into a tight loop they wind up compromising quality to avoid being overly late. that fails, and then you write just enough pro- in which you first write a portion of a unit test In this article, I ll discuss how test-driven development can help software developers achieve is perhaps two minutes long and almost always duction code to make that test pass. This loop a higher degree of professionalism. TDD isn t a ends in success. 1 silver bullet and won t suddenly transform you Following these laws perfectly doesn t always into a sterling professional. It does, however, make sense. Sometimes you ll write a larger test. play a significant role. Sometimes you ll write extra production code. Sometimes you ll write tests after you ve written The three laws of TDD the code to make them pass. Sometimes it ll take TDD practitioners follow these three laws: more than two minutes to go around the loop. The goal isn t perfect adherence to the laws it s You may not write production code unless to decrease the interval between writing tests and you ve first written a failing unit test. production code to a matter of minutes. 32 IEEE SOFTWARE Published by the IEEE Computer Society 0740-7459/07/$25.00 2007 IEEE 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 31

THANK YOU Bill Allen - agile Innovation Labs Bill@agileInnov.com Kieran Murphy - ThoughtWorks KiMurphy@ThoughtWorks.com 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 32

The End 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 33

Slide Backlog 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 34

Process: The BDD - TDD Cycle 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD

How NOT to write Behavior tests (these are functional) Feature: : Payroll Admin - Add Employee Scenario: Add a new hourly employee to the mpayroll system Given I am a Payroll Admin And I am on the 'home page' When I click on the 'Add Employee Then I land on the Add Employee page And I am asked 'Employee Type to Add' When I click on the 'Hourly Employee Then I land on the Add Employee page with check box options for hourly Scenario: Add a new salaried employee to the mpayroll system Given I am a Payroll Admin And I am on the 'home page' When I click on the 'Add Employee' Then I land on the Add Employee page When I click on the 'Salaried Employee' Then I land on the Add Employee page with check box options for salaried Scenario: Add a new commissioned employee to the mpayroll system Given I am a Payroll Admin And I am on the 'home page' When I click on the 'Add Employee' Then I land on the Add Employee page And I am asked 'Employee Type to Add' When I click on the 'Commissioned Employee' Then I land on the Add Employee page with check box options for commissioned 2017, Bill Allen / Kieran Murphy. All Rights Reserved. #BDD-TDD 36