SlideShare a Scribd company logo
1 of 28
Unit Testing and Test Driven Development Presented By Greg Sohl
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Testing? Dude, I Already Test Do you currently unit test your code? What types of unit tests do you create? CRineta Member Survey, 8/08
Unit Testing and TDD The process of designing software by writing a validating client before the code.  What is Test-Driven Development (TDD)? Programmatically and continuously validating the correctness the code. What is Automated Unit Testing?
Unit Testing and TDD Automated Unit Testing != Test-Driven Development TDD is a way of thinking about your code, but it doesn’t require automated unit testing.  Agile processes adapt to change.  Unit tests help to manage change in our code.  Unit Testing is a key component of the  Agile Methodology
Unit Testing
Writing Tests First
Testing - Before and After
TDD
TDD Demo
Test Parts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<=Arrange <=Act <=Assert
Sounds good, but…
Misconception #1 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Misconception #2 ,[object Object],[object Object],[object Object],[object Object]
Misconception #3 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Unit Testing Benefits ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TDD Helps… ,[object Object],[object Object],[object Object],[object Object]
Different Than Integration Tests ,[object Object],[object Object]
Good Unit Tests
Good Unit Tests
Good Unit Tests ,[object Object],[object Object],[object Object]
Effective Unit Testing ,[object Object],[object Object],[object Object]
Writing Testable Code ,[object Object],[object Object],[object Object],[object Object]
Demo #2
Unit Testing Tools ,[object Object],[object Object],[object Object],[object Object]
References ,[object Object]
Other Useful Info ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Questions

More Related Content

What's hot

Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
Joe Wilson
 
Unit testing solid fundamentals
Unit testing solid fundamentalsUnit testing solid fundamentals
Unit testing solid fundamentals
Milan Vukoje
 
Alexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the TrenchesAlexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the Trenches
Mozaic Works
 

What's hot (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
Project Onion unit test environment
Project Onion unit test environmentProject Onion unit test environment
Project Onion unit test environment
 
Presentation_TDD
Presentation_TDDPresentation_TDD
Presentation_TDD
 
Nguyenvandungb seminar
Nguyenvandungb seminarNguyenvandungb seminar
Nguyenvandungb seminar
 
A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD) A Not-So-Serious Introduction to Test Driven Development (TDD)
A Not-So-Serious Introduction to Test Driven Development (TDD)
 
TDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and JasmineTDD Basics with Angular.js and Jasmine
TDD Basics with Angular.js and Jasmine
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Introduction to test programming
Introduction to test programmingIntroduction to test programming
Introduction to test programming
 
Unit testing solid fundamentals
Unit testing solid fundamentalsUnit testing solid fundamentals
Unit testing solid fundamentals
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Alexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the TrenchesAlexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the Trenches
 
Code review at large scale
Code review at large scaleCode review at large scale
Code review at large scale
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Continous testing for grails
Continous testing for grailsContinous testing for grails
Continous testing for grails
 
Mock driven development using .NET
Mock driven development using .NETMock driven development using .NET
Mock driven development using .NET
 
Adopting Agile
Adopting AgileAdopting Agile
Adopting Agile
 
Unit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqUnit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and Moq
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 

Similar to Automated Unit Testing and TDD

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
bhochhi
 

Similar to Automated Unit Testing and TDD (20)

Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Tdd
TddTdd
Tdd
 
Software presentation
Software presentationSoftware presentation
Software presentation
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)
 
Reduce Development Cost with Test Driven Development
Reduce Development Cost with Test Driven DevelopmentReduce Development Cost with Test Driven Development
Reduce Development Cost with Test Driven Development
 
Test driven development(tdd)
Test driven development(tdd)Test driven development(tdd)
Test driven development(tdd)
 
The Essentials Of Test Driven Development
The Essentials Of Test Driven Development The Essentials Of Test Driven Development
The Essentials Of Test Driven Development
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd   seven years afterIan Cooper webinar for DDD Iran: Kent beck style tdd   seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 

More from Greg Sohl

Net serialization
Net serializationNet serialization
Net serialization
Greg Sohl
 

More from Greg Sohl (11)

A DSL for Your API
A DSL for Your APIA DSL for Your API
A DSL for Your API
 
.NET Overview
.NET Overview.NET Overview
.NET Overview
 
Cool .NET tools, techniques and libraries
Cool .NET tools, techniques and librariesCool .NET tools, techniques and libraries
Cool .NET tools, techniques and libraries
 
Net serialization
Net serializationNet serialization
Net serialization
 
RESTful APIs in .NET
RESTful APIs in .NETRESTful APIs in .NET
RESTful APIs in .NET
 
A great clash of symbols
A great clash of symbolsA great clash of symbols
A great clash of symbols
 
What’s new in Visual Studio 2010 debugging
What’s new in Visual Studio 2010 debuggingWhat’s new in Visual Studio 2010 debugging
What’s new in Visual Studio 2010 debugging
 
Analyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And IssuesAnalyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And Issues
 
Application Security Part 1 Threat Defense In Client Server Applications ...
Application Security   Part 1   Threat Defense In Client Server Applications ...Application Security   Part 1   Threat Defense In Client Server Applications ...
Application Security Part 1 Threat Defense In Client Server Applications ...
 
.NET Recommended Resources
.NET Recommended Resources.NET Recommended Resources
.NET Recommended Resources
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 

Automated Unit Testing and TDD