I am writing a test runner with an UI for our testing framework using C#, Gallio and MbUnit and it appears that I am stuck. I managed to run tests programmatically by selecting from a list view and also managed to get the result from the test in a text box which is all good! However, I need a way to reach into the TestLog.WriteLine (Gallio) method and display the log from the test into the text box as well. Here is the code for running the tests and also unsuccessful try for getting the Write Lines from the TestLog:
MarkupStreamWriter streamWriter = TestLog.ConsoleOutput;
launcher.Logger = new MarkupStreamLogger(streamWriter);
launcher.TestProject.TestRunnerFactoryName = StandardTestRunnerFactoryNames.Local;
launcher.AddFilePattern(assembly.Location);
launcher.EchoResults = true;
var result = launcher.Run();
Any input on this will be much appreciated! This is my first post so apologies if it doesn't meet the standards :)
Many thanks!