示例#1
0
 public void Start()
 {
     try
     {
         _globalInfo.MessageTransceiver.Activate();
         _statusManager.Start();
         _syncManager.Start();
         _controller.StartTestGeneration();
         _controller.StartTestWork();
     }
     catch (TestflowException ex)
     {
         _globalInfo.LogService.Print(LogLevel.Error, CommonConst.PlatformLogSession, ex, "Start engine internal error.");
         _globalInfo.StateMachine.State = RuntimeState.Error;
         _globalInfo.ExceptionManager.Append(ex);
     }
     catch (ApplicationException ex)
     {
         _globalInfo.LogService.Print(LogLevel.Error, CommonConst.PlatformLogSession, ex, "Start engine runtime error.");
         _globalInfo.StateMachine.State = RuntimeState.Error;
         _globalInfo.ExceptionManager.Append(ex);
     }
     catch (Exception ex)
     {
         _globalInfo.LogService.Print(LogLevel.Fatal, CommonConst.PlatformLogSession, ex, "Start engine fatal error.");
         _globalInfo.StateMachine.State = RuntimeState.Collapsed;
         _globalInfo.ExceptionManager.Append(ex);
     }
 }
示例#2
0
 public void Start()
 {
     try
     {
         _globalInfo.MessageTransceiver.Activate();
         _statusManager.Start();
         _syncManager.Start();
         bool executionSuccess = _controller.StartTestGeneration();
         if (!executionSuccess)
         {
             return;
         }
         // 如果使用调试模式,则需要更新所有session的断点和watch信息
         if (EnableDebug)
         {
             foreach (int session in _controller.TestMaintainer.TestContainers.Keys)
             {
                 _debugManager.SendDebugWatchAndBreakPointMessage(session);
             }
         }
         _controller.StartTestWork();
         _controller.WaitForTaskOver();
     }
     catch (TestflowException ex)
     {
         _globalInfo.LogService.Print(LogLevel.Error, CommonConst.PlatformLogSession, ex,
                                      "Start engine internal error.");
         _globalInfo.StateMachine.State = RuntimeState.Error;
         _globalInfo.ExceptionManager.Append(ex);
         // for test
         throw;
     }
     catch (ApplicationException ex)
     {
         _globalInfo.LogService.Print(LogLevel.Error, CommonConst.PlatformLogSession, ex,
                                      "Start engine runtime error.");
         _globalInfo.StateMachine.State = RuntimeState.Error;
         _globalInfo.ExceptionManager.Append(ex);
         // for test
         throw;
     }
     catch (Exception ex)
     {
         _globalInfo.LogService.Print(LogLevel.Fatal, CommonConst.PlatformLogSession, ex,
                                      "Start engine fatal error.");
         _globalInfo.StateMachine.State = RuntimeState.Collapsed;
         _globalInfo.ExceptionManager.Append(ex);
         // for test
         throw;
     }
     finally
     {
         Dispose();
     }
 }