void OnMessageReceived (Message m)
		{
			try {
				if (m.MessageType == TestMessageTypes.TestSessionConnected) {
					testServer.GetTestRunnerStartInfo (rootTest.GetTests ());
				} else if (m.MessageType == TestMessageTypes.TestExecutionTestRunnerProcessStartInfo) {
					var val = m.Payload.ToObject<TestStartInfoMessage> ();
					RunTestsWithDotNetCoreTest (val);
				} else if (m.MessageType == TestMessageTypes.TestRunnerTestResult) {
					var val = m.Payload.ToObject<TestResultMessage> ();
					OnTestResult (val);
				} else if (m.MessageType == TestMessageTypes.TestRunnerTestStarted) {
					if (!runningSingleTest) {
						var val = m.Payload.ToObject<TestStartedMessage> ();
						OnTestStarted (val);
					}
				} else if (m.MessageType == TestMessageTypes.TestExecutionCompleted) {
					testServer.TerminateTestSession ();
					IsCompleted = true;
				} else if (m.MessageType == "Error") {
					var val = m.Payload.ToObject<Microsoft.DotNet.Tools.Test.ErrorMessage> ();
					LoggingService.LogError ("Test runner error", val.Message);
				}
			} catch (Exception ex) {
				LoggingService.LogError ("Test runner error", ex);
			}
		}
 void OnMessageReceived(Message m)
 {
     try {
         if (m.MessageType == TestMessageTypes.TestSessionConnected)
         {
             testServer.StartTestDiscovery();
         }
         else if (m.MessageType == TestMessageTypes.TestDiscoveryTestFound)
         {
             var val = m.Payload.ToObject <TestDiscovered> ();
             tests.Add(val);
             testFound = true;
             shutdownTimer.Stop();
         }
         else if (m.MessageType == TestMessageTypes.TestDiscoveryCompleted)
         {
             discoveryCompleted = true;
             testServer.TerminateTestSession();
             DnxOutputPad.WriteText(GettextCatalog.GetString("Test discovery completed."));
             OnDiscoveryCompleted();
             Stop();
         }
         else if (m.MessageType == "Error")
         {
             var val = m.Payload.ToObject <Microsoft.DotNet.Tools.Test.ErrorMessage> ();
             DnxOutputPad.WriteError(val.Message);
             OnDiscoveryFailed();
         }
     } catch (Exception ex) {
         LoggingService.LogError("Test loader error", ex);
         DnxOutputPad.WriteError(ex.Message);
         OnDiscoveryFailed();
     }
 }