Test Driven Development and Keybindings

For those that practice Test Driven Development (TDD) here’s a quick reminder about keybindings in Visual Studio 2008 that will make your life easier:

  • Run all tests in the solution – Ctrl+R, A
  • Run tests in the current class – Ctrl+R, C
  • Run tests in the current context – Ctrl+R, T
  • Run tests in the current namespace – Ctrl+R, N

There is also a variant which debugs the tests, to use this variant hold down Ctrl when pressing the second key in the chord.

I also like to bind Ctrl+N, T to Project.AddNewTest and Ctrl+N, U to Project.AddUnitTest so I can quickly add tests to the current test project.

Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build

I’m proud to say that after many months of work Sayed Ibrahim Hashimi and I have completed work on Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build (PRO-Developer). It is being published by Microsoft Press and is due out on 7th January 2009.

Allowing Users To Edit Destination Email Address in Reporting Services

When users subscribe to a report via email in Reporting Services the destination email address field defaults to their username and is read-only. If the SMTP server that you’re using won’t accept emails for plain usernames then you will have to allow users to enter their full email address when subscribing to a report.

To do this:

  1. Edit %ProgramFiles%\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\rsreportserver.config.
  2. Locate <SendEmailToUserAlias>True</SendEmailToUserAlias> and change True to False.
  3. Save the file and restart the ReportServer service.

Specifying What’s Included In A New Test Project

When you create a new test project the following files are added to it by default:

  • AuthoringTests.txt
  • ManualTest1.mht
  • UnitTest1.vb (or UnitTest1.cs)

You can configure what files are added in Tools | Options | Test Tools | Test Project as shown here:

image