Benjamin Day Consulting, Inc. - Unit Testing & Test-Driven Development Courseware for Visual Studio 2010
Well, like I mentioned in my last post, I’m planning to publish a lot of the old courseware that I’ve developed over time. The idea is to share the materials that I’m no longer using with the good folks on the internet rather than to have it all sitting around collecting virtual dust on my laptop.
This time, I’m pushing out the labs and slides for my 2-day unit testing & test-driven development (TDD) course for Visual Studio 2010. A few months ago, I started looking at upgrading the VS2010 course to Visual Studio 2012 and decided that it was actually time for a re-write because I don’t really write tests the same way anymore.
The labs for this course focus on process and software architecture patterns for how to:
- Create unit tests for a Deck of Cards using TDD
- Unit test the Adapter pattern
- Unit test the Repository pattern
- Using mock objects to test in isolation
- Unit testing a user interface using the Model-View-Presenter (MVP) pattern
Here are the materials for the course:
- Course description and syllabus
- Slides in PDF format
- Slides in PowerPoint format
- Labs in PDF format
- Code for the labs (before and after) [GD:Click through for the download links]
Course description and syllabus
Unit Testing & Test-Driven Development with Visual Studio 2010
Unit testing enables you and your team to write high-quality software with fewer bugs. It also allows you say with confidence when something in your code is working and – more importantly – know when it is not working. Test-Driven Development (TDD) is a methodology for writing software that ensures that your application and your application code are testable and tested from the very start. This course is designed to give the student hands-on experience and knowledge for writing and maintaining applications using Test-Driven Development. Throughout the course we will discuss the options, process, and motivations for unit testing and TDD and reemphasize these concepts using hands on labs.
What you’ll learn:
· What is a unit test?
· What is Test-Driven Development (TDD)? Why is TDD important?
· What is the TDD process?
· Common (bogus) excuses for NOT doing Unit Testing & TDD
· How do I sell my team on Unit Testing & TDD?
· Create and write unit tests
· Test types in Visual Studio 2010
· Architect your application for testability
· Testing user interfaces
· Test non-public methods
· Strategies for unit testing legacy code
· The RhinoMock Framework – Mocks & Stubs
· Using Mocks & Stubs to avoid The Huge Integration Test pitfall
· Dealing with databases and test data in your unit tests
· Mocking web services, back-end systems, and database calls
· Design Patterns for testability: Repository, Adapter, N-Tier Architecture, Model-View-Presenter (MVP), Model-View-Controller (MVC), and Model-View-ViewModel (MVVM)
· Best Practices for fixing bugs & defects using TDD
· Refactor for testability
· What is Code Coverage and why do I care?
· What other non-TDD test types are available? Web Testing, Load Testing, and Coded UI Tests
This looks like a great learning resource, and since there's still a great many people on VS2010 (Yes, I'm looking at you...) I thought you all might find this useful. And even if you've moved forward, there's a good deal you can learn... :) Sure, it's only the "resources" and not the actual training, but that's still pretty cool. :)