I am trying to show some information from a [TestMethod] method.
Usually we use NUnit and a line with Console.WriteLine runs fine and we can see it in 'output' window, but on this project we must to use Testing tools embebed with VS2010 and Console.WriteLine doesn't run because we cannot see anything.
Best Answer
OK, you have to use
Assert
and all that, but the other answers don't answer the actual question. Maybe you have your reasons (as I have mine, which is how I found this question).This might help you a little:
If you're using ReSharper, select your test method in the Unit Test Sessions pane, and the output will be in the Output tab:
In my case, I just needed to quickly test some performance. As I already have a unit test project, it was quicker to do it this way than having to create a new Console Application. So instead of just telling people why their question is wrong, I believe we should tell them why their question is wrong, but still try to answer the question.
Sorry for the rant.