Welcome to MSDN Blogs Sign in | Join | Help

New Unit Testing Features in Orcas (Part 1)

This is a part of a series of postings on the new unit testing features appearing in Orcas.  All these features will be available in Orcas beta 2.

I know that MSTest isn’t yet the darling of the TDD world, but I’d like to think that our TDD story has improved a decent amount in Orcas.  These are some of the improvements:

1 – Better Execution Times: We have rewritten our test execution engine to significantly improve the time that it takes to execute unit tests from the command prompt and via the IDE. 

2 – Run Tests: We have added a menu item to execute the tests in the current context of the test class’ code.  Executing “Run Tests” from a right click context menu will execute the best guess of the tests we think you would like to execute.  Therefore if the focus is on a test method, Run tests will execute the test method, if the focus is in a test class, Run Tests will execute all the tests in the test class, if the focus is in the test results window, Run Tests will execute the tests which are checked, etc.  Ctl R, T also accesses this command. I think you guys will love it. 

3 – Short Cut Keys to Run Tests: We have added in a lot of short cut keys to kick off a test quickly.  They are as follows:

·         Ctl R, T: Run Tests in Current context (see #2)

·         Ctl R, C: Run Tests in Current Test Class

·         Ctl R, N: Run Tests in Current Namespace

·         Ctl R, S: Run All Tests in Solution

·         Ctl R, D: Run the Tests in the Last Test Run

·         Ctl R, F: Run the Failed Tests of the Last Test Run

 

Holding Ctl while pressing the second key in the key combo executes the tests with the debugger.  We hope that these additions will significantly improve the TDD flow.

4 – Disable Deployment:  As many of you are aware, MSTest currently “deploys” tests for every test run it executes.  This means that in addition to generating a Test Results (trx) file, it also copies all the test binaries, code coverage files and debug information to a deployment folder, where the tests are executed.  This design provides for convenient features for collaboration, specifically publishing old test results and their deployments, allowing another team member to  re-run the tests and step through a test run.  It is however, inconvenient for TDD users, since most TDD’ers want their tests to execute as fast as possible.  We have therefore added an option in the Test Run Configuration to disable deployment.  To do so, go to the Test Run Configuration file in a Test Project (double click on *.testrunconfig in solution explorer), Deployment, and uncheck “Enable deployment.”

5 – Inheritance of Tests:  In Whidbey, we did not support the inheritance of tests methods or initializations.  We have added support for inheritance in Orcas.  I’m planning to use a future post to dive in to the nitty gritties of Test Inheritance.

6 – Directly go to the Point of Failure: We have enabled an option in Orcas to directly jump to the point of failure.  We have made the stack trace in the Test Results window clickable as well.  To specify that double clicking on a failed test result takes you to the first element in the stack trace, go to Tools->Options->Test Tools -> Test Execution and check the last box in the window.

Props to Alan Ridlehoover, Peter Provost and Peli de Halleux for their help in trying to get the TDD experience right. J

Published Friday, May 11, 2007 11:03 PM by nnaderi

Comments

# JayFlowers > What do MSTest and a congested highway have in common?

# Preliminary thoughts on TDD with MSTest in Orcas

Preliminary thoughts on TDD with MSTest in Orcas

Monday, June 25, 2007 1:38 AM by joeyDotNet

# Preliminary thoughts on TDD with MSTest in Orcas

Naysawn , the PM for MSTest, asked that I take a look at the new unit testing features of Orcas, after

Monday, June 25, 2007 1:46 AM by joeyDotNet

# re: New Unit Testing Features in Orcas (Part 1)

InCisif.net is a functional web testing tool for the .NET platform (www.incisif.net).

In the release 1.4, we have added support for Orcas/VS2008 test framework.

see out post at

http://blog.incisif.net/2007/06/06/using-visual-studio-2008orcas-testing-framework-with-incisifnet-14.aspx#Comment

Monday, July 16, 2007 11:11 PM by FredericALTorres

# Unit Testing in Visual Studio 2008 Pro edition

From the blog posting of Scott Guthrie , Unit Testing will be available on the Pro edition of Visual

Tuesday, July 31, 2007 11:51 AM by Erik Lenaerts

# What's new in Orcas?

Lot's of new stuff for web, load, and unit tests in Orcas. Follow the links for more info. Web test ·

Wednesday, August 01, 2007 9:18 AM by Ed Glas's blog on VSTS load testing

# Izindaba #7

Time for another weekly roundup of news that focuses on .NET and general development related content

Friday, August 31, 2007 1:27 AM by From the software development trenches

# Motley says: "Just use a batch file to run unit tests"

Summary Motley: Just use a batch file to execute unit tests - it's easy and quick. Maven: Use a unit

Tuesday, September 18, 2007 9:53 PM by Progressive Development

# Motley says: "Just use a batch file to run unit tests"

Summary Motley: Just use a batch file to execute unit tests - it's easy and quick. Maven: Use a unit

Tuesday, September 18, 2007 10:05 PM by Noticias externas

# re: New Unit Testing Features in Orcas (Part 1)

These improvements are *much* needed.  Looking forward to it.

Friday, October 05, 2007 1:23 PM by BenScheirman

# Unit Testing in VS 2008 - Still not there

I'm starting to take a look at VS 2008 and writing down some things that are still "not there": Renaming

Tuesday, October 16, 2007 9:34 PM by ISerializable - Roy Osherove's Blog
Anonymous comments are disabled
 
Page view tracker