Why Use Test Driven Development (TDD)?.  Why the need to change to TDD.  Talk about what TDD is.  Talk about the expectations of TDD.

Slides:



Advertisements
Similar presentations
Applied Software Project Management Andrew Stellman & Jennifer Greene Applied Software Project Management Why Software.
Advertisements

Kyle Hartmann. RAD was created in response to long lead times and low flexibility Focuses on communication Quicker and better requirements interpretation.
Prescriptive Process models
PROC-1 3. Software Process. PROC-2 What’s a process? Set of activities in creating software It involves creativity –hard to automate –Requires human judgment.
Software Engineering Session 14 INFM 603. Software Software represents an aspect of reality –Input and output represent the state of the world –Software.
Software Development Methodologies 1. A methodology is: A collection of procedures, techniques, principles, and tools that help developers build a computer.
29 September Interactions  There is no “right answer”  Typically people and product are fixed  … can adapt process  (which is where we will.
Evaluating Requirements. Outline Brief Review Stakeholder Review Requirements Analysis Summary Activity 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Rapid software development.
Test Driven Development: An Emerging Solution for Software Development.
Computer Engineering 203 R Smith Agile Development 1/ Agile Methods What are Agile Methods? – Extreme Programming is the best known example – SCRUM.
Xtreme Programming. Software Life Cycle The activities that take place between the time software program is first conceived and the time it is finally.
Software Process CS 414 – Software Engineering I Donald J. Bagert Rose-Hulman Institute of Technology December 17, 2002.
Test-Driven Development “Test first, develop later!” –OCUnit.
Chapter 9 – Software Evolution and Maintenance
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Extreme Programming.
From 3 weeks to 30 minutes – a journey through the ups and downs of test automation.
Testing-as-a-Service Simplify the testing of Oracle Applications with Cloudtestr platform.
Introduction to RUP Spring Sharif Univ. of Tech.2 Outlines What is RUP? RUP Phases –Inception –Elaboration –Construction –Transition.
Chapter 3 – Agile Software Development 1Chapter 3 Agile software development.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Agile Programming Principles.
Agile Software Development Chapter 3 – Lecture 1 Adrián Susinos.
1 Advanced Computer Programming Project Management: Methodologies Copyright © Texas Education Agency, 2013.
RUP Implementation and Testing
1 Chapter 5 Practice: A Generic View Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
SOFTWARE ENGINEERING1 Introduction. Software Software (IEEE): collection of programs, procedures, rules, and associated documentation and data SOFTWARE.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
Extreme/Agile Programming Prabhaker Mateti. ACK These slides are collected from many authors along with a few of mine. Many thanks to all these authors.
October, 2006 © Copyright 2006, Larry A. Beaty. Copying and distribution of this document is permitted in any medium, provided this notice is preserved.
© 2012 About Me Doing agile since 1999 Start ups / Enterprises Planigle - Consulting and Training Qcue – VP, Engineering.
Software Engineering Principles Principles form the basis of methods, techniques, methodologies and tools Principles form the basis of methods, techniques,
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
From Quality Control to Quality Assurance…and Beyond Alan Page Microsoft.
Chapter 3 Agile Software Development (1/2) Yonsei University 2 nd Semester, 2015 Sanghyun Park.
Chapter 2 Software processes. Topics covered Software process models Process activities Coping with change.
SOFTWARE ENGINEERING1 Introduction. SOFTWARE ENGINEERING2 Software Q : If you have to write a 10,000 line program in C to solve a problem, how long will.
AP-1 4. Agile Processes. AP-2 Agile Processes Focus on creating a working system Different attitude on measuring progress XP Scrum.
CS5103 Software Engineering Lecture 02 More on Software Process Models.
Lecture 4 – XP and Agile 17/9/15. Plan-driven and agile development Plan-driven development A plan-driven approach to software engineering is based around.
Requirements Engineering Requirements Engineering in Agile Methods Lecture-28.
Stand Up Comedy Project/Product Management
(1) Test Driven Development Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Extreme Programming. Extreme Programming (XP) Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries Agile software development methodology.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
Lectures 2 & 3: Software Process Models Neelam Gupta.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Software Engineering Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Chapter 3 Agile software development 1 Chapter 3 – Agile Software Development.
CS223: Software Engineering
Agile Methods SENG 301.
Software Development.
“When quality is critical"
Regression Testing with its types
Lecture 3 Prescriptive Process Models
Introduction Edited by Enas Naffar using the following textbooks: - A concise introduction to Software Engineering - Software Engineering for students-
Integrate Agile Testing into the Process
Putting Testing First CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
Software Process Models
Some Important Techniques For Regression Testing That You Must Know.
Testing and Test-Driven Development CSC 4700 Software Engineering
Putting Testing First CS 4501 / 6501 Software Testing
Chapter 3 – Agile Software Development
Extreme Programming.
Presentation transcript:

Why Use Test Driven Development (TDD)?

 Why the need to change to TDD.  Talk about what TDD is.  Talk about the expectations of TDD.

 Legacy applications has constant impediments.  Agility and adaptability.  Reduces defects which reduces necessary support resources.

 Did NOT over- engineer.  Not here to write code; you’re here to ship products.  Automated unit tests sounds great in principle; but we need to cut things out. Customers don’t care if there are no automated unit tests.

 Released Version 1 in  Browser Wars with IE. (1995 to 1999)  Lost market share control in  Released Version 4 in  Became unstable; random crashes, buggy, and slow.  Acquired by AOL on March 17, 1999 for $4.2 Billion.  Attempted to fix, but the code base became so horrible that they decided to do a complete code re-write… from scratch.  Mozilla Firefox is the result.

 Case studies have shown that TDD decreases defect density between 40% to 90%.  However, there was an increase in development time but only by 15% to 35%.  TDD improves code quality and structure making future changes easier.  IBM, Microsoft, and North Carolina State University Case Study IBM, Microsoft, and North Carolina State University Case Study  Maria Siniaalto (2006)

 Test driven development is where the developer writes an automated unit test before writing the code to make that unit test pass.

 You get immediate feedback if your code works or doesn’t work.  You will have a suite of regression tests.  You will have clear use cases in how the methods should be called.  Forces you to know your requirements before you begin writing the code.

 Hard to write tests correctly.  If not done correctly (as in tests are too tightly coupled to implementation) then those tests need to be changed frequently.  Can’t write unit tests with badly structured code. (As in no layers)

 Save time by not in constant debug mode and stepping in and out of code.  Visual feedback that all changes have not broken existing parts of the application without having to debug all of the possible parts.

 Expect requirements to change. Changing requirements are managed by adopting an incremental approach and paying increased attention to design to accommodate change. Apply more rigor, rather than less, to avoid costly and unnecessary rework.  Know why you’re testing. Recognize that there are two distinct forms of testing, one to build correct software (debugging) and another to show that the software built is correct (verification). These two forms of testing require two very different approaches.

 Elimate errors before testing. Better yet, deploy techniques that make it difficult to introduce errors in the first place. Testing is the second most expensive way of finding errors in the first place. The most expensive way is to let your customers find them for you.  Write software that is easy to verify. If you don’t, verification and validation (including testing) can take up to 60% of the total effort. Coding typically takes only 10%. Even doubling the effort on coding will be worthwhile if it reduces the burden of verification by as little as 20%.

 Develop incrementally. Make very small changes, incrementally. After each change, verify that the updated system behaves according to its updated specification. Making small changes makes the software much easier to verify.  Some aspects of software development are just plain hard. There is no silver bullet. Don’t expect any tool or method to make everything easy. The best tools and methods take care of the easy problems, allowing you to focus on the difficult problems.

 Software is not useful by itself. The executable software is only part of the picture. It is of no use without user manuals, business processes, design documentation, well-commented source code, and test cases. These should be produced as an intrinsic part of the development, not added at the end. In particular, recognize that design documentation serves two distinct purposes:  To allow the developers to get from a set of requirements to an implementation. Much of this type of documentation outlives its usefulness after implementation.  To allow the maintainers to understand how the implementation satisfies the requirements. A document aimed at maintainers is much shorter, cheaper to produce and more useful than a traditional design document.

Mocking frameworks are essentially a requirement for automated unit testing. There are a few that are available for free. Teleriks’ Just Mock Moq Increase efficiency with Ncrunch

 Not afraid to make changes.  Not worried about breaking existing code.  Loss of code ownership by an individual since anyone can participate in making changes without breaking existing features.

 It’s hard and it takes patience because the learning curve is steep.  There will be more hurdles and obstacles.  Technical debt will eventually fade away and customers will notice the difference in quality and efficiency.  You’ll get 40% to 90% less phone calls at midnight.

Thank you and have a great day! References: Seven Key Principles: cert.gov/articles/knowledge/sdlc- process/secure-software-development-life-cycle- processes