TestDriven.Net 3.0 – All Systems Go

I’m pleased to announce that TestDriven.Net 3.0 is now available. Finally! I know many of you will already be using the Beta and RC versions, but if you look at the release notes you’ll see there’s been many refinements since then, so I highly recommend you install the RTM version. Here is a quick summary of a few new features:

Visual Studio 2010 supports targeting multiple versions of the .NET framework (multi-targeting). This means you can easily upgrade your Visual Studio 2005/2008 solutions without necessarily converting them to use .NET 4.0. TestDriven.Net will execute your tests using the .NET version your test project is targeting (see ‘Properties > Application > Target framework’).

TargetFramework

There is now first class support for MSTest when using Visual Studio 2008 & 2010. Previous versions of TestDriven.Net had support for a limited number of MSTest attributes. This version supports virtually all MSTest unit testing related attributes, including support for deployment item and data driven test attributes. You should also find this test runner is quick. ;)

MSTest

There is a new ‘Go To Test/Code’ command on the code context menu. You can think of this as Ctrl-Tab for test driven developers; it will quickly flip back and forth between your tests and code under test. I recommend assigning a keyboard shortcut to the ‘TestDriven.NET.GoToTestOrCode’ command.

GoToTest

NCover can now be used for code coverage on .NET 4.0. This is only officially supported since NCover 3.2 (your mileage may vary if you’re using the 1.5.8 version).

TestWithNCover

Rather than clutter the ‘Output’ window, ignored or skipped tests will be placed on the ‘Task List’. You can double-click on these items to navigate to the offending test (or assign a keyboard shortcut to ‘View.NextTask’).

TaskList

If you’re using a Team, Premium or Ultimate edition of Visual Studio 2005-2010, a new ‘Test With > Performance’ command will be available. This command will perform instrumented performance profiling on your target code.

Performance

A particular focus of this version has been to make it more keyboard friendly. Here’s a list of commands you will probably want to assign keyboard shortcuts to:

Name Default What I use
TestDriven.NET.RunTests Run tests in context   Alt + T
TestDriven.NET.RerunTests Repeat test run   Alt + R
TestDriven.NET.GoToTestOrCode Flip between tests and code   Alt + G
TestDriven.NET.Debugger Run tests with debugger   Alt + D
View.Output Show the ‘Output’ window Ctrl+ Alt + O  
Edit.BreakLine Edit code in stack trace Enter  
View.NextError Jump to next failed test Ctrl + Shift + F12  
View.NextTask Jump to next skipped test   Alt + S

 

By default the ‘Output’ window will automatically activate when there is test output or a failed test (this is an option). The cursor will be positioned on the stack trace of the last failed test, ready for you to hit ‘Enter’ to jump to the fail point or ‘Esc’ to return to your source (assuming your ‘Output’ window is set to auto-hide).  If your ‘Output’ window isn’t set to auto-hide, you’ll need to hit ‘Ctrl + Alt + O’ then ‘Enter’. Alternatively you can use ‘Ctrl + Shift + F12’ (View.NextError) to navigate between all failed tests.

Output 

For more frequent updates or to give feedback, you can find me on twitter here.

I hope you enjoy this version. Let me know how you get on. :)

80 Comments

  • Cool! Congratulations for the release.

    However, I wonder about your tip about using View.NextError (Ctrl-Shift-F12) to navigate between the failed tests. For tests that failed with en exception (e.g., because the expected exception message isn't correct), the Error List view will always jump to where the exception was thrown, not to the failing test.

    This makes the Error List (including View.NextError) nearly unusable for navigating to failed tests; Ctrl-Shift-F12 usually slows me down instead of making me faster.

    Instead, I usually go to the Output window and search for "failed:"...

    Here's an example of what I mean:

    Test 'Remotion.Data.UnitTests.DomainObjects.Core.Transaction.ReadOnlyClientTransactionTest.ThrowsOnGetRelatedObjects1SideIfNotLoaded' failed:
    The exception message text was incorrect
    Expected: The operation cannot be executed because the ClientTransaction is read-only. Offending transaction modification: ObjectsLoading.
    but was: The operation cannot be executed because the ClientTransaction is read-only. Offending transaction modification: RelationEndPointMapRegistering.
    Infrastructure\ReadOnlyClientTransactionListener.cs(277,0): at Remotion.Data.DomainObjects.Infrastructure.ReadOnlyClientTransactionListener.EnsureWriteable(ClientTransaction clientTransaction, String operation)
    [...]
    DomainObjects\Core\Transaction\ReadOnlyClientTransactionTest.cs(131,0): at Remotion.Data.UnitTests.DomainObjects.Core.Transaction.ReadOnlyClientTransactionTest.ThrowsOnGetRelatedObjects1SideIfNotLoaded()

    Clicking on the error in the Error List (or using View.NextError) will get me to ReadOnlyClientTransactionListener.EnsureWriteable, not ReadOnlyClientTransactionTest.ThrowsOnGetRelatedObjects1SideIfNotLoaded; and there's really no way of getting to the test method without using the Output window.

    Don't you have this problem? How do you tackle it?

  • Hi Fabian,

    Unfortunately there's a bug in VS 2008 with 'Error List' items that don't have an associated stack trace. Navigation will work, but when you next close Visual Studio, it will crash. :(

    Because of this I only add 'Error List' items with no stack trace when using VS 2010. This is unfortunate, but the last thing I want to do is make VS 2008 unstable!

    I'm guessing you are using VS 2008?

  • Nope, using VS 2010 (and TestDriven 3.0.2749).

    AFAICS, tests that throw an exception always contain a stack trace. If the exception is caused by an Assert failing, the top-most line of the stack-trace is the line with the Assert. This is good. However, if the exception is caused by anything else, the code throwing the exception will be at the top of the trace. The test might be several lines below, and it can only be reached via the output window (by clicking on the last line in the stack trace or pressing F8 multiple times).

    Contact me at fabian dot schmied at rubicon dot eu if you need more information.

  • Ah, I see what you mean. The problem I've had in the past has been with failed tests with no stack trace information (e.g. when there's an expected exception, but non is thrown). This has been fixed in VS 2010, but not in VS 2008 because of the crashing issue.

    The trick with 'Error List' items if finding the stack frame the user is most likely to be interested in. I've always used the top stack frame with file and line number information. This works well for failed asserts, but can be annoying when this is outside of the failed test method.

    I'll experiment with other ways to do this and drop you an email.

  • i just have visual studio 2010 installed, and I did not install framework 3.5 sp1 or 2.0, when i install the TestDriven.Net 3.0 it show me "Unable to find a version of runtime to run this application", how should i do?

  • @smilekiki From the command line, could you try the following:

    set ComPlus_Version=v4.0.30319
    setup.exe

    See if this allows the installer to run.

  • I've been playing with the Test With > Performance option and I've noticed that all the project & referenced dlls are instrumented each time you run, even if there haven't been any changes.
    This means a test run which should take a few seconds can be a couple of minutes long.

  • In previous version, there was a command for Run All Tests in solutions.

    That seems to have disappeared in 3.0

    Was that intentional, or is it a bug?

  • I am missing TestDriven.NET.Solution in TestDriven.Net 3.0 ... Now it seems I can only run 1 test each time if my cursor is at a test method

  • Excellent article, proves your brilliance, helped me by providing solution, thanx.

  • In this modern and fashionable society, people are pursuing for tiffany jewellery cool, unique, stylish and innovative. Whether it is tiffany uk or fashion accessories all means a lot for modern society of today. Same is the case with trendy looking tiffany jewellery uk. When these are tiffany and co, the excitement just gets doubled. Most chic looking tiffany co jewellery are in fashion now. These are one of the favorite fashion accessories for men and women long time ago.

  • Any updates to TestDriven.net coming this year? Thanks!

  • This is a top notch quality New Era Hats & Caps! Newest styles and brands of hats & caps including DC Hats,New York Yankees Hats, Red Bull Hats,Monster Energy Hats and sports team haps.

  • I agree with your Blog and I will be back to check it more in the future so please keep up your work. I love your content & the way that you write. It looks like you have been doing this for a while now, how long have you been blogging for?I agree with your Blog and I will be back to check it more in the future so please keep up your work. I love your content & the way that you write. It looks like you have been doing this for a while now, how long have you been blogging for?

  • I agree with your Blog and I will be back to check it more in the future so please keep up your work. I love your content & the way that you write. It looks like you have been doing this for a while now, how long have you been blogging for?

  • you can not only be informed, but also entertained!

  • dgqgYT This article is for professionals..!

  • it requires a large number of important information and facts in my opinion. My business is prepared to come across a person's recognized way with words the particular blog post. Congratulations, you allow me personally to be aware of in addition to put into practice the reasoning. I appreciate you for the particular write-up...!

  • That was exactly what I was looking for. You have done a wonderful job communicating your message. Keep up the good work.

    Thank you .

  • Your blog is perfect, and I like this article. I think I can find more useful information here, thanks.

  • I thought it is going to be some boring old post, but it

    really compensat for ours time. I will posted a link to the

    article on our blog. I am sure ours.

  • Surely, I will revisit your site for additional info. Thanks for the article.

  • Surely, I will revisit your site for additional info. Thanks foSSSSr the article.

  • Thanks a lot for enjoying this beauty article with me. I am

    apreciating it very much! Looking forward to another great

    article. Good luck to the author! all the best!

  • I am very impressed with your views and interesting content. I hope you intend to continue writing more informational articles.This blog Is very informative , I am really pleased to post my comment on this blog . I

    The article in your blog reminds me some old memory .That is good .It gives me happy .I think we will have a harmonious talk.


  • The article in your blog reminds me some old memory .That is good .It gives me happy .I think we will have a harmonious

    talk.Do you agree?

  • A great material that is both waterproof and breathable is Gore-Tex, which is a patented micropourous fabric. It withstands heavy wear and tear. Thanks for the sharing nice and great article.

  • These everyday items should be designed so that the extreme weather conditions can be largely offset. It has been observed some years ago, that the areas where the winter was very cold have become colder while the hot spots is heating up.

  • I am Happy to be here! Interested parties can contact a lot


    Perhaps this is one of the most interesting blogs that I have ever seen.

  • Your article was great, evident by his comments. I am also happy to read

    I hope you have a nice day! Very good article, well written and very thought out.

  • Asics Schuhe ist die beste Laufschuhe,Beste Verarbeitungen, hochwertige Materialen und ein unverwechselbares Design machen Asics Schuhe zum Liebhaber vieler Schuhfans, denn sie sind auch für den Alltag perfekt einsetzbar!

  • A man is stupid always find a job. One day he to KFC interview. The manager asked: do you have a hobby? He said: I will sing. So he clearly voice sings: more choice more laughter all in McDonald's...

  • This blog is certainly excellent. Excellent work. For this reason I enjoy of keeping returning to the weblog

    You made some respectable factors there. I appeared on the web for the problem and found most individuals will associate with with your website.

  • Just want to say what a great blog you got here!I've been around for quite a lot of time, but finally decided to show my appreciation of your work!

  • Very good written article. It will be useful to anybody who usess it, including yours truly . Keep up the good work – for sure i will check out more posts.

  • I’m still waiting for some interesting thoughts from your posts,waiting for your next posts.Thanks!

    I came to your article from another article and am really interested in this learning about this, I feel strongly about information and love learning more on this. If possible, as you gain expertise, It is extremely helpful for me.

  • I came to your article from another article and am really interested in this learning about this, I feel strongly about information and love learning more on this. If possible, as you gain expertise, It is extremely helpful for me.

  • For more information, please view our Privacy Policy.

  • I seriously like to read such posts to suit your needs share different kinds of expertise that people should know about. You're consequently impressive author my spouse and i never discover before. Many thanks as well as sustain the truly amazing work.

  • What a wonderful blog you have created. I just stopped in to tell you I really appreciated the read and shall be dropping by from time to time now.

  • Within European countries, Moncler may be selected to become kit with regard to archaeologists. Archaeologists put on this particular items once they tend to be performing survey within polar places. Within 1954, it had been selected to become kit associated with German archaeologists in order to discover the actual artefacts associated with historic empires. Within 1955, France discovering group visited Makale, putting on Moncler. Within 1968, it had been the state ally from the 10th Olympic Winter season Video games.

  • Cheap-Hats.org is a professional cheap hats wholesaler. We mainly specialize in top brand hats. With years’ of trading experience, we have sold large quantities to both home and abroad. Though our products are copycats, but they are similar to the original one up to 99.9%. You never have to worry about our quality and service.

  • Traditional inner-city black ghettos are thinning out and changing, drawing in

  • Our intention can be to evaluation problems identified according even although in the path of distinctive genres of composing

  • yea,i am agree with your idea! thanks for your sharing. It is very nice to me!

  • Happy to see your blog as it is just what I’ve looking for and excited to read all the posts. I am looking forward to another great article from you.

  • In PHP, we often use xdebug. I usually integrate xdebug with my netbeans editor.

  • cheap beatz by dre

  • This is a very informative article.I was looking for these things and here I found it. I am doing a project and this information is very useful me. If you are interested, but this is my duty to inform you that virtual administrative assistant a very dedicated service and can be applied anywhere you want and get better results.

  • It is nice to know that this one here really exist. I would love to track your future posts

  • H35DaR Read, of course, far from my topic. But still, we can work together. How do you feel about trust management?!....

  • 2. Avoid holes is your home alarm system coverage. Trying to limit the amount of weak points in your home alarm coverage is the ultimate goal. Remember that depending on the type of motion sensors you are using, you may have

  • 2. Avoid holes is your home alarm system coverage. Trying to limit the amount of weak points in your home alarm coverage is the ultimate goal. Remember that depending on the type of motion sensors you are using, you may have

  • Make sure that you just go on to come up with a conversation that will help make everybody impart more. Everyone need to be vigilant at whatever you said or maybe you will probably be put into a position where no one are likely to answer.

  • Mont Blanc produces a regular line of writing instruments that for the most part doesn't change each season. They do however produce a series of four limited editions each season and they are their Patron of the Arts Edition, their Writers Edition, their Special Theme Editions and their Donation edition Pens.

  • is or her name with a Mont Blanc Meisterstuck Collector 100 year anniversary edition roller ballpoint pen which is the ultimate in elegant writing instruments. In fact, it is almost an insult to refer to such a piece of stylish craftsmanship as a personalized pen.

  • This is a very informative article.I was looking for these things and here I found it. I am deed a project and this idiot is very useful me. If you are interested, but this is my duty to inform you that virtual administrative deputy a very dedicated service and can be applied anywhere you want and get better consequences..

  • The postings are very distinctive furthermore to out standing all round performance producing utilization of the brand brand new imagination and excellency producing utilization of the brand brand new very several techniques and concepts.Really I am waiting for some a complete terrific provide extra new posts from you.Keep up your excellency and usefulness on this relatively identical levels.
    %%%

  • QC5rwJ Thanks for the blog.Thanks Again. Want more.

  • This is my first visit to your blog! Merely I look up to the precious time and endeavour you frame into it, especially into interesting articles you part here!

  • Say, you got a nice article post.Much thanks again. Keep writing.

  • Awesome blog post.Thanks Again. Will read on...

  • sNV9KG Very neat post.Thanks Again. Keep writing.

  • e5U8vm Hey, thanks for the post.Thanks Again. Will read on...

  • I am so grateful for your blog post.Much thanks again.

  • That the impurities in the acid from Tuscany increase from year to year, so that the quantity of foreign matters.

  • TwellaJep coach factory outlet online
    TotInsuts coach outlet
    guethighsiz coach factory outlet online
    Audisrurn coach outlet store online
    Audisrurn

  • aqdxf jason pierre paul jersey
    oldfz matthew stafford jersey
    xxslu lance moore jersey
    gqmal aldon smith jersey
    fmnhl santonio holmes jersey

  • Really great blog. I like this information really its very nice collection of the great information.thanks for sharing the information.

  • What a great post! thanks

  • I hope you will continue your same best work and we will get more informative post which can helpful to us. Thanks for this

  • I am using VS2012 for that I have installed Test Driven.Net setup v3.4.
    3 days back, everything was working fine. But yesterday during windows updates few security updates of .NET framework 4.5 are installed as below
    Security Update for Microsoft .NET framework 4.5 (KB2789648)
    Security Update for Microsoft .NET framework 4.5 (KB2742613)
    After this, we found that when we run tests using right click-->Run test context menu, all test runs successfully.
    But when I run tests using Right Click-->Test With-->NCover, then few tests are failed with below exception :
    Test CommandTest.TestConditions threw exception:
    System.TypeInitializationException: The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry' threw an exception. ---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
    at Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter..ctor(String template, IDictionary`2 extraTokenHandlers)
    at Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter..ctor(String template)
    at Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter..ctor()
    at Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry..cctor()
    --- End of inner exception stack trace ---
    at Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry..ctor()

  • I was reading through some of your articles on this internet site and I think this web site is rattling instructive! Retain posting.

  • Thanks a lot for the post.Really looking forward to read more. Will read on...

  • Hey, thanks for the post.Really looking forward to read more. Really Cool.

  • I'm not really way too ' consent exactly what statements you are
    making, but you contain a reasonable level regarding TestDriven.
    NET

  • I'm not also i acknowledge what exactly claims you will be making, and you contain a fair position with regards to TestDriven.NET

  • Hey there! I'm at work surfing around your blog from my new iphone 3gs! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the excellent work!

  • I am not also sure i acknowledge what assertions you will
    be making, nevertheless, you have got a reasonable point relating to TestDriven.

    NET

  • That's not me too i recognize just what promises you earn, however, you have a relatively honest factor regarding TestDriven.NET

Comments have been disabled for this content.