Upload
raghavendra-raghav-mithare
View
228
Download
3
Embed Size (px)
Citation preview
Asserting Quality by Test Driven Development (TDD)
Presented at : Broad basing Agile Implementation Conference (Jul 31, 2012 , Bangalore – India ) (http://www.qaiglobalservices.com/Design/uploaded_mailers/agile_clinic/agile_clinic_online.html)
Raghavendra Mithare – Lead Coach, ([email protected])
Aravindan Manoharan - Principal Consultant, ADM Practice([email protected])
Ciber India (www.ciber.com)
… a Zen story !
Craft v/s Engineering
CMMI and Agile• OPD• OPF• OT
Process Management
• DAR• M&A• PPQA• CM
Support
• IPM• PP• PMC• REQM• RSKM
Project Management
• PI• RD• TS• VER• VAL
Engineering
Test Driven Development - recap1. Test Driven Development
• Create automated unit tests that define code requirements
• Tests contain assertions • confirms correct behavior as developers
evolve and refactor • Use testing frameworks based on xUnit • Define features as test cases • Produces code necessary to pass that
iteration's tests. • Refactor code to accommodate changes
Pass
Requirements
Develop Test Cases
Add/ Update / Delete Code
New Requirement?
Execute Test Cases
Fail
Yes
Stop Development
NoVerb: refactor(computing) restructure or rewrite source code to improve internal consistency, readability, etc, without changing its function
TDD and CMMI Requirements Development • Acceptance Test Cases provided by product owner • Write Unit Test Cases during the Development
Technical Solution • Implement the design to meet the requirements • Refactor the Design once all the test cases are passed
Validation • Rich set of tests developed to ensure the “right” product is developed• Faster validation to regress the entire application in a short span of time
TDD and CMMI
Verification• Review of Tests to meet the business
requirements and design• Execution of tests as part of the review process
Product Integration • Tests to validate the impacting areas of the
application and other interfaces
Benefits• High quality
• Fewer defects• Loose coupling, high cohesion• Design validated by tests
• More efficient code-test activity• By automation of rich set of test cases
• Can refactor with confidence• Code is malleable• Design is robust (tested, flexible)
Benefits• Living specification
• Expressed as client needs, not code capabilities• Built-in sample code• Built-in diagnostics
• Developer momentum, based on success
Number of Tests
Confi
denc
e
Benefits• Metrics
• Unit Test case code coverage 71%• Total Automation percentage 89% (because of TDD and Acceptance
TDD)• Defect density of 2.5 defects /KLOC
Project Duration
Testi
ng T
ime
TDD
When a thing is new, people say, ’It is not true.”
Later, when its truth becomes oblivious, they say,
‘It is not important.’Finally, when its importance cannot be
denied,They say, ‘Anyway, it is not new.’
William James
Thanks
Note• Images used in this slides are taken from Internet and are owned by respective copyright owners
• Views expressed in this presentation are personal opinions of the Authors and Ciber will not take any responsibility for the accuracy of this martial
• This material does not contain any confidential information
• Ciber owns the copyright of this material. Permission is granted to publish, distribute, print the contents with due credits without any additional permissions.
contact• Raghavendra (Raghav) Mithare : [email protected]• https://www.linkedin.com/in/raghavendramithare