private void SetTestResultStatistics(IDictionary <string, string> watchData)
 {
     _testResults.WatchData.Clear();
     _testResults.SetUpSuccess    = _testResults[CommonConst.SetupIndex].ResultState == RuntimeState.Success;
     _testResults.SuccessCount    = (from result in _testResults.Values where (result.SequenceIndex >= 0 && result.ResultState == RuntimeState.Success) select result).Count();
     _testResults.FailedCount     = (from result in _testResults.Values where (result.SequenceIndex >= 0 && result.ResultState == RuntimeState.Failed || result.ResultState == RuntimeState.Error) select result).Count();
     _testResults.TimeOutCount    = (from result in _testResults.Values where (result.SequenceIndex >= 0 && result.ResultState == RuntimeState.Timeout) select result).Count();
     _testResults.TearDownSuccess = _testResults[CommonConst.TeardownIndex].ResultState == RuntimeState.Success;
     _testResults.AbortCount      = (from result in _testResults.Values where (result.SequenceIndex >= 0 && result.ResultState == RuntimeState.Abort) select result).Count();
     _testResults.TestOver        = _testResults.Values.All(item => item.ResultState > RuntimeState.AbortRequested);
     if (null != watchData)
     {
         Regex varNameRegex = new Regex(CoreUtils.GetVariableNameRegex(_sequenceData, Session));
         foreach (KeyValuePair <string, string> varToValue in watchData)
         {
             if (varNameRegex.IsMatch(varToValue.Key))
             {
                 IVariable variable = CoreUtils.GetVariable(_sequenceData, varToValue.Key);
                 _testResults.WatchData.Add(variable, varToValue.Value);
             }
         }
     }
 }