Esempio n. 1
0
        public Icon IconFor(Test test)
        {
            if (_queue.IsQueued(test)) return Icon.Pending;

            // TODO -- change to CPS?
            if (_queue.IsExecuting() && _queue.ExecutingTest == test)
            {
                if (test.LastResult == null) return Icon.RunningSuccess;

                if (test.WasSuccessful()) return Icon.RunningSuccess;

                return Icon.RunningFailure;
            }

            if (test.LastResult == null) return Icon.Unknown;

            return test.WasSuccessful() ? Icon.Success : Icon.Failed;
        }
Esempio n. 2
0
        public void AddTest(Test test, string resultsFile)
        {
            _tbody.Add("tr", x =>
            {
                x.AddClass(test.WasSuccessful() ? HtmlClasses.PASS : HtmlClasses.FAIL);

                x.Add("td").Text(test.GetPath().Locator);
                x.Add("td").Text(test.Lifecycle.ToString());
                x.Add("td")
                    .Add("a")
                    .Text(test.GetStatus())
                    .Attr("href", resultsFile);
            });
        }
Esempio n. 3
0
 public void Tally(Test test)
 {
     Total++;
     if (test.WasSuccessful())
     {
         Passed++;
     }
 }