SlideShare a Scribd company logo
1 of 20
Test-Driven Development in the
Corporate Workplace
Ahmed Owian
Linda Sherrell
STEP
Systems Testing Workshop 2010
Outline
• Agile Methodologies
• TDD Introduction
• Related Work
• Comparative Survey
• Conclusions and Future Work
Agile Methodologies
• What is Agile?
• Agile Manifesto values:
– Individuals and interactions over processes and tools
– Working software over comprehensive documentation
– Customer collaboration over contract negotiation
– Responding to change over following a plan
• eXtreme Programming (XP)
– Pair Programming
– TDD
What is Not TDD?
• Traditional (test-last) development
– Writing production code till done
– Testing it to verify correctness
• Waterfall
– Analysis
– Design
– Code
– Test
What is TDD?
• Test-Driven (test-first) development
1. Break down a task into testable units
2. Write failing automated test case in code
3. Implement production code to satisfy test
4. Refactor both test and production code
• Iterative process
– Tests drive the design for the code
– Tests and production code evolve
What is TDD? (cont.)
• Advantages
– Enables refactoring with confidence
– Helps find bugs as soon as introduced
• Quick iterative feedback cycle
• Side Effects
– Automated regression test suite
– Unambiguous documentation
• Usage
– Agile & Plan-driven
Development Process
Related Work
• Janzen & Saiedian (2005, 2007 & 2008)
– Tests are just icing on the cake
– TDD attracts mature programmers
– Metrics show TDD improves quality
• Sherrell, et. al. (2009)
– Experiences with XP
• Vejandla & Sherrell (2009)
– Integrating TDD into research projects
Related Work (cont.)
• Bhat & Nagappan (2006)
– Professional teams at Microsoft used TDD
– Produced code over twice traditional quality
– TDD added 15% more development time
– Tests continued to benefit the teams
– Served as executable documentation
• Crispin (2006)
– TDD takes effort, but is worth it
Comparative Survey
• Traditional Test-Last vs. TDD
• Online survey (Google spreadsheets)
– Reach many people
– Programmatically gather results
• Validity
– Respondents indicated experience
• Filtered respondents lacking experience
– Professionals from Agile Dev Conf. 2009
• Perhaps biased results
Summary of Responses to
“Choose the process that according to your experience…”
Summary of Responses to
"Choose the process that, according to your experience..."
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100
makes you more productive.
promotes better quality code.
produces more customer satisfaction.
results in better coverage of production code.
results in code that is easier to reuse.
results in code that is more extendable.
results in code that is easier to read and understand.
fosters better confidence in the code.
helps you to stay on schedule and meet your deadlines.
gives you a better understanding of the algorithm/logic.
better facilitates refactoring.
takes more effort.
you will be more likely to use in the future.
you like better for most tasks.
produces a product that adheres more to the requirements.
Percentages of responses
No difference
Traditional
Test-Driven 90% 100%
Remarkable Results
You like better for most tasks
Test-
Driven
90%
No
difference
6%
Traditional
4%
Takes more effort
Test-
Driven
38%
No
difference
35%
Traditional
27%
Fosters better confidence in the code
Test-
Driven
90%
Traditional
2%
No
difference
8%
Promotes better quality code
Test-
Driven
92%
No
difference
8%
Traditional
0%
Findings
• Majority found TDD more useful
• Results represented TDD favorably
• TDD takes more upfront effort
• Effort pays off later
– Code is more maintainable
– Code is easier to read and understand
– More code is actually tested
• Less time needed to fix faults
Summary & Conclusions
• Compared Effectiveness of TDD vs. Traditional
– Practitioners of TDD benefit from its usage
– Adhering to TDD takes discipline and skill
• This research advocates the use of TDD
– Maintainability
– Testability
– Self-documentation
– Automatic self-verification
Future Work
• Comparison Survey
– Collect additional responses
– Perform further analysis
• Use TDD in more applications
– Analyze the benefits over traditional
References
1) Beck, K., et. al. (2001). Manifesto for agile software
development. Available at: http://www.agilemanifesto.org.
Last retrieved 11/16/2009.
2) Bhat, T. & Nagappan, N. (2006). Evaluating the efficacy of test-
driven development: industrial case studies. In Proceedings of
the 2006 ACM/IEEE international Symposium on Empirical
Software Engineering (ISESE '06), pp. 356-363.
3) Boehm, B. & Turner, R. (2003). Balancing Agility and Discipline:
A Guide for the Perplexed. Addison-Wesley. Boston, MA.
4) Crispin, L. (2006). Driving software quality: how test-driven
development impacts software quality. IEEE Software, 23 (6),
pp. 70-71.
5) Janzen, D. & Saiedian, H. (2005). Test-driven development:
concepts, taxonomy, and future directions. IEEE Computer, 38
(9), pp. 43-50.
6) Janzen, D. & Saiedian, H. (2007). A leveled examination of test-
driven development acceptance. In Proceedings of the 29th
International Conference on Software Engineering, pp. 719-
722.
References (cont.)
7) Janzen, D. & Saiedian, H. (2008). Does test-driven development
really improve software design quality? IEEE Software, 25 (2),
pp. 77-84.
8) Jeffries, R. (2001). What is extreme programming? XP
Magazine, November 2001. Available at:
http://www.xprogramming.com/xpmag/whatisxp.htm. Last
retrieved on 11/20/2009.
9) Owian, A. & Sherrell, L. (2009). Comparison of Traditional and
Test-Driven Development. Available at:
http://spreadsheets.google.com/viewform?
hl=en&formkey=dEpub19rNWljanRlclVFQ3VsbEFObUE6MA. Last
retrieved 11/24/2009.
10) Sherrell, L., Bhagavathy, K. & Velaga, N. (2009). Experiences
with Extreme Programming. In Proceedings of World Conference
on Educational Multimedia, Hypermedia and
Telecommunications 2009 (ED-MEDIA), pp. 458-467.
11) Vejandla, P. & Sherrell, L. B. (2009). Why an AI research team
adopted XP practices. In Proceedings of the 47th ACM Annual
Southeast Regional Conference, pp. 1-4.
Questions?
Janzen & Saiedian Metrics
• J&S ascertained that TDD leads to "… simpler classes and
sometimes simpler methods" by applying the following
metrics: weighted-methods complexity, cyclomatic
complexity per method, and nested-block depth per
method.
• They also measured lines of code per method, and
methods per class discovering TDD leads to smaller
methods as well as smaller classes.
• In addition, Janzen and Saiedian measured code
coverage, and they found in most cases, TDD resulted in
more production code covered by automated tests.
• In order to measure coupling, they took the following
metrics: coupling between objects, fan-out per class,
average number of method parameters, and
information flow.

More Related Content

What's hot

Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNetHai Tran Son
 
Agile Testing Best Practices
Agile Testing Best PracticesAgile Testing Best Practices
Agile Testing Best PracticesStephen Ritchie
 
Using Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solutionUsing Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solutionRuslan Strazhnyk
 
Agile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil KaradeAgile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil KaradeIndicThreads
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDDKnoldus Inc.
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
Quality Assurance/Testing Overview & Capability Deck
Quality Assurance/Testing Overview & Capability DeckQuality Assurance/Testing Overview & Capability Deck
Quality Assurance/Testing Overview & Capability DeckSowmak Bardhan
 
Software Agility.pptx
Software Agility.pptxSoftware Agility.pptx
Software Agility.pptxZaid Shabbir
 
Infrastructure Testing: The Ultimate “Shift Left”
Infrastructure Testing: The Ultimate “Shift Left”Infrastructure Testing: The Ultimate “Shift Left”
Infrastructure Testing: The Ultimate “Shift Left”TechWell
 
10 Essential SAFe(tm) patterns you should focus on when scaling Agile
10 Essential SAFe(tm) patterns you should focus on when scaling Agile10 Essential SAFe(tm) patterns you should focus on when scaling Agile
10 Essential SAFe(tm) patterns you should focus on when scaling AgileYuval Yeret
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentJohn Blum
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy Impetus Technologies
 

What's hot (20)

Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNet
 
Agile QA Process
Agile QA ProcessAgile QA Process
Agile QA Process
 
Agile Testing Best Practices
Agile Testing Best PracticesAgile Testing Best Practices
Agile Testing Best Practices
 
Regression testing
Regression testingRegression testing
Regression testing
 
Guide to Agile testing
Guide to Agile testingGuide to Agile testing
Guide to Agile testing
 
Using Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solutionUsing Jenkins and Jmeter to build a scalable Load Testing solution
Using Jenkins and Jmeter to build a scalable Load Testing solution
 
Agile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil KaradeAgile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil Karade
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Quality Assurance/Testing Overview & Capability Deck
Quality Assurance/Testing Overview & Capability DeckQuality Assurance/Testing Overview & Capability Deck
Quality Assurance/Testing Overview & Capability Deck
 
Agile
Agile Agile
Agile
 
Software Agility.pptx
Software Agility.pptxSoftware Agility.pptx
Software Agility.pptx
 
QA Best Practices in Agile World_new
QA Best Practices in Agile World_newQA Best Practices in Agile World_new
QA Best Practices in Agile World_new
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Infrastructure Testing: The Ultimate “Shift Left”
Infrastructure Testing: The Ultimate “Shift Left”Infrastructure Testing: The Ultimate “Shift Left”
Infrastructure Testing: The Ultimate “Shift Left”
 
10 Essential SAFe(tm) patterns you should focus on when scaling Agile
10 Essential SAFe(tm) patterns you should focus on when scaling Agile10 Essential SAFe(tm) patterns you should focus on when scaling Agile
10 Essential SAFe(tm) patterns you should focus on when scaling Agile
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
 

Similar to Test-Driven Development in the Corporate Workplace

Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentnikhil sreeni
 
Module 1_software engineering.pptx
Module 1_software engineering.pptxModule 1_software engineering.pptx
Module 1_software engineering.pptxadityab33
 
Agile Testing Days -Trends and future in testing 2017
Agile Testing Days -Trends and future in testing 2017Agile Testing Days -Trends and future in testing 2017
Agile Testing Days -Trends and future in testing 2017Derk-Jan de Grood
 
AI improves software testing to be more fault tolerant, focused and efficient
AI improves software testing to be more fault tolerant, focused and efficientAI improves software testing to be more fault tolerant, focused and efficient
AI improves software testing to be more fault tolerant, focused and efficientKari Kakkonen
 
AI improves software testing through test automation, test creation and test ...
AI improves software testing through test automation, test creation and test ...AI improves software testing through test automation, test creation and test ...
AI improves software testing through test automation, test creation and test ...Kari Kakkonen
 
Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?Michaela Greiler
 
Software Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesSoftware Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesTao Xie
 
A Roadmap to Enterprise Quality
A Roadmap to Enterprise QualityA Roadmap to Enterprise Quality
A Roadmap to Enterprise QualityJeff Bramwell
 
Large scale agile development practices
Large scale agile development practicesLarge scale agile development practices
Large scale agile development practicesSkills Matter
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionPyxis Technologies
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013SmartBear
 
Cleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentCleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentAll Things Open
 
Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...IJERA Editor
 
Increasing Quality with DevOps
Increasing Quality with DevOpsIncreasing Quality with DevOps
Increasing Quality with DevOpsCoveros, Inc.
 
Aligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development PracticesAligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development PracticesAspire Systems
 
Roadmap to Enterprise Quality
Roadmap to Enterprise QualityRoadmap to Enterprise Quality
Roadmap to Enterprise QualityJeff Bramwell
 

Similar to Test-Driven Development in the Corporate Workplace (20)

Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
tem7
tem7tem7
tem7
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Agile testing
Agile testingAgile testing
Agile testing
 
Module 1_software engineering.pptx
Module 1_software engineering.pptxModule 1_software engineering.pptx
Module 1_software engineering.pptx
 
Agile Testing Days -Trends and future in testing 2017
Agile Testing Days -Trends and future in testing 2017Agile Testing Days -Trends and future in testing 2017
Agile Testing Days -Trends and future in testing 2017
 
AI improves software testing to be more fault tolerant, focused and efficient
AI improves software testing to be more fault tolerant, focused and efficientAI improves software testing to be more fault tolerant, focused and efficient
AI improves software testing to be more fault tolerant, focused and efficient
 
AI improves software testing through test automation, test creation and test ...
AI improves software testing through test automation, test creation and test ...AI improves software testing through test automation, test creation and test ...
AI improves software testing through test automation, test creation and test ...
 
Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?
 
Software Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesSoftware Analytics - Achievements and Challenges
Software Analytics - Achievements and Challenges
 
A Roadmap to Enterprise Quality
A Roadmap to Enterprise QualityA Roadmap to Enterprise Quality
A Roadmap to Enterprise Quality
 
Large scale agile development practices
Large scale agile development practicesLarge scale agile development practices
Large scale agile development practices
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Agile testing
Agile testingAgile testing
Agile testing
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013
 
Cleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentCleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven Development
 
Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...Comparison between Test-Driven Development and Conventional Development: A Ca...
Comparison between Test-Driven Development and Conventional Development: A Ca...
 
Increasing Quality with DevOps
Increasing Quality with DevOpsIncreasing Quality with DevOps
Increasing Quality with DevOps
 
Aligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development PracticesAligning Software Testing With Modern Age Development Practices
Aligning Software Testing With Modern Age Development Practices
 
Roadmap to Enterprise Quality
Roadmap to Enterprise QualityRoadmap to Enterprise Quality
Roadmap to Enterprise Quality
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Test-Driven Development in the Corporate Workplace

  • 1. Test-Driven Development in the Corporate Workplace Ahmed Owian Linda Sherrell STEP Systems Testing Workshop 2010
  • 2. Outline • Agile Methodologies • TDD Introduction • Related Work • Comparative Survey • Conclusions and Future Work
  • 3. Agile Methodologies • What is Agile? • Agile Manifesto values: – Individuals and interactions over processes and tools – Working software over comprehensive documentation – Customer collaboration over contract negotiation – Responding to change over following a plan • eXtreme Programming (XP) – Pair Programming – TDD
  • 4. What is Not TDD? • Traditional (test-last) development – Writing production code till done – Testing it to verify correctness • Waterfall – Analysis – Design – Code – Test
  • 5. What is TDD? • Test-Driven (test-first) development 1. Break down a task into testable units 2. Write failing automated test case in code 3. Implement production code to satisfy test 4. Refactor both test and production code • Iterative process – Tests drive the design for the code – Tests and production code evolve
  • 6. What is TDD? (cont.) • Advantages – Enables refactoring with confidence – Helps find bugs as soon as introduced • Quick iterative feedback cycle • Side Effects – Automated regression test suite – Unambiguous documentation • Usage – Agile & Plan-driven
  • 8. Related Work • Janzen & Saiedian (2005, 2007 & 2008) – Tests are just icing on the cake – TDD attracts mature programmers – Metrics show TDD improves quality • Sherrell, et. al. (2009) – Experiences with XP • Vejandla & Sherrell (2009) – Integrating TDD into research projects
  • 9. Related Work (cont.) • Bhat & Nagappan (2006) – Professional teams at Microsoft used TDD – Produced code over twice traditional quality – TDD added 15% more development time – Tests continued to benefit the teams – Served as executable documentation • Crispin (2006) – TDD takes effort, but is worth it
  • 10. Comparative Survey • Traditional Test-Last vs. TDD • Online survey (Google spreadsheets) – Reach many people – Programmatically gather results • Validity – Respondents indicated experience • Filtered respondents lacking experience – Professionals from Agile Dev Conf. 2009 • Perhaps biased results
  • 11. Summary of Responses to “Choose the process that according to your experience…” Summary of Responses to "Choose the process that, according to your experience..." 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100 makes you more productive. promotes better quality code. produces more customer satisfaction. results in better coverage of production code. results in code that is easier to reuse. results in code that is more extendable. results in code that is easier to read and understand. fosters better confidence in the code. helps you to stay on schedule and meet your deadlines. gives you a better understanding of the algorithm/logic. better facilitates refactoring. takes more effort. you will be more likely to use in the future. you like better for most tasks. produces a product that adheres more to the requirements. Percentages of responses No difference Traditional Test-Driven 90% 100%
  • 12. Remarkable Results You like better for most tasks Test- Driven 90% No difference 6% Traditional 4% Takes more effort Test- Driven 38% No difference 35% Traditional 27% Fosters better confidence in the code Test- Driven 90% Traditional 2% No difference 8% Promotes better quality code Test- Driven 92% No difference 8% Traditional 0%
  • 13. Findings • Majority found TDD more useful • Results represented TDD favorably • TDD takes more upfront effort • Effort pays off later – Code is more maintainable – Code is easier to read and understand – More code is actually tested • Less time needed to fix faults
  • 14. Summary & Conclusions • Compared Effectiveness of TDD vs. Traditional – Practitioners of TDD benefit from its usage – Adhering to TDD takes discipline and skill • This research advocates the use of TDD – Maintainability – Testability – Self-documentation – Automatic self-verification
  • 15. Future Work • Comparison Survey – Collect additional responses – Perform further analysis • Use TDD in more applications – Analyze the benefits over traditional
  • 16. References 1) Beck, K., et. al. (2001). Manifesto for agile software development. Available at: http://www.agilemanifesto.org. Last retrieved 11/16/2009. 2) Bhat, T. & Nagappan, N. (2006). Evaluating the efficacy of test- driven development: industrial case studies. In Proceedings of the 2006 ACM/IEEE international Symposium on Empirical Software Engineering (ISESE '06), pp. 356-363. 3) Boehm, B. & Turner, R. (2003). Balancing Agility and Discipline: A Guide for the Perplexed. Addison-Wesley. Boston, MA. 4) Crispin, L. (2006). Driving software quality: how test-driven development impacts software quality. IEEE Software, 23 (6), pp. 70-71. 5) Janzen, D. & Saiedian, H. (2005). Test-driven development: concepts, taxonomy, and future directions. IEEE Computer, 38 (9), pp. 43-50. 6) Janzen, D. & Saiedian, H. (2007). A leveled examination of test- driven development acceptance. In Proceedings of the 29th International Conference on Software Engineering, pp. 719- 722.
  • 17. References (cont.) 7) Janzen, D. & Saiedian, H. (2008). Does test-driven development really improve software design quality? IEEE Software, 25 (2), pp. 77-84. 8) Jeffries, R. (2001). What is extreme programming? XP Magazine, November 2001. Available at: http://www.xprogramming.com/xpmag/whatisxp.htm. Last retrieved on 11/20/2009. 9) Owian, A. & Sherrell, L. (2009). Comparison of Traditional and Test-Driven Development. Available at: http://spreadsheets.google.com/viewform? hl=en&formkey=dEpub19rNWljanRlclVFQ3VsbEFObUE6MA. Last retrieved 11/24/2009. 10) Sherrell, L., Bhagavathy, K. & Velaga, N. (2009). Experiences with Extreme Programming. In Proceedings of World Conference on Educational Multimedia, Hypermedia and Telecommunications 2009 (ED-MEDIA), pp. 458-467. 11) Vejandla, P. & Sherrell, L. B. (2009). Why an AI research team adopted XP practices. In Proceedings of the 47th ACM Annual Southeast Regional Conference, pp. 1-4.
  • 19.
  • 20. Janzen & Saiedian Metrics • J&S ascertained that TDD leads to "… simpler classes and sometimes simpler methods" by applying the following metrics: weighted-methods complexity, cyclomatic complexity per method, and nested-block depth per method. • They also measured lines of code per method, and methods per class discovering TDD leads to smaller methods as well as smaller classes. • In addition, Janzen and Saiedian measured code coverage, and they found in most cases, TDD resulted in more production code covered by automated tests. • In order to measure coupling, they took the following metrics: coupling between objects, fan-out per class, average number of method parameters, and information flow.

Editor's Notes

  1. Whereas we value the items on the right, we value the items on the left more. If we have to make a choice, then we choose the items in blue
  2. J&S ascertained that TDD leads to "… simpler classes and sometimes simpler methods" by applying the following metrics: weighted-methods complexity, cyclomatic complexity per method, and nested-block depth per method. They also measured lines of code per method, and methods per class discovering TDD leads to smaller methods as well as smaller classes. In addition, Janzen and Saiedian measured code coverage, and they found in most cases, TDD resulted in more production code covered by automated tests. In order to measure coupling, they took the following metrics: coupling between objects, fan-out per class, average number of method parameters, and information flow.
  3. the majority of respondents liked TDD and found it more useful than traditional test-last development. Some results were remarkable
  4. This research contributed to the body of research comparing the effectiveness of traditional testing and test-driven approaches to software development Practitioners of TDD benefit from its usage Adhering to the practice takes discipline and a degree of skill. This research advocates the use of TDD for software engineers to produce maintainable, testable, self-documented and automatically self-verifying software.