Top Banner
Test Driven Test Driven Development Development using using Visual Studio Team Visual Studio Team System System Ariel Gur-Arieh VP R&D – MCD Software Solutions http://blogs.microsoft.co.il/
28

Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Dec 24, 2015

Download

Documents

Buck Mathews
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Test Driven Development Test Driven Development using using

Visual Studio Team SystemVisual Studio Team SystemAriel Gur-AriehVP R&D – MCD Software Solutionshttp://blogs.microsoft.co.il/blogs/arielga

Page 2: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

AgendaAgenda

• Challenges we deal today• Unit Testing• Database can be Unit Tested!• Be Agile - Test Driven Development• Q&A• Summary

Page 3: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Challenges we deal todayChallenges we deal today

• Does our code do what we intended?• Documentation – is it updated?• Debug – again?• Change Request – no sleep, again!?!• Customers speak Gibberish, translation

please.

Page 4: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Unit TestUnit Test

Parts of the code behaves as intended.

Page 5: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

DEMODEMOUnit Test using Visual Studio.

Page 6: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Code CoverageCode Coverage

Which code has been touched by a test.

Page 7: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

DEMODEMOCode Coverage Using Team System.

Page 8: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Database can be Unit Tested!Database can be Unit Tested!

User Interface

ApplicationCode

UnitTests

Data Access Layer

Stored Procedures

Page 9: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

DEMODEMODatabase Unit Testing.

Page 10: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Get Agile – Test Driven Get Agile – Test Driven DevelopmentDevelopment

Tools For Agility, Kent BeckTools For Agility, Kent Beck

Practices

Tools

Page 11: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Test Driven DevelopmentTest Driven DevelopmentThe motto "Red, Green, Refactor ".

Page 12: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

DEMODEMOChanging code in TDD.

Page 13: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

TDD in Action: Active BugTDD in Action: Active BugBug: Expired Credit Cards are being Credited

Page 14: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

DEMODEMOAdding code in TDD.

Page 15: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

TDD in Action: New RequirementTDD in Action: New RequirementRequirement: Add Bonuses to special customers.

Page 16: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Quality IndicatorsQuality Indicators

Iteration 1 Iteration 3 Iteration 4 Iteration 5Iteration 2

91

20

51

76

60

56

19

18

40

71

80

32.5

12

8

9

Page 17: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Benefits of Test Driven Benefits of Test Driven DevelopmentDevelopment

Page 18: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Benefits of Test Driven Benefits of Test Driven DevelopmentDevelopment

$59,000,000,000

Page 19: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

TDD - Application LifecycleTDD - Application Lifecycle

Development and testing/bug fixing take about the same amount of timeDevelopment takes more time than testing, and testing time is reduced Overall lifecycle is shortened

Page 20: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Unit testing is a learned skill Unit testing is a learned skill that can only be honed with that can only be honed with experience.experience.

Page 21: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Starting Test Driven DevelopmentStarting Test Driven Development

Creating a cultural change is hard…Creating a cultural change is hard…

…….. and it can be .. and it can be done.done.

Page 22: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Q & AQ & A

Page 23: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

SummarySummary

• Development becomes more challenging.• Unit Test create a safety net.• Database can be Unit Tested!• Documentation is the best side effect ever!• Development is Faster using TDD.• VSTS is a great tool for UT and TDD.

Page 24: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

THANK YOUTHANK YOU

Page 25: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Additional ResourcesAdditional Resources• Visual Studio Team System 2008 - Trial Software

http://msdn.microsoft.com/en-gb/vsts2008/products/cc268310.aspx

• MSDN - Working with Unit Testshttp://msdn.microsoft.com/en-us/library/ms182515.aspx

• Guidelines for Test-Driven Developmenthttp://msdn.microsoft.com/en-us/library/aa730844.aspx

Page 26: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

Related SessionsRelated SessionsALM301: Web Sites Testing with Visual Studio Team SystemShai Raiten10:50-12:00 Arava Hall

ALM303: Professional Developer Tools in Visual Studio…Maor David10:50-12:00 Tavor Hall

DEV314: Design Patterns – Learn From the Experience… Avi Roth14:30-15:40 Galil Hall

Page 27: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .
Page 28: Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions .

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.