DEV322 Unit Testing Best Practices With Visual Studio 2005 Team System Mark Seemann Senior Consultant Microsoft Consulting Services.

Slides:



Advertisements
Similar presentations
Test-Driven Development José Almeida, Microsoft
Advertisements

Vishal Mehrotra Senior Lead Program Manager | Microsoft |
Mike Azocar Sr. Developer Technical Specialist Microsoft Corporation
The Microsoft Technical Roadshow 2006 Welcome and Introduction Kevin McDaniel Developer & Platform Evangelism Group Microsoft Ltd
Optimised Desktop Paul Butterworth Enterprise Technology Strategist Microsoft Corporation.
Visual Studio 2005 C# IDE Enhancements Luca Bolognese C# Program Manager Microsoft Corporation.
Software Development using SCRUM for Visual Team System Sascha P. Corti Developer Evangelist Microsoft Switzerland GmbH
Test-Driven Development Gary Brown Building better software one test at a time.
WEB329 ASP.NET: A Lap Around the New Enhancements for Web Developers in Microsoft Visual Studio 2005 Omar Khan Lead Program Manager Web Platform and Tools.
Test Driven Development using Visual Studio Team System Ariel Gur-Arieh VP R&D – MCD Software Solutions
DEV317 Integrating Extensible Business Graphics into Enterprise Applications using Visio 2003 Mai-lan Tomsen Bukovec Program Manager.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
Visual Studio 2005 Team System: Building Robust & Reliable Software Tejasvi Kumar Technology Specialist - VSTS Microsoft Corporation
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
Building Robust and Reliable Software Jason Anderson, Microsoft
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
Sudesh Krishnamoorthy Developer Technology Specialist | Microsoft |
DEV 301 Visual Studio Team System Tom Arnold Program Manager Microsoft Corporation “Enabling Better Software through Better Testing”
Ahmed Salijee Developer Advisor DTL201.
Building More Reliable And Better Performing Web Applications With Visual Studio 2005 Team System Gabriel Marius TLN312 Program Manager Microsoft Corporation.
DEV339: Creating Windows and Web Applications with WPF (DEV339) Ian Griffiths Independent Consultant & Pluralsight Instructor
Testing Azure Applications with Visual Studio 2010 Abhishek Agrawal Senior Program Manager Visual Studio Microsoft Corporation
Smart customizations Microsoft Dynamics TM AX 4.0 Michael Fruergaard Pontoppidan Partner Productivity – Microsoft Dynamics AX TM Microsoft Corporation.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Giles Davies Testers are from Venus.
Visual Studio 2005 Team System: Enabling Better Software Through Testing Tejasvi Kumar Technology Specialist - VSTS Microsoft Corporation
DEV394.NET Framework: Migrating To Managed Code Adam Nathan QA Lead Richard Lander Program Manager Microsoft Corporation.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
Neil Kidd Developer Tools Technical Specialist Microsoft UK.
Connect with life Cheryl Johnson VSTS Solution Expert | Canarys Automations Pvt Ltd Performance Testing.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
Performance Testing Using VSTS Saravana Kumar Microsoft MVP, VSTS Hewlett Packard Saravana Kumar Microsoft MVP, VSTS Hewlett Packard.
WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.
HETEROGENEOUS DEVELOPMENT WITH VISUAL STUDIO 2010 Mitch Denny Chief Technology Officer Readify SESSION CODE: #DEV307 (c) 2011 Microsoft. All rights reserved.
(Complex) Problem domain Requirements Specification
DEV260 Microsoft Visual Studio 2005 Team System: Managing the Software Lifecycle with Visual Studio 2005 Team System Bindia Hallauer Senior Product Manager.
Unit testing your metro style apps built using XAML
Microsoft Ignite /4/2018 8:46 AM
Visual C# 2005: IDE Enhancements
Data Science & Web Dev with Python in Visual Studio
Getting Started with Visual Studio Tools for Tizen
Enterprise Library Overview
Manual testing of Windows Metro style apps built using HTML
Office 365 Development.
Microsoft Visual Studio Team System: A Lap Around VSTS 2010
What’s new in Visual Studio in 2015?
11/22/2018 8:05 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Branching and Merging Practices
Back Tracking of Issues –Before Escalating to Developer
Working with different JavaScript frameworks and libraries
Application Insights Diagnostics Preview
Web Development in Visual Studio 2017
Tech Ed 2004 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express.
1/14/2019 3:57 AM © 2004 Microsoft Corporation. All rights reserved.
Visual Studio 2005 Tools For Office: Creating A Multi-tier Application
Unit Testing Good Practices
Microsoft Connect /16/ :45 PM
Build /23/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
UI test automation of MVC apps with Microsoft Edge WebDriver
Build /4/ Diagnosing issues with Windows Phone 8.1 JavaScript apps using Visual Studio Andy Sterland Senior Program
DEV322 Visual Studio 2005 C# IDE Enhancements
Using Smart Unit Tests to find bugs earlier in the development cycle
Inside the Windows 8 driver developer workflow
Office 365 Development July 2014.
Mark Quirk Head of Technology Developer & Platform Group
Welcome to Architect Insight 2010
02 | Release Management Architecture
Jamie Cool Program Manager Microsoft
Contexualized Data In Document Authoring
Presentation transcript:

DEV322 Unit Testing Best Practices With Visual Studio 2005 Team System Mark Seemann Senior Consultant Microsoft Consulting Services

Agenda What is a unit test? When to test? Who should test? How to test? What to test Choosing methodologies Best practices

Unit Testing Defined Tests a single assembly in isolation Volatile dependencies must be abstracted away Fully automated tests Unit tests constitute automated regression tests Binary results (pass or fail)

When To Write Unit Tests Before writing code Test-driven development, agile, XP, etc. After code is written Quality assurance, bug discovery, regression testing

Writing Unit Tests Before And After Writing Code Mark Seemann Senior Consultant Microsoft Consulting Services

Who Should Write Unit Tests? Depends on the purpose of the test: Developers write their own tests in test-driven development Testers write quality assurance tests Developers should not write their own quality assurance tests

How To Write Tests What to test Choosing methodologies Best practices

What To Test Unit test all of your own code, except User interfaces (Web) service façades UI and service façades should be subjected to other types of tests Test only against your public API

Testing Against Public Only API Mark Seemann Senior Consultant Microsoft Consulting Services

Approaches Pragmatic Formal Approaches can be mixed

Pragmatic Unit Testing Usage-oriented Can involve sequences of operations Suitable for test-driven development

Writing a Pragmatic Unit Test Mark Seemann Senior Consultant Microsoft Consulting Services

Formal Unit Testing Systematic Atomic Check boundary conditions Exercise error paths Suitable for QA

Atomic Unit Test Structure 1. Build initial state using alternative, low-level APIs if possible 2. Invoke test target member 3. Validate results

Writing a Formal Unit Test Mark Seemann Senior Consultant Microsoft Consulting Services

Best Practices Test cases must be independent Test cases must be deterministic Reproduce bugs as test cases Place tests in separate projects Have a test project per test target Use source control on test projects

Applying Best Practices with Visual Studio 2005 Team System Mark Seemann Senior Consultant Microsoft Consulting Services

Summary Unit test all relevant libraries Test only public API Set high code coverage goal

Resources Unit Testing Tips: Write Maintainable Unit Tests That Will Save You Time And Tears ( esting) esting

Ask The Experts Get Your Questions Answered You can find me at the Microsoft Ask the Experts area, located in the Exhibition Hall: Friday10 November10.15 – 10.45

©2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.