Question

As far as I can tell, TestDriven.net is focused on giving direct access to running tests from within Visual Studio. Yet, Resharper, while being a more general tool, provides this functionality as well. If one uses Resharper, is there any point in using TestDriven.net?

Was it helpful?

Solution

If you have resharper, then no, you probably don't need it. If you don't, its a great, free tool.

OTHER TIPS

With TestDriven.NET you can execute "any" method with "Run Test(s)". I use that execute some static methods to just test some things I'm unsure of (like DateTime formats, etc.) and that, once settled, don't need to be a unit test.

If ReSharper has that too, I haven't found it yet or was too blinded by TestDriven.NET ;-) As far as I can tell, it can only execute [Test], etc. annotated functions.

For me, the advantages of TestDriven.NET come down to three main points:

  1. No graphical test runner. I really don't like windows popping up all over the place with red and green lamps. TestDriven.NET simply reports "n passed, m failed, x skipped" in the output console. That's all you need to see.
  2. Any Console.Write() calls appear on the output console. This is wonderful for quick spikes and a great way of evolving unit tests. I often start out by just writing to the console, then copying and pasting the output back into the test and doing an assert of the output against the copied previous output. If the output changes, the test fails.
  3. As Christian says, being able to run any method, not just test methods, is a fantastic productivity tool. It's the next best thing to having a REPL in C# (yes yes yes tell me all about the Mono C# REPL if you want :).

TestDriven.net has one feature Resharper does not: the code coverage report, which is extremely useful.

I don't like Resharper for couple of reasons, but I want to run and debug tests from VS, and that's why I like TestDriven.net. Plus it is free.

I found TestDriven.net better then ReSharper for running unit tests. I think this may just be because I have used TestDriven.net a lot and was only using ReSharper for a few weeks.

ReSharper just seems to be a lot more step to run a test and see its results, from what I recalled ReSharper displayed a complex UI rather than just giving simple text output from a single test.

After using ReSharper a lot more, I would say it is good at running lots of unit tests and showing the combined result when more then 1 test fails. I still think TestDriven.net is great for running a single unit test, or when you run test so often that only 1 or 2 tests fail.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top