public void FileLog(TestLog log)
 {
     lock (sync)
     {
         nestedCallback.FileLog(log);
     }
 }
        public override void FileLog(TestLog log)
        {
            ClearCounter();

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(GetFileLogMessage(log));
            Console.ResetColor();
        }
예제 #3
0
            public void It_will_write_file_log_messages_to_console()
            {
                var cb = new StandardConsoleRunnerCallback(false, false, false, false);
                var log = new TestLog {InputTestFile = "test.js", Message = "hello"};
                cb.FileLog(log);

                Assert.Equal("Log Message: hello from test.js", _out.ToString().Trim());
            }
예제 #4
0
            public void It_will_write_file_log_messages_as_standard_out_for_failed_test()
            {
                var cb = new TeamCityConsoleRunnerCallback();
                var log = new TestLog { InputTestFile = "test.js", Message = "hello" };
                var result = new TestResult {Passed = false, Message = "failure"};
                var tc = new TestCase { TestName = "foo", TestResults = new[] { result } };
                cb.TestStarted(tc);
                cb.FileLog(log);
                cb.TestFinished(tc);

                Assert.Contains("##teamcity[testStdOut name='foo' out='Log Message: hello from test.js|n|nTest |'foo|' failed|n\tfailure|nin  (line 0)|n|n']", _out.ToString());
            }
예제 #5
0
            public void It_will_separate_file_log_messages_per_test()
            {
                var cb = new TeamCityConsoleRunnerCallback();
                var log1 = new TestLog {InputTestFile = "test.js", Message = "hello"};
                var log2 = new TestLog {InputTestFile = "test.js", Message = "world"};
                var result = new TestResult { Passed = true };
                var tc1 = new TestCase {TestName = "foo", TestResults = new[] {result}};
                var tc2 = new TestCase {TestName = "bar", TestResults = new[] {result}};

                cb.TestStarted(tc1);
                cb.FileLog(log1);
                cb.TestFinished(tc1);

                cb.TestStarted(tc2);
                cb.FileLog(log2);
                cb.TestFinished(tc2);

                Assert.Contains("##teamcity[testStdOut name='foo' out='Log Message: hello from test.js|n|nPassed']", _out.ToString());
                Assert.Contains("##teamcity[testStdOut name='bar' out='Log Message: world from test.js|n|nPassed']", _out.ToString());
            }
예제 #6
0
 protected virtual string GetFileLogMessage(TestLog log)
 {
     return string.Format("Log Message: {0} from {1}\n", log.Message, log.InputTestFile);
 }
예제 #7
0
 public virtual void FileLog(TestLog log) { }
 public override void FileLog(TestLog log)
 {
     _testCaseMessages.Add(GetFileLogMessage(log));
 }
 public override void FileLog(TestLog log)
 {
     testPane.OutputString(GetFileLogMessage(log));
 }
예제 #10
0
 public override void FileLog(TestLog log)
 {
     frameworkHandle.SendMessage(TestMessageLevel.Informational, GetFileLogMessage(log));
 }
 public override void FileLog(TestLog log)
 {
     // This seems too noisy
     //testPane.OutputString(GetFileLogMessage(log));
 }