/// <summary>
        /// Runs the test suite using the given filter expression.
        /// </summary>
        /// <param name="filterExpr"></param>
        public void RunByFilter(string filterExpr)
        {
            Exception exception = null;

            try
            {
                htmlResultChecker            = HtmlResultChecker.GetHtmlResultChecker();
                htmlResultChecker.UpdateCase = logger.UpdateCaseFromHtmlLog;
                htmlResultChecker.Start(this.WorkingDirectory);

                StringBuilder args = ConstructVstestArgs();
                args.AppendFormat("/TestCaseFilter:\"{0}\" ", filterExpr);
                runArgs       = args.ToString();
                vstestProcess = new Process()
                {
                    StartInfo = new ProcessStartInfo()
                    {
                        WorkingDirectory = WorkingDirectory,
                        FileName         = EnginePath,
                        UseShellExecute  = false,
                        CreateNoWindow   = false,
                        Arguments        = runArgs
                    }
                };
                vstestProcess.Start();
                vstestProcess.WaitForExit();
            }
            catch (Exception e)
            {
                exception = e;
            }
            ExecutionFinished(exception);
        }
        /// <summary>
        /// Runs the specified test cases in the test suite.
        /// </summary>
        /// <param name="caseStack">Test Cases</param>
        public void RunByCase(Stack <TestCase> caseStack)
        {
            runningCaseStack = caseStack;

            htmlResultChecker            = HtmlResultChecker.GetHtmlResultChecker();
            htmlResultChecker.UpdateCase = logger.UpdateCaseFromHtmlLog;
            htmlResultChecker.Start(this.WorkingDirectory);

            var exception = new List <Exception>();

            try
            {
                while (caseStack != null && caseStack.Count > 0)
                {
                    StringBuilder args           = ConstructVstestArgs(caseStack);
                    var           innerException = Run(args.ToString());
                    if (innerException != null)
                    {
                        exception.Add(innerException);
                    }
                }
            }
            catch (Exception e)
            {
                exception.Add(e);
            }
            ExecutionFinished(exception);
        }
        /// <summary>
        /// Runs the test suite using the given filter expression.
        /// </summary>
        /// <param name="filterExpr"></param>
        public void RunByFilter(string filterExpr)
        {
            Exception exception = null;

            try
            {
                htmlResultChecker            = HtmlResultChecker.GetHtmlResultChecker();
                htmlResultChecker.UpdateCase = logger.UpdateCaseFromHtmlLog;
                htmlResultChecker.Start(this.WorkingDirectory);

                StringBuilder args = ConstructVstestArgs();
                args.AppendFormat("/TestCaseFilter:\"{0}\" ", filterExpr);
                Run(args.ToString());
            }
            catch (Exception e)
            {
                exception = e;
            }
            ExecutionFinished(exception);
        }
        /// <summary>
        /// Runs the specified test cases in the test suite.
        /// </summary>
        /// <param name="caseStack">Test Cases</param>
        public void RunByCase(Stack <TestCase> caseStack)
        {
            runningCaseStack             = caseStack;
            htmlResultChecker            = HtmlResultChecker.GetHtmlResultChecker();
            htmlResultChecker.UpdateCase = logger.UpdateCaseFromHtmlLog;
            htmlResultChecker.Start(this.WorkingDirectory);
            Exception exception = null;

            try
            {
                while (caseStack != null && caseStack.Count > 0)
                {
                    StringBuilder args = ConstructVstestArgs(caseStack);
                    runArgs = args.ToString();

                    vstestProcess = new Process()
                    {
                        StartInfo = new ProcessStartInfo()
                        {
                            WorkingDirectory = WorkingDirectory,
                            FileName         = EnginePath,
                            UseShellExecute  = false,
                            CreateNoWindow   = false,
                            Arguments        = runArgs
                        }
                    };
                    vstestProcess.Start();
                    vstestProcess.WaitForExit();
                }
            }
            catch (Exception e)
            {
                exception = e;
            }
            ExecutionFinished(exception);
        }