Intro to fluency with TDD

Info

Breakout Session :: 300 (Advanced) :: Developer Practices

“In this demo-filled session, you’ll learn the why, what, where, when and how of working with test-driven development using the tools provided in Visual Studio 2010. In addition to seeing ‘testing-in-action’, you’ll learn about when to use what kind of test. You’ll learn both about using TDD with new code and in legacy situations. Code better and discover features in Visual Studio, such as code coverage and more that will help you to be more productive.”

Highlights

The session centered around fluency in TDD, and the requirement to keep your test code of production quality (i.e. refactor where necessary, etc.) – it also introduced the “Approvals” library, as an alternative to having to assert very granular bits of state.

The testing cycle suggested is: Whiteboard (Requirement), English (Translation), Code (Implementation), Test (Regression) and Result (Verification) and aims to promote the notion of “Intentional Code”.

Links

Using Tests to drive the entire SDLC

Info

Breakout Session :: 300 (Advanced) :: Developer Practices

“Given that you want to deliver high quality code, when you drive your entire software development lifecycle with tests – you will dramatically improve overall quality. Microsoft’s introduction of Visual Studio 2010 and Microsoft Test Manager provides very powerful tools we can use to begin with tests. In this presentation we specify an entire system with tests. We begin with tests to ensure the business value of an application is testable and we know when we’re done. Using those tests, we clarify the requirements using acceptance criteria expressed as test cases. Finally, we decompose the requirements to specific testable behaviours that will drive our unit tests. Armed with the complete understanding of the application, we begin to work upwards again. We automate the unit tests to ensure our code is tested. Then, as our code begins to take shape, we automate the functional tests to ensure our requirements are met – and stay met as our code continues to evolve. Finally, we automate the system and integration tests to prove to our customers that we have met the end-to-end vision of the application. The final demonstration shows the integration of all tests running during an automated nightly build.”

Video

Building Coded UI Tests with VS 2010

Info

Breakout Session :: 300 (Advanced) :: Developer Tools, Languages and Frameworks

“Coded UI tests allow developers to create fully-automated, functional UI tests which can be used to quickly alert a team about regressions. These are easy to create, but can become tricky to build in a robust manner which can sustain changes to your application over time. In this demo-rich session we will examine patterns and practices you can employ for building great coded UI tests.”

Highlights

  • Using a combination of Visual Studio (Premium or Ultimate), Feature Pack 2 (from MSDN subscription), C# or VB, and (optionally) Microsoft Test Manager, coded UI tests can be used to run functional regression tests manually (from VS or TM) or as part of an automated build process.
  • Tests are created by recording actions from within Visual Studio, or using an existing action recording from Test Manager.
  • The UI Map Designer serves as a mapping between the test code and application UI, and allows editing of test methods, control search- and filter properties, etc.
  • Extended functionality includes the ability to add validation with test builder by inspecting control properties, data-binding tests to a database, CSV file or XML file (where test will run for every row in the data), etc.
  • Tip: To record validation inspections, a test can be automated into a specific state by running the previously recorded test up until the point of validation.
  • The TestContext object is used to access test data, add result files, etc.
  • Test results can be published to TFS and attached to a new work item.

Links

Further Reading