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 a class using the "Rename" refactoring still does not change the file name. Are you kidding me?
  • using "prop" snippet produces the shorthand syntax for properties. Nice.
  • This is still all the refactoring we have by default in VS 2008:

image Are you kidding me?

  • You can finally do test inheritance (and many other small blessings. someone is listening)
  • You Still have to using anything that derives from Exception but not the "Exception" type in the "Expected Exception" attribute. Truly silly.
  • the [ExpectedException] attribute is still broken!! This test should fail due to a wrong exception message, but passes:

image

  • No easy extensibility mechanism.
  • No ability to run NUnit tests.

Someone is not paying enough attention, or has their priorities screwed up.

Published Tuesday, October 16, 2007 9:34 PM by RoyOsherove
Filed under:

Comments

Tuesday, October 16, 2007 10:18 PM by Rob Cannon

# re: Unit Testing in VS 2008 - Still not there

I think you are expecting the wrong thing in your example of [ExpectedException(typeof(NotImplementedException),"a")].  "a" is simply the message that will print out in the test results if the wrong (or no) exception is thrown.

Tuesday, October 16, 2007 10:27 PM by Joe Ocampo

# re: Unit Testing in VS 2008 - Still not there

Thinking positive, maybe Microsoft does this intentionally to promote 3rd party and OSS support for their IDE.

Thinking negatively, they smoke crack sometimes.

:-)

Tuesday, October 16, 2007 11:15 PM by Rama Krishna

# re: Unit Testing in VS 2008 - Still not there

I will like to add:

The private accessor (for unit testing private methods) creation is broken. The accessors never get created in my case. I get a message saying "... has no implementation"

Wednesday, October 17, 2007 12:28 AM by Joe Chung

# re: Unit Testing in VS 2008 - Still not there

Does it even make sense to write a test to expect an exception of type System.Exception?

Wednesday, October 17, 2007 7:55 AM by Dennis van der Stelt

# re: Unit Testing in VS 2008 - Still not there

The "prop" snippet sucks

public string Whatever {get;set;} is easily typed. But when you're doing .NET 2.0 in VS2008 that snippet is useless!

Wednesday, October 17, 2007 9:58 AM by Ben Scheirman

# re: Unit Testing in VS 2008 - Still not there

If MSTEST is still lagging WAY behind NUnit and MBUnit, then how do they ever expect to reach the people *who actually DO THIS STUFF* ??

I mean seriously, VSTS & TFS introduced a toy testing framework and they got severely ridiculed for it.  I can't believe they're making the same mistake twice.

Wednesday, October 17, 2007 6:46 PM by Jeff Brown

# re: Unit Testing in VS 2008 - Still not there

I guess Microsoft must think Mort doesn't refactor or they simply aren't interested in putting in more than token effort.  Thankfully ReSharper rocks.

Sure there's an easy extensibility mechanism: use MbUnit... ;-)

After all, we have ALTernatives.  *grin*

Thursday, October 18, 2007 9:38 AM by pb

# re: Unit Testing in VS 2008 - Still not there

FYI, If you rename the file it renames the class using the refactor tools.

Thursday, October 18, 2007 11:04 PM by Mike Liddell

# re: Unit Testing in VS 2008 - Still not there

Somehow the vs.net team has the ability to produce an automation interface that allows for Reshaper etc to be written, yet on the other hand they do not produce the actual interface tools that people ask for.

Whenever I get frustrated with vs.net I still marvel at the automation.

Resharper is just so awesome.. I tried coding the other day without it and I almost cried.

vsts is not particularly good, but the deep integration with the IDE and TFS is enough of a selling point for my requirements.  However, why it is only in premium vs.net is beyond me... this should be the first thing they promote to the wider vs.net community.

Wednesday, October 31, 2007 5:22 PM by Ben

# re: Unit Testing in VS 2008 - Still not there

Yeah!  What are these people thinking?

msdn2.microsoft.com/.../aa718761.aspx

I quote from the page: "Get in touch with what the Visual Studio 2005 Team System team is thinking and doing via their blogs."

I'm very curious on what is going through their minds so I'm going to start reading there blogs..