Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 387
Candy Chiu Avatar asked Feb 23 '12 13:02

Candy Chiu


1 Answers

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.

like image 51
Scott Lerch Avatar answered Dec 26 '22 00:12

Scott Lerch