applying test-driven development (tdd) methodologies to ...• test-driven development (tdd)...
TRANSCRIPT
![Page 1: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/1.jpg)
Kent Swagler CSQA CSTEDirector IT Quality Assurance & Office Services
MetroSt Louis, Missouri
Applying Test-Driven Development (TDD) Methodologies to Regression
Testing
![Page 2: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/2.jpg)
Agenda
• Metro Overview• The Situation (Before QUEST 2008)• Test-Driven Development (TDD) Methodology Review• What did we want to achieve at Metro? (Our Goals)• How did we do it? (The Plan)• What were the challenges we faced? (Obstacles to
the Plan)• How did we overcome them? (Solutions to Obstacles)• The Results (Goals vs. Actuals)• Workshop Exercise• Summary 2
![Page 3: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/3.jpg)
MetroBus
• 120,000 average daily passenger boardings• 30% of MetroBus riders new to the system
3
![Page 4: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/4.jpg)
MetroLink
• 68,000 average daily passenger boardings• 38% of MetroLink riders new to the system
4
![Page 5: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/5.jpg)
Call-A-Ride
• 660,000 annual boardings5
![Page 6: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/6.jpg)
Metro Overview
• $1.8 billion in transit infrastructure• 96% of jobs served• 95% of population served• Ridership increased 10% this year• Transit demand is at a 30-year high
6
![Page 7: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/7.jpg)
The Situation - Financial Applications(as of March 31, 2008)
• Open Requests > 1 year old: 225• Open Requests < 1 year old: 146
Total: 371• Requests closed during last 15 months: 65
– 4 per month average • Requests sent on to QA with little regression
testing
7
![Page 8: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/8.jpg)
The Situation (cont.) (as of March 31, 2008)
• Little history recorded in change request– Functional requirements, test scripts, test cases
• Average number of rework cycles: 3 – 4• Average number of days in QA process: 8• Results
– Frustrated Developers– Frustrated QA team– Frustrated Customers
8
![Page 9: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/9.jpg)
TDD Methodology Review
• Bring QA in when change request coding has begun
• Informal joint use case development for each small piece of code
• Transcribe to test cases on-the-spot based on:– Risk analysis– Equivalence classes– Boundary conditions
• Development done to pass use and test cases9
![Page 10: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/10.jpg)
What Did We Want To Achieve At Metro?(Our Goals)
• One time through QA process• 2 – 3 day QA cycle time Service Level Agreement• Request closure rate: Minimum 25%
improvement, 40% stretch goal• Developers improve core QA process knowledge• Improved teaming between developers and QA• QA improves its detailed application knowledge
– Less dependence on developers for testing
10
![Page 11: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/11.jpg)
How Did We Do It?(The Plan)
• Develop goals and implementation plan• Present to QA Team, then to Development
Manager– Review TDD methodology concepts– Present implementation plan– Address concerns– Gain buy-in
11
![Page 12: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/12.jpg)
How Did We Do It?(cont.)
• Present plan to development team that emphasizes:– It is a continuous process– Improvements will come over time– No ‘overnight success’ expectations
• Train developers on TDD methodology• Begin review of all open change requests for:
– Immediate closure candidates (i.e. OBEs)– Consolidation
• Start the Process! 12
![Page 13: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/13.jpg)
What Were The Challenges We Faced?(Obstacles to the plan)
• Pessimism / Reluctance• “We’re doing QA’s testing for them!”• Past negative QA experience • Not supportive of QA in general• Reluctance to document• Loss of 4 developers to team
13
![Page 14: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/14.jpg)
How Did We Overcome Them?(Solutions to Obstacles)
• Stick to the plan and the methodology
• Incorporate into employee performance plans
• Positive, constructive, and encouraging attitude
• Help staff through every step of the process
• Let them see the results for themselves
14
![Page 15: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/15.jpg)
How Did We Overcome Them?(cont.)
• Don’t break the QA test SLA without justification• Track and report results• Requests not accepted into QA test phase
without:– Test Scripts– Test Cases– Changes to be deployed– Deployment instructions
15
![Page 16: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/16.jpg)
The Results (as of January 31, 2009)
• Change Requests > 1 year old: 115• Change Requests < 1 year old: 90
(45% reduction) Total: 205• Requests closed during last 10 months: 258
– Goal: 25% increase in closure rate– Actual: 26/month (650% increase!)
• QA Test SLA Cycle Time– Goal: 2 - 3 days– Actual: 1 - 2 days
16
![Page 17: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/17.jpg)
The Results (as of January 31, 2009)
• Complete change history now documented• No failures when issues deployed to Production• Improved QA / development teaming• Improved individual performance• Improved customer satisfaction
17
![Page 18: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/18.jpg)
Workshop Exercise #1
• Break up into groups of 4 -5• Develop list of top 5 challenges you are facing
with change request closure between QA and development teams– Change Request: Defect or Enhancement
• Develop recommended solutions• Present for group review and discussion• Will email results after conference
18
![Page 19: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/19.jpg)
Workshop Exercise #2
• Same groups review example change request• Assign 2 as developers, 2-3 as testers• Use TDD to develop first 5 use / test cases• Identify any missing documentation• Present for group review and discussion
19
![Page 20: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/20.jpg)
Workshop Exercise #2
Definitions:• Use Case: A related set of end-to-end scenarios
(sequence of actions) that describes a use of the system by a user (actor) to accomplish a specific goal.
• Test Case: Input + Pre-conditions Post-conditions + Output
20
![Page 21: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/21.jpg)
Summary
• TDD can work!• Need management acceptance and commitment• Plan for 1- 2 month minimum implementation plan• Start by reviewing all open change request
– Aged– OBEs– Consolidations
21
![Page 22: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/22.jpg)
Summary
• Questions?
• Contact Info:Metro Attn: Kent Swagler Mailstop 135707 North 1st StreetSt Louis MO 63102-2595(314) [email protected]
22
![Page 23: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/23.jpg)
TDD Implementation – Exercise 1 Challenges Recommended Solutions
1. A.
B.
C.
2. A.
B.
C.
3. A.
B.
C.
4. A.
B.
C.
5. A.
B.
C.
![Page 24: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/24.jpg)
TDD Implementation – Exercise 2
![Page 25: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/25.jpg)
TDD Implementation – Exercise 2
Meeting Minutes – Excessive Absences Report for Non-Excused Absences
Location: Constance Harrell’s Cube
Date and Time: 23-May-2008 9:30 AM – 10:00 AM
Attendees: Constance Harrell; Louisa Lee
Subject: Excessive Absences Report (#: 2761)
Discussions:
• Requirements for the Excessive Absences Reports
Outcome:
• Needs to query for one or more locations and different date ranges (usually per month and per year)
o Parameters: Location; Date Range (start date, end date) • Data needed for Main Report
o Name; Badge Number; Number of Absences; Location • Data needed for FMLA Report
o Location; Count of FMLA absences • Data needed for FMLA Vacation Report
o Location; Count of FMLA vacation absences • Absence types that need to be included in Main Report
o 1st AWOL; 2nd AWOL; 3rd AWOL; FMLA; FMLA Vacation; Late; Leave Early; Miss; No Call No Show; Personal Bus.; Sick; Sick – No Pts; Tardy; Unexcused; WC – No Points; Work Comp
• Other o Inquiry on upgrading Crystal Reports 10 to Crystal Reports 11
![Page 26: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/26.jpg)
TDD Implementation – Exercise 2
Use Case Test Cases 1. Generate report for one employee A. Include one absence type
B. Include multiple absence types
C. Generate report for multiple months
2. A.
B.
C.
3. A.
B.
C.
4. A.
B.
C.
5. A.
B.
C.
![Page 27: Applying Test-Driven Development (TDD) Methodologies to ...• Test-Driven Development (TDD) Methodology Review • What did we want to achieve at Metro? (Our Goals) • How did we](https://reader033.vdocuments.mx/reader033/viewer/2022060900/609e11889675150ebc7789a9/html5/thumbnails/27.jpg)
TDD Implementation – Exercise 2