TDD by example Why shall we test ? What is TDD (Test Driven Development) ? Lets practice it together doing a kata... Why shall we test ? What is TDD (Test.

Slides:



Advertisements
Similar presentations
Copyright Insight Test Services Testing From The Start – Test Driven Development TM Summit Fran OHara, Insight Test Services
Advertisements

Stephen Vance - CM and the Principles of Agile Software Development
Unit testing in.Net. Copyright 2007 Tikal Knowledge, Ltd. | 2 | Agenda Introduction Visual Studio built-in support Open source frameworks Working together.
Slide 1 Insert your own content. Slide 2 Insert your own content.
The 4 T’s of Test Automation:
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
0 - 0.
Teacher Name Class / Subject Date A:B: Write an answer here #1 Write your question Here C:D: Write an answer here.
EMC Digital Universe Study 2012 iView Graphics. Terms of use Written Permission If you wish to quote or use IDC materials (graphics) in an ad, press release,
Cummins® INSITE™ Update Manager Training
Yaser Zhian Dead Mage IGDI, Workshop 10, May 30 th -31 st, 2013.
1 19-Jan-14 © Copyright: City Boy Salary : Simon Powers : 2014 Brown Bag – Behaviour Driven Development with Specflow Brown Bag – Behaviour Driven Development.
Kelly Weyrauch
JUnit Tutorial Hong Qing Yu Nov JUnit Tutorial The testing problems The framework of JUnit A case study JUnit tool Practices.
1 ndia.in 7 Dec 2012 Asheesh Mehdiratta / Kunal Agile engineering practices New World Order Asheesh.
1111 Abstract Data Types Cpt S 223. School of EECS, WSU.
Lists, Stacks, Queues Svetlin Nakov Telerik Corporation
DPM ARCHITECT FOR XBRL XBRL taxonomy editor aimed at BUSINESS USERS Based on the DPM approach and DPM XBRL Architecture Currently on its last stage of.
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
1 A quick tour of Find the information you need, when you need it This presentation includes sound.
Test B, 100 Subtraction Facts
Extreme Programming Live WeActuallyBuildStuff Johannes Brodwall Exilesoft Chief Guest starring: Chaminda Sooriyapperuma.
Intelligent People. Uncommon Ideas. Automated Testing vs Manual Testing By Bhavin Turakhia CEO, Directi (shared under Creative Commons Attribution Share-alike.
Copyright © 2012 Pearson Education, Inc. Chapter 14: More About Classes.
The Random and String Classes The import statement.
Mid Year Performance Review Process
Test-Driven Development. Why Testing is Important? “If you don’t have tests, how do you know your code is doing the thing right and doing the right thing?”
Agile Process Models. Prescriptive models don’t work It is unrealistic to not have changes. Why? The Agile Manifesto: Individuals and interactions over.
© ThoughtWorks, 2008 Improving Productivity and Quality With Agile Patrick Kua.
E-commerce Project Erik Zeitler Erik Zeitler2 Lab 2  Will be anounced and scheduled later  We will deploy Java Server Pages on a Tomcat server.
Testing by Duncan Butler Sara Stephens. Too much to cover.
EXtreme.NET Dr. Neil Roodyn. eXtreme.NET Who is Dr. Neil? MISSION: To increase the value of your Software Business Working with software for way too long.
Computer Engineering 203 R Smith Agile Development 1/ Agile Methods What are Agile Methods? – Extreme Programming is the best known example – SCRUM.
Agile software development is a group of software development methodologies based on iterative and incremental development, where requirements and solutions.
Test Driven Development Derived from Dr. Fawcett’s notes Phil Pratt-Szeliga Fall 2009.
Test-Driven Development Gary Brown Building better software one test at a time.
TDD,BDD and Unit Testing in Ruby
AgileCamp Presents: Agile Software Development. Good luck in your presentation! This slide deck has been shared by AgileCamp Kit under the Creative Commons.
Agile and XP Development Dan Fleck 2008 Dan Fleck 2008.
Embracing change with Extreme Programming Method Engineering Erik ten Brinke
University of Maryland Bug Driven Bug Finding Chadd Williams.
1 JavaScript. 2 What’s wrong with JavaScript? A very powerful language, yet –Often hated –Browser inconsistencies –Misunderstood –Developers find it painful.
Development Methodology N. Draper. Introduction Development Process Test driven development Continuous Integration –Automated build and test Trac Ticket.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
© ALEXANDRE CUVA  VERSION 2.00 Test Driven Design.
Who are we?. What do we do? Fulfillment Optimization.
Agile Methodology in BIND: Scrum, TDD, and how you can help the DNS (r)evolution Larissa Shapiro BIND Open Day, January 2012.
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.
Scalatest. 2 Test-Driven Development (TDD) TDD is a technique in which you write the tests before you write the code you want to test This seems backward,
Test Driven Development Daniel Brown dxb17u. Introduction Originates from Extreme Programming (XP) Proposed by Kent Beck in Test Driven Development.
1 Presentation Title Test-driven development (TDD) Overview David Wu.
HOW AND WHY TO LOVE CUCUMBER By Dana Scheider. Is This Your Programming Experience?
(1) Test Driven Development Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Phoenix Scrum User Group Simplifying Scrum Online May 21 st 2009.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Writing Better C# Using C# 6 By: Mitchel Sellers.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
Software Development.
Test-Driven Development
Agile in the Wild The many ways to Apply Agile (not just Scrum and Kanban)
Test Driven Development 1 November Agenda  What is TDD ?  Steps to start  Refactoring  TDD terminology  Benefits  JUnit  Mocktio  Continuous.
Advantages OF BDD Testing
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
(Test Driven) Software Development
Test Driven Development
Chapt 2 Iterative Evolutionary Agile.
TDD & ATDD 1/15/2019.
Coming up: What is Agile?
Presentation transcript:

TDD by example Why shall we test ? What is TDD (Test Driven Development) ? Lets practice it together doing a kata... Why shall we test ? What is TDD (Test Driven Development) ? Lets practice it together doing a kata... Pierre-Emmanuel DAUTREPPE – October 26th 2012

2 «.NET Architect » and « XP Coach » Founder of User Group « DotNetHub » « La Journée Agile »/« Agile Tour Namur » Me contacter via : Pierre-Emmanuel DAUTREPPE

3 Our developer life We are genious ! (generally misunderstood) We = developers That functionality you implemented, you have ? No, thats useless ! Its trivial ! … … … doesnt work … ???? n00b documented it commented it tested it Turk et De Groot

4 Our developer life

5 Pinder Circus Just use a safety net !

6 Tests are a validation tool…

7 …but also a documentation tool… Here is a pretty clear user manual Its written « Sort out your own problems ! »

8 …and a design tool

9 The « Test Driven Development » Cycle Refactoring Test passes Implement Test compiles but fail Write needed API It does not compile Write a test Refactoring of tests Refactoring of code

10 string ReadFooValue() { string[] lines = foreach ( var line in lines ) { int index = line.IndexOf('='); string name = line.Substring(0, index); if ( name.StartsWith("Foo") ) { string value = line.Substring(index + 1); return value; } return null; } string ReadFooValue() { string[] lines = foreach ( var line in lines ) { int index = line.IndexOf('='); string name = line.Substring(0, index); if ( name.StartsWith("Foo") ) { string value = line.Substring(index + 1); return value; } return null; } Code coverage, myth or reality ? « Complexity » and « code coverage »… whats that ?

11 Code coverage, myth or reality ? 100% code coverage is not enough ! Phil Haack

12 Development Test Release Improve the feedback

13

14 Conclusion TDD let you use tests as A validation tool A documentation tool A design tool Follow the TDD rules Be iterative: split your work in small (requirement) increments Always start by writing a test Then implement untill the test passes And Cleanup! (refactor)