Caves Travel Diving Graphics Mizar Texts Cuisine Lemkov Contact Map RSS Polski
Trybiks' Dive Texts Testing Output in MSTest Tests (VS 2010) YAC Software
  Back

List

Charsets

Charts

DBExpress

Delphi

HTML

Intraweb

PHP

Programming

Rhino Mocks

Software

Testing

VB.NET

VCL

WPF

Output in MSTest Tests (VS 2010)
We moved recently, with our software development at GfK Kynetec, to Visual Studio 2010. The first thing I did was to run all unit tests for our main project. For reasons not relevant to this text, some of the tests failed. Because the cause of failure wasn't that obvious, I added some Debug.WriteLine statements. But then, couldn't find the actual output... :-)

Previously, IIRC, it would've been displayed in the standard Output window. But now it wasn't there.

Fortunately, the Internet comes to the rescue - see the discussion on StackOverflow. Just right click on the test in the Test Results window, select View Test Results Details and voila.

Let's try a simple test to see where the different outputs will go (Console, Debug, Trace):
  <TestMethod()>
  Public Sub TestShowHideDockWindow()
    Trace.WriteLine("Trace output...")
    Debug.WriteLine("Debug output...")
    Console.WriteLine("Console output...")
  End Sub
This produces the following output in the Results tab:



And now everything should be clear. :-)

HTH

Top

Comments
Alas!
No comments yet...

Top

Add a comment (fields with an asterisk are required)
Name / nick *
Mail (will remain hidden) *
Your website
Comment (no tags) *
Enter the text displayed below *
 

Top

Tags

Testing


Related pages

Accessing private and protected members - PrivateObject and PrivateType

Get the TreeViewItem for an Item in a WPF TreeView

Double Clicks in WPF TreeView Controls

Checking Property Change Notifications

Checking "Dangling" Event Handlers in Delphi Forms

Rhino Mocks's AssertWasCalled in VB.NET

First steps with Rhino Mocks (in VB.NET)

VS Pending Tests

Automated GUI Testing

Automated GUI Testing in VMs

Automated Testing of Window Forms

Detecting Memory Leaks with DUnit