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

MSTest

PHP

Programming

R

Rhino Mocks

Software

Testing

UI Testing

VB.NET

VCL

WPF

Output in MSTest Tests (VS 2010)
We moved recently, with our software development at Kynetec (previously: GfK Animal and Crop Health / 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

MSTest


Related pages

AssertWasCalled and Methods Called Multiple Times

AssertWas[Not]Called and Object Properties

Rhino Mocks's AssertWasNotCalled

Visual Studio - moving coded UI tests to a new / different project results in null reference exceptions

PrivateObject and Out/ByRef parameters

PrivateObject, WithEvents, and generics

Accessing private members of base classes

PrivateObject and WithEvents

Accessing private and protected members - PrivateObject and PrivateType

VS - Test Run Error - "COM object that has been separated from its underlying RCW cannot be used"

Get the TreeViewItem for an Item in a WPF TreeView

Automated WPF tests and "Invalid URI: Invalid port specified."

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