Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/guiunit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2015-06-10 15:09:33 +0300
committerLluis Sanchez <lluis@xamarin.com>2015-06-10 15:09:33 +0300
commit8496907c2afd3a4977bb3640d8490547445b300e (patch)
treec3c83bc82615455da993f542873fe544632691c0
parentaa5878ba70b95b47cd6246dbebedc7d0ec316da9 (diff)
[GuiUnit] Send the test output to the listener
-rw-r--r--src/framework/GuiUnit/XmlTestListener.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/framework/GuiUnit/XmlTestListener.cs b/src/framework/GuiUnit/XmlTestListener.cs
index a1954e7..29881bd 100644
--- a/src/framework/GuiUnit/XmlTestListener.cs
+++ b/src/framework/GuiUnit/XmlTestListener.cs
@@ -2,11 +2,14 @@ using System;
using NUnit.Framework.Api;
using System.Xml.Linq;
using System.IO;
+using System.Text;
namespace GuiUnit
{
public class XmlTestListener : ITestListener
{
+ StringBuilder output = new StringBuilder ();
+
TextWriter Writer {
get; set;
}
@@ -18,6 +21,7 @@ namespace GuiUnit
public void TestStarted (ITest test)
{
+ output.Clear ();
if (test.HasChildren)
Write (new XElement ("suite-started", new XAttribute ("name", test.FullName)));
else
@@ -38,12 +42,14 @@ namespace GuiUnit
element.Add (new XAttribute ("message", result.Message));
if (!string.IsNullOrEmpty (result.StackTrace))
element.Add (new XAttribute ("stack-trace", result.StackTrace));
+ if (output.Length > 0)
+ element.Add (new XAttribute ("output", output.ToString ()));
Write (element);
}
public void TestOutput (TestOutput testOutput)
{
- // Ignore
+ output.Append (testOutput);
}
object ToXmlString (ResultState resultState)