Candy Chiu
Candy Chiu

Reputation: 6679

Unable to output log messages in MbUnit + TestDriven

I am unable to to output log messages to console via the Common.Logging framework in MbUnit tests run by TestDriven. I am not sure if it has to do with the way Gallio is registered with TestDriven. I followed the steps on this post ( Register a Gallio zip installation with TestDriven.Net ) to register Gallio with TestDriven manually because I don't have admin rights to the machine.

The same logging mechanism worked in NUnit + TestDriven.

Upvotes: 5

Views: 969

Answers (2)

Scott Lerch
Scott Lerch

Reputation: 2638

If you really want to write messages to the Output pane in Visual Studio when running TestDriven.NET you can use Gallio.Framework.DiagnosticLog:

DiagnosticLog.WriteLine("Test message");

However, the log messages won't be associated to the tests and will show up as a separate section of the Gallio report. So in most cases you're better off using the Gallio.Framework.TestLog or System.Console and clicking on the Test Report link to see the results as Graham mentioned.

Upvotes: 6

grahamrhay
grahamrhay

Reputation: 2166

Console output goes into the test report (the blue link at the end of the TD.NET run), rather than being displayed in the console. Is there anything in there?

Upvotes: 0

Related Questions