From 30bc48aa7214e3d8a2a30ec542eea732f5ebb5d6 Mon Sep 17 00:00:00 2001 From: "Geramy L. Loveless" Date: Thu, 23 Jul 2015 07:25:10 -0700 Subject: [PATCH 1/6] added the test runner ui basic stuff on to the next big thing creating the ui and overriding OutputHandlerBase --- Tests/Cosmos.TestRunner.UI/App.config | 6 + Tests/Cosmos.TestRunner.UI/App.xaml | 8 ++ Tests/Cosmos.TestRunner.UI/App.xaml.cs | 17 +++ .../Cosmos.TestRunner.UI.csproj | 103 +++++++++++++++ Tests/Cosmos.TestRunner.UI/MainWindow.xaml | 8 ++ Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs | 28 +++++ .../Properties/AssemblyInfo.cs | 55 ++++++++ .../Properties/Resources.Designer.cs | 71 +++++++++++ .../Properties/Resources.resx | 117 ++++++++++++++++++ .../Properties/Settings.Designer.cs | 30 +++++ .../Properties/Settings.settings | 7 ++ 11 files changed, 450 insertions(+) create mode 100644 Tests/Cosmos.TestRunner.UI/App.config create mode 100644 Tests/Cosmos.TestRunner.UI/App.xaml create mode 100644 Tests/Cosmos.TestRunner.UI/App.xaml.cs create mode 100644 Tests/Cosmos.TestRunner.UI/Cosmos.TestRunner.UI.csproj create mode 100644 Tests/Cosmos.TestRunner.UI/MainWindow.xaml create mode 100644 Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs create mode 100644 Tests/Cosmos.TestRunner.UI/Properties/AssemblyInfo.cs create mode 100644 Tests/Cosmos.TestRunner.UI/Properties/Resources.Designer.cs create mode 100644 Tests/Cosmos.TestRunner.UI/Properties/Resources.resx create mode 100644 Tests/Cosmos.TestRunner.UI/Properties/Settings.Designer.cs create mode 100644 Tests/Cosmos.TestRunner.UI/Properties/Settings.settings diff --git a/Tests/Cosmos.TestRunner.UI/App.config b/Tests/Cosmos.TestRunner.UI/App.config new file mode 100644 index 000000000..8e1564635 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Tests/Cosmos.TestRunner.UI/App.xaml b/Tests/Cosmos.TestRunner.UI/App.xaml new file mode 100644 index 000000000..7bb1dceeb --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Tests/Cosmos.TestRunner.UI/App.xaml.cs b/Tests/Cosmos.TestRunner.UI/App.xaml.cs new file mode 100644 index 000000000..1dbb79337 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Cosmos.TestRunner.UI +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Tests/Cosmos.TestRunner.UI/Cosmos.TestRunner.UI.csproj b/Tests/Cosmos.TestRunner.UI/Cosmos.TestRunner.UI.csproj new file mode 100644 index 000000000..e9f98abab --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/Cosmos.TestRunner.UI.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {0B20C26F-CA92-4D88-8211-EC7B0A261337} + WinExe + Properties + Cosmos.TestRunner.UI + Cosmos.TestRunner.UI + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + \ No newline at end of file diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml new file mode 100644 index 000000000..261b83896 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs new file mode 100644 index 000000000..f64171805 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Cosmos.TestRunner.UI +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/Tests/Cosmos.TestRunner.UI/Properties/AssemblyInfo.cs b/Tests/Cosmos.TestRunner.UI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..ba81673d0 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Cosmos.TestRunner.UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Cosmos.TestRunner.UI")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tests/Cosmos.TestRunner.UI/Properties/Resources.Designer.cs b/Tests/Cosmos.TestRunner.UI/Properties/Resources.Designer.cs new file mode 100644 index 000000000..e39e98757 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Cosmos.TestRunner.UI.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Cosmos.TestRunner.UI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Tests/Cosmos.TestRunner.UI/Properties/Resources.resx b/Tests/Cosmos.TestRunner.UI/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Tests/Cosmos.TestRunner.UI/Properties/Settings.Designer.cs b/Tests/Cosmos.TestRunner.UI/Properties/Settings.Designer.cs new file mode 100644 index 000000000..95350dbbe --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Cosmos.TestRunner.UI.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Tests/Cosmos.TestRunner.UI/Properties/Settings.settings b/Tests/Cosmos.TestRunner.UI/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 6202c49d7af0ef7b9d18ed96216dff79dd8bca4e Mon Sep 17 00:00:00 2001 From: "Geramy L. Loveless" Date: Thu, 23 Jul 2015 07:38:42 -0700 Subject: [PATCH 2/6] Basic Stubbing Finished. Did some basic stubbing of the methods and now going to start implementing the meat. --- Tests/Cosmos.TestRunner.UI/MainWindow.xaml | 4 +- .../OutputHandlerBase.UI.cs | 71 +++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 Tests/Cosmos.TestRunner.UI/OutputHandlerBase.UI.cs diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml index 261b83896..28198a8fd 100644 --- a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml @@ -1,8 +1,8 @@  + Title="Test Runner" Height="350" Width="525"> - + diff --git a/Tests/Cosmos.TestRunner.UI/OutputHandlerBase.UI.cs b/Tests/Cosmos.TestRunner.UI/OutputHandlerBase.UI.cs new file mode 100644 index 000000000..9480f2831 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/OutputHandlerBase.UI.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Cosmos.TestRunner.Core; + +namespace Cosmos.TestRunner.UI +{ + public partial class MainWindow : OutputHandlerBase + { + public override void OnExecuteKernelStart(string assemblyName) + { + + } + public override void OnExecuteKernelEnd(string assemblyName) + { + + } + public override void OnLogDebugMessage(string message) + { + + } + public override void OnLogMessage(string message) + { + + } + public override void OnLogError(string message) + { + + } + public override void OnExecutionStart() + { + + } + public override void OnExecutionEnd() + { + + } + public override void OnUnhandledException(Exception exception) + { + + } + public override void OnTaskStart(string taskName) + { + + } + public override void OnTaskEnd(string taskName) + { + + } + public override void OnSetKernelTestResult(bool succeeded, string message) + { + + } + + public override void OnRunConfigurationStart(RunConfiguration configuration) + { + + } + public override void OnRunConfigurationEnd(RunConfiguration configuration) + { + + } + + public override void OnSetKernelSucceededAssertionsCount(int succeededAssertions) + { + + } + } +} From 7e210e7edb357381b3566e912e9938f5c9f0071b Mon Sep 17 00:00:00 2001 From: "Geramy L. Loveless" Date: Thu, 23 Jul 2015 07:42:46 -0700 Subject: [PATCH 3/6] Finished providing engine stub I gave the engine (OutputHandlerBase)this which is actually MainWindow but a partial class file implementing the basic outs. --- ...Base.UI.cs => MainWindow.OutputHandler.cs} | 0 .../MainWindow.TestEngine.cs | 26 +++++++++++++++++++ Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs | 1 + 3 files changed, 27 insertions(+) rename Tests/Cosmos.TestRunner.UI/{OutputHandlerBase.UI.cs => MainWindow.OutputHandler.cs} (100%) create mode 100644 Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs diff --git a/Tests/Cosmos.TestRunner.UI/OutputHandlerBase.UI.cs b/Tests/Cosmos.TestRunner.UI/MainWindow.OutputHandler.cs similarity index 100% rename from Tests/Cosmos.TestRunner.UI/OutputHandlerBase.UI.cs rename to Tests/Cosmos.TestRunner.UI/MainWindow.OutputHandler.cs diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs b/Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs new file mode 100644 index 000000000..4b2841b35 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Cosmos.TestRunner.Core; + +namespace Cosmos.TestRunner.UI +{ + public partial class MainWindow + { + private void RunTestEngine() + { + var xEngine = new Engine(); + + DefaultEngineConfiguration.Apply(xEngine); + + var xOutputXml = new OutputHandlerXml(); + xEngine.OutputHandler = new MultiplexingOutputHandler( + xOutputXml, + (OutputHandlerBase)this); + + xEngine.Execute(); + } + } +} diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs index f64171805..a5631e7e7 100644 --- a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs @@ -23,6 +23,7 @@ namespace Cosmos.TestRunner.UI public MainWindow() { InitializeComponent(); + RunTestEngine(); } } } From 15b26dbdcf3f8b121a75b1fe1a4544daad7f44ae Mon Sep 17 00:00:00 2001 From: "Geramy L. Loveless" Date: Thu, 23 Jul 2015 10:24:36 -0700 Subject: [PATCH 4/6] Finished the ui. finished the ui tester. --- .../ListViewLogMessage.cs | 36 +++++ .../MainWindow.OutputHandler.cs | 132 +++++++++++++----- .../MainWindow.TestEngine.cs | 15 +- Tests/Cosmos.TestRunner.UI/MainWindow.xaml | 25 +++- Tests/Cosmos.TestRunner.UI/MainWindow.xaml.cs | 10 ++ 5 files changed, 175 insertions(+), 43 deletions(-) create mode 100644 Tests/Cosmos.TestRunner.UI/ListViewLogMessage.cs diff --git a/Tests/Cosmos.TestRunner.UI/ListViewLogMessage.cs b/Tests/Cosmos.TestRunner.UI/ListViewLogMessage.cs new file mode 100644 index 000000000..fa44e10a4 --- /dev/null +++ b/Tests/Cosmos.TestRunner.UI/ListViewLogMessage.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Cosmos.TestRunner.UI +{ + public class ListViewLogMessage + { + public ListViewLogMessage(string _date, string _level, string _message) + { + Date = _date; + Level = _level; + Message = _message; + } + + public string Date + { + get; + set; + } + + public string Level + { + get; + set; + } + + public string Message + { + get; + set; + } + } +} diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.OutputHandler.cs b/Tests/Cosmos.TestRunner.UI/MainWindow.OutputHandler.cs index 9480f2831..90850b199 100644 --- a/Tests/Cosmos.TestRunner.UI/MainWindow.OutputHandler.cs +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.OutputHandler.cs @@ -1,71 +1,127 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Diagnostics; using Cosmos.TestRunner.Core; namespace Cosmos.TestRunner.UI { public partial class MainWindow : OutputHandlerBase { - public override void OnExecuteKernelStart(string assemblyName) - { + private readonly Stopwatch mCurrentTaskStopwatch = new Stopwatch(); + private readonly Stopwatch mCurrentKernelStopwatch = new Stopwatch(); + private readonly Stopwatch mExecutionStopwatch = new Stopwatch(); - } - public override void OnExecuteKernelEnd(string assemblyName) + protected override void OnTaskStart(string taskName) { - + Log("Running task '" + taskName + "'"); + mCurrentTaskStopwatch.Reset(); + mCurrentTaskStopwatch.Start(); + mLogLevel++; } - public override void OnLogDebugMessage(string message) + + protected override void OnTaskEnd(string taskName) { - + mCurrentTaskStopwatch.Stop(); + mLogLevel--; + Log("Done running task '" + taskName + "'. Took " + mCurrentTaskStopwatch.Elapsed); } - public override void OnLogMessage(string message) + + protected override void OnUnhandledException(Exception exception) { - + Log("Unhandled exception: " + exception.ToString()); } - public override void OnLogError(string message) + + protected override void OnExecutionEnd() { + mLogLevel = 0; + Log("Done executing"); + Log("Took " + mExecutionStopwatch.Elapsed); + Log(String.Format("{0} kernels succeeded their tests", mNumberOfSuccesses)); + Log(String.Format("{0} kernels failed their tests", mNumberOfFailures)); } - public override void OnExecutionStart() + + protected override void OnExecutionStart() { - + mLogLevel = 0; + Log("Start executing"); + mExecutionStopwatch.Reset(); + mExecutionStopwatch.Start(); + mLogLevel = 1; } - public override void OnExecutionEnd() - { - } - public override void OnUnhandledException(Exception exception) - { - - } - public override void OnTaskStart(string taskName) - { - - } - public override void OnTaskEnd(string taskName) - { - - } - public override void OnSetKernelTestResult(bool succeeded, string message) + protected override void OnLogDebugMessage(string message) { } - public override void OnRunConfigurationStart(RunConfiguration configuration) + protected override void OnRunConfigurationStart(RunConfiguration configuration) { - - } - public override void OnRunConfigurationEnd(RunConfiguration configuration) - { - + Log(string.Format("Start configuration. IsELF = {0}, Target = {1}", configuration.IsELF, configuration.RunTarget)); + mLogLevel++; } - public override void OnSetKernelSucceededAssertionsCount(int succeededAssertions) + protected override void OnRunConfigurationEnd(RunConfiguration configuration) { + mLogLevel--; + } + protected override void OnLogError(string message) + { + Log("Error: " + message); + } + + protected override void OnLogMessage(string message) + { + Log("Msg: " + message); + } + + protected override void OnExecuteKernelEnd(string assemblyName) + { + mCurrentKernelStopwatch.Stop(); + Log("Done running kernel. Took " + mCurrentKernelStopwatch.Elapsed); + mLogLevel--; + } + + protected override void OnExecuteKernelStart(string assemblyName) + { + Log("Starting kernel '" + assemblyName + "'"); + mCurrentKernelStopwatch.Reset(); + mCurrentKernelStopwatch.Start(); + mLogLevel++; + } + + private int mLogLevel; + private void Log(string message) + { + string Date = DateTime.Now.ToString("hh:mm:ss.ffffff "); + string level = new String(' ', mLogLevel * 2); + message_display_list.Dispatcher.Invoke(new Action((d, l, m) => DisplayOnWindow(Date, level, message))); + } + + protected override void OnSetKernelTestResult(bool succeeded, string message) + { + Log(string.Format("Success = {0}, Message = '{1}'", succeeded, message)); + if (succeeded) + { + mNumberOfSuccesses++; + } + else + { + mNumberOfFailures++; + } + } + + private int mNumberOfSuccesses = 0; + private int mNumberOfFailures = 0; + + protected override void OnSetKernelSucceededAssertionsCount(int succeededAssertions) + { + } + + private void DisplayOnWindow(string _date, string _level, string _msg) + { + message_display_list.Items.Add(new ListViewLogMessage(_date, _level, _msg)); } } } diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs b/Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs index 4b2841b35..95d0c70e3 100644 --- a/Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.TestEngine.cs @@ -1,15 +1,22 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Threading; using Cosmos.TestRunner.Core; namespace Cosmos.TestRunner.UI { public partial class MainWindow { + private ParameterizedThreadStart tEngineThreadStart = null; + private Thread TestEngineThread = null; private void RunTestEngine() + { + tEngineThreadStart = new ParameterizedThreadStart(TestEngineThreadMain); + TestEngineThread = new Thread(tEngineThreadStart); + TestEngineThread.Start((OutputHandlerBase)this); + } + + private void TestEngineThreadMain(object refrence) { var xEngine = new Engine(); @@ -18,7 +25,7 @@ namespace Cosmos.TestRunner.UI var xOutputXml = new OutputHandlerXml(); xEngine.OutputHandler = new MultiplexingOutputHandler( xOutputXml, - (OutputHandlerBase)this); + (OutputHandlerBase)refrence); xEngine.Execute(); } diff --git a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml index 28198a8fd..dd49167d1 100644 --- a/Tests/Cosmos.TestRunner.UI/MainWindow.xaml +++ b/Tests/Cosmos.TestRunner.UI/MainWindow.xaml @@ -1,8 +1,31 @@  + Title="Test Runner" Height="393" Width="634"> + + + + + + + + + +