+2004-11-26 Martin Baulig <martin@ximian.com>
+
+ * ConsoleUI.cs (ConsoleUI.Execute): Print a short summary (number
+ of tests run, ignored, failed) to the console, honor the /output
+ argument for the detailed summary.
+
2004-11-23 Raja R Harinath <rharinath@novell.com>
* Makefile (NO_INSTALL): Don't install nunit-console.exe.
Directory.SetCurrentDirectory(new FileInfo((string)options.Parameters[0]).DirectoryName);
- EventListener collector = new EventCollector( options, outStream );
+ EventCollector collector = new EventCollector( options, outStream );
string savedDirectory = Environment.CurrentDirectory;
Directory.SetCurrentDirectory( savedDirectory );
+ Console.WriteLine();
+ Console.WriteLine();
+ collector.PrintSummary( result );
Console.WriteLine();
string xmlOutput = CreateXmlOutput( result );
if (options.xmlConsole)
Console.WriteLine(xmlOutput);
else
- CreateSummaryDocument(xmlOutput, transformReader);
+ CreateSummaryDocument(xmlOutput, transformReader, outStream);
// Write xml output here
string xmlResultFile = options.IsXml ? options.xml : "TestResult.xml";
return builder.ToString();
}
- private void CreateSummaryDocument(string xmlOutput, XmlTextReader transformReader)
+ private void CreateSummaryDocument(string xmlOutput, XmlTextReader transformReader,
+ ConsoleWriter outStream)
{
XPathDocument originalXPathDocument = new XPathDocument(new StringReader(xmlOutput));
XslTransform summaryXslTransform = new XslTransform();
summaryXslTransform.Load(transformReader);
// Using obsolete form for now, remove warning suppression from project after changing
- summaryXslTransform.Transform(originalXPathDocument,null,Console.Out);
+ summaryXslTransform.Transform(originalXPathDocument,null,outStream);
}
#region Nested Class to Handle Events
}
}
+ public void PrintSummary (TestResult suiteResult)
+ {
+ Console.WriteLine("Tests run: {0}, Failures: {1}, Not run: {2}, Time: {3} seconds",
+ testRunCount, failureCount, testIgnoreCount, suiteResult.Time);
+ }
+
public void UnhandledException( Exception exception )
{
string msg = string.Format( "##### Unhandled Exception while running {0}", currentTestName );