private string GetImageForStatus(string prefix, TestResultStatus status)
        {
            string key;

            switch (status)
            {
            case TestResultStatus.OK:
                key = "OK";
                break;

            case TestResultStatus.Warning:
                key = "Warning";
                break;

            case TestResultStatus.Error:
                key = "Error";
                break;

            case TestResultStatus.Failed:
                key = "Failure";
                break;

            default:
                key = "";
                break;
            }

            return(prefix + key);
        }
Exemple #2
0
 public TestResult(Test test, TestResultStatus testResultStatus, double ellapsedSeconds, List <string> output)
 {
     Test            = test;
     Status          = testResultStatus;
     EllapsedSeconds = ellapsedSeconds;
     Output          = output;
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestMethodResult"/> class.
 /// </summary>
 /// <param name="methodName">The name of the test method.</param>
 /// <param name="status">The status of the test.</param>
 /// <param name="exception">The exception thrown (if any) during the test.</param>
 /// <param name="executionTime">The execution time of the test.</param>
 public TestMethodResult(string methodName, TestResultStatus status, Exception exception, TimeSpan executionTime)
 {
     MethodName = methodName;
     Status = status;
     Exception = exception;
     ExecutionTime = executionTime;
 }
Exemple #4
0
 public TestResult(Test test, TestResultStatus testResultStatus, double ellapsedSeconds, List<string> output)
 {
     Test = test;
     Status = testResultStatus;
     EllapsedSeconds = ellapsedSeconds;
     Output = output;
 }
        public AssertionWithStackTrace(TestCaseResult parent,
			int lineNumber, TestResultStatus status)
        {
            this.parent = parent;
            this.status = status;
            this.lineNumber = lineNumber;

            parent.AddAssertion(this);

            backtrace = new List<BacktraceFrame>();
        }
        public AssertionWithStackTrace(TestCaseResult parent,
                                       int lineNumber, TestResultStatus status)
        {
            this.parent     = parent;
            this.status     = status;
            this.lineNumber = lineNumber;

            parent.AddAssertion(this);

            backtrace = new List <BacktraceFrame>();
        }
            public Assertion(TestCaseResult parent, int lineNumber,
                             TestResultStatus status, string message, string[] args)
            {
                this.parent     = parent;
                this.status     = status;
                this.message    = message;
                this.args       = args;
                this.lineNumber = lineNumber;

                parent.AddAssertion(this);
            }
        public TestResultsInStatusViewModel GetTestsFromSessionInStatus(long sessionId, string browserName, TestResultStatus status)
        {
            var query       = new FindTestResultsFromSession(sessionId, browserName, status);
            var testResults = this.testRepository.FindAll(query);

            return(new TestResultsInStatusViewModel()
            {
                TestResults = testResults.ConvertAll(MapToTestResultListItemDTO)
            });
        }
            public Assertion(TestCaseResult parent, int lineNumber,
				TestResultStatus status, string message, string[] args)
            {
                this.parent = parent;
                this.status = status;
                this.message = message;
                this.args = args;
                this.lineNumber = lineNumber;

                parent.AddAssertion(this);
            }
 private SA_TestResult(TestResultStatus status, string message)
 {
     Status  = status;
     Message = message;
 }
Exemple #11
0
        public ActionResult GetTestsFromSessionInStatus(long sessionId, string browserName, TestResultStatus status)
        {
            var tests = this.testResultService.GetTestsFromSessionInStatus(sessionId, browserName, status);

            return(View("TestResultsInStatus", tests));
        }
        private string GetImageForStatus(string prefix, TestResultStatus status)
        {
            string key;

            switch (status)
            {
                case TestResultStatus.OK:
                    key = "OK";
                    break;

                case TestResultStatus.Warning:
                    key = "Warning";
                    break;

                case TestResultStatus.Error:
                    key = "Error";
                    break;

                case TestResultStatus.Failed:
                    key = "Failure";
                    break;

                default:
                    key = "";
                    break;
            }

            return prefix + key;
        }
Exemple #13
0
 public FindTestResultsFromSession(long sessionId, string browserName, TestResultStatus resultStatus)
 {
     this.sessionId    = sessionId;
     this.browserName  = browserName;
     this.resultStatus = resultStatus;
 }