protected override void BeginProcessing()
        {
            if (null != TestData.TestSuites && 0 < TestData.TestSuites.Count)
            {
                // 20141107
                var testStatistics = new TestStatistics();

                foreach (var testSuite in TestData.TestSuites)
                {
                    // 20141107
                    // TestData.RefreshSuiteStatistics(testSuite, false);
                    testStatistics.RefreshSuiteStatistics(testSuite, false);
                }
            }
        }
 protected override void BeginProcessing()
 {
     
     if (null != TestData.TestSuites && 0 < TestData.TestSuites.Count) {
         
         // 20141107
         var testStatistics = new TestStatistics();
         
         foreach (var testSuite in TestData.TestSuites) {
             
             // 20141107
             // TestData.RefreshSuiteStatistics(testSuite, false);
             testStatistics.RefreshSuiteStatistics(testSuite, false);
         }
         
     }
     
 }
 // 20140720
 // string getStatisticsStringSuite(TestSuite suite, bool skipAutomatic)
 string getStatisticsStringSuite(ITestSuite suite, bool skipAutomatic)
 {
     string result = string.Empty;
     // 20141107
     // TestData.RefreshSuiteStatistics(suite, skipAutomatic);
     var testStatistics = new TestStatistics();
     testStatistics.RefreshSuiteStatistics(suite, skipAutomatic);
     result += @"<div id=""suitestat"">";
     
     int scPassed = 0;
     int scFailed = 0;
     int scNotTested = 0;
     foreach (var tsc in suite.TestScenarios) {
         switch (tsc.enStatus) {
             case TestStatuses.Passed:
                 scPassed++;
                 break;
             case TestStatuses.Failed:
                 scFailed++;
                 break;
             case TestStatuses.NotRun:
                 scNotTested++;
                 break;
             default:
                 // 20130428
                 //throw new Exception("Invalid value for TestScenarioStatuses");
                 scNotTested++;
                 break;
         }
     }
     
     // scenarios
     result += @"Scenarios:";
     result += suite.TestScenarios.Count.ToString();
     result += "  Passed:";
     result += scPassed.ToString();
     result += "  Failed:";
     result += scFailed.ToString();
     result += "  Not tested:";
     result += scNotTested.ToString();
     result += newLineHTML;
     
     // test results
     result += @"Test cases:";
     result += suite.Statistics.All.ToString();
     result += "  Passed:";
     result += suite.Statistics.Passed.ToString();
     result += "  Failed:";
     result += suite.Statistics.Failed.ToString();
     result += "  Not tested:";
     result += suite.Statistics.NotTested.ToString();
     result += "  Time spent:";
     result += Convert.ToInt32(suite.Statistics.TimeSpent).ToString();
     result += @" seconds</div>";
     return result;
 }
        // 20140720
        // string getStatisticsStringSuite(TestSuite suite, bool skipAutomatic)
        string getStatisticsStringSuite(ITestSuite suite, bool skipAutomatic)
        {
            string result = string.Empty;
            // 20141107
            // TestData.RefreshSuiteStatistics(suite, skipAutomatic);
            var testStatistics = new TestStatistics();

            testStatistics.RefreshSuiteStatistics(suite, skipAutomatic);
            result += @"<div id=""suitestat"">";

            int scPassed    = 0;
            int scFailed    = 0;
            int scNotTested = 0;

            foreach (var tsc in suite.TestScenarios)
            {
                switch (tsc.enStatus)
                {
                case TestStatuses.Passed:
                    scPassed++;
                    break;

                case TestStatuses.Failed:
                    scFailed++;
                    break;

                case TestStatuses.NotRun:
                    scNotTested++;
                    break;

                default:
                    // 20130428
                    //throw new Exception("Invalid value for TestScenarioStatuses");
                    scNotTested++;
                    break;
                }
            }

            // scenarios
            result += @"Scenarios:";
            result += suite.TestScenarios.Count.ToString();
            result += "  Passed:";
            result += scPassed.ToString();
            result += "  Failed:";
            result += scFailed.ToString();
            result += "  Not tested:";
            result += scNotTested.ToString();
            result += newLineHTML;

            // test results
            result += @"Test cases:";
            result += suite.Statistics.All.ToString();
            result += "  Passed:";
            result += suite.Statistics.Passed.ToString();
            result += "  Failed:";
            result += suite.Statistics.Failed.ToString();
            result += "  Not tested:";
            result += suite.Statistics.NotTested.ToString();
            result += "  Time spent:";
            result += Convert.ToInt32(suite.Statistics.TimeSpent).ToString();
            result += @" seconds</div>";
            return(result);
        }