diff --git a/NUnitLite/TouchRunner/TouchRunner.cs b/NUnitLite/TouchRunner/TouchRunner.cs index 8ca15a2..e20e3a7 100644 --- a/NUnitLite/TouchRunner/TouchRunner.cs +++ b/NUnitLite/TouchRunner/TouchRunner.cs @@ -653,17 +653,19 @@ public override void TestFinished (ITestResult r) { base.TestFinished (r); - TestResult result = r as TestResult; - TestSuite ts = result.Test as TestSuite; - if (ts != null) { - TestSuiteElement tse; - if (suite_elements.TryGetValue (ts, out tse)) - tse.Update (result); - } else { - TestMethod tc = result.Test as TestMethod; - if (tc != null) - case_elements [tc].Update (result); - } + ExecuteOnMainThread (() => { + TestResult result = r as TestResult; + TestSuite ts = result.Test as TestSuite; + if (ts != null) { + TestSuiteElement tse; + if (suite_elements.TryGetValue (ts, out tse)) + tse.Update (result); + } else { + TestMethod tc = result.Test as TestMethod; + if (tc != null) + case_elements [tc].Update (result); + } + }); } protected override void WriteDeviceInformation (TextWriter writer)