Пример #1
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            logger.LogImportantMessage($"##teamcity[testIgnored name='{Escape(displayNameFormatter.DisplayName(testSkipped.Test))}' message='{Escape(testSkipped.Reason)}' flowId='{ToFlowId(testSkipped.TestCollection.DisplayName)}']");
            LogFinish(testSkipped);

            return(base.Visit(testSkipped));
        }
        protected override bool Visit(ITestSkipped testSkipped)
        {
            AppVeyorUpdateTest(GetFinishedTestName(testSkipped.Test.DisplayName), "xUnit", assemblyFileName, "Skipped",
                               Convert.ToInt64(testSkipped.ExecutionTime * 1000), null, null, null, null);

            return base.Visit(testSkipped);
        }
Пример #3
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var task = context.GetRemoteTask(testSkipped);

            task.Skipped(testSkipped.Reason);
            return(context.ShouldContinue);
        }
Пример #4
0
        public static string ToJson(this ITestSkipped testSkipped, string flowId)
        {
            var json = initObject("testSkipped", testSkipped, typeof(ITestSkipped), flowId);

            json["reason"] = testSkipped.Reason;
            return(ToJson(json));
        }
        protected override bool Visit(ITestSkipped testSkipped)
        {
            AppVeyorUpdateTest(GetFinishedTestName(testSkipped.Test.DisplayName), "xUnit", assemblyFileName, "Skipped",
                               Convert.ToInt64(testSkipped.ExecutionTime * 1000), null, null, null, null);

            return(base.Visit(testSkipped));
        }
Пример #6
0
            protected override bool Visit(ITestSkipped testSkipped)
            {
                var testCase = testCases.Single(tc => tc.DisplayName == testSkipped.TestCase.DisplayName);

                testCase.State = TestState.Skipped;
                TestFinished?.Invoke(this, TestStateEventArgs.Skipped);
                return(!isCancelRequested());
            }
Пример #7
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var result = MakeVsTestResult(TestOutcome.Skipped, testSkipped);

            recorder.RecordEnd(result.TestCase, result.Outcome);
            recorder.RecordResult(result);

            return(!cancelledThunk());
        }
Пример #8
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            Log.LogMessage(MessageImportance.High, "##teamcity[testIgnored name='{0}' message='{1}' flowId='{2}']",
                           TeamCityEscape(displayNameFormatter.DisplayName(testSkipped.Test)),
                           TeamCityEscape(testSkipped.Reason),
                           ToFlowId(testSkipped.TestCollection.DisplayName));
            LogFinish(testSkipped);

            return(base.Visit(testSkipped));
        }
        /// <inheritdoc/>
        protected override bool Visit(ITestSkipped testSkipped)
        {
            lock (Logger.LockObject)
            {
                Logger.LogWarning($"    {Escape(testSkipped.Test.DisplayName)} [SKIP]");
                Logger.LogImportantMessage($"      {Escape(testSkipped.Reason)}");
            }

            return(base.Visit(testSkipped));
        }
Пример #10
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            console.WriteLine("##teamcity[testIgnored name='{0}' message='{1}' flowId='{2}']",
                              TeamCityEscape(displayNameFormatter.DisplayName(testSkipped.Test)),
                              TeamCityEscape(testSkipped.Reason),
                              ToFlowId(testSkipped.TestCollection.DisplayName));
            LogFinish(testSkipped);

            return base.Visit(testSkipped);
        }
Пример #11
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            if (_assemblyElement != null)
            {
                var testElement = CreateTestResultElement(testSkipped, "Skip");
                testElement.Add(new XElement("reason", new XCData(XmlEscape(testSkipped.Reason))));
            }

            return(base.Visit(testSkipped));
        }
Пример #12
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            Log.LogMessage(MessageImportance.High, "##teamcity[testIgnored name='{0}' message='{1}' flowId='{2}']",
                           TeamCityEscape(testSkipped.TestDisplayName),
                           TeamCityEscape(testSkipped.Reason),
                           ToFlowId(testSkipped.TestCollection.DisplayName));
            LogFinish(testSkipped);

            return base.Visit(testSkipped);
        }
Пример #13
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            Console.WriteLine("##teamcity[testIgnored name='{0}' message='{1}' flowId='{2}']",
                              TeamCityEscape(testSkipped.TestDisplayName),
                              TeamCityEscape(testSkipped.Reason),
                              ToFlowId(testSkipped.TestCollection.DisplayName));
            LogFinish(testSkipped);

            return(base.Visit(testSkipped));
        }
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var test = _conversions[testSkipped.TestCase];

            _sink?.SendTestResult(new TestResult(test)
            {
                Outcome = TestOutcome.Skipped
            });

            return(true);
        }
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var test = testSkipped.TestCase.ToDesignTimeTest();

            _sink.RecordResult(new TestResult(test)
            {
                Outcome = TestOutcome.Skipped,
            });

            return(base.Visit(testSkipped));
        }
Пример #16
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            if (_failSkips)
            {
                return(Visit(new TestFailed(testSkipped.Test, 0M, "", new[] { "FAIL_SKIP" }, new[] { testSkipped.Reason }, new[] { "" }, new[] { -1 })));
            }

            _log.WriteLine($"   {XmlEscape(testSkipped.Test.DisplayName)} [SKIP]");
            _log.WriteLine($"      {XmlEscape(testSkipped.Reason)}");

            return(base.Visit(testSkipped));
        }
Пример #17
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var displayName = TeamCityEscape(GetDisplayName(testSkipped.Test));

            LogMessage(displayName, false, "##teamcity[testIgnored name='{0}' message='{1}' flowId='{2}']",
                       displayName,
                       TeamCityEscape(testSkipped.Reason),
                       ToFlowId(testSkipped.TestCollection.DisplayName));

            LogFinish(testSkipped);

            return(base.Visit(testSkipped));
        }
Пример #18
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            AppVeyorLogger.UpdateTest(GetFinishedTestName(testSkipped.Test.DisplayName), FrameworkName, assemblyFileName, "Skipped",
                                      Convert.ToInt64(testSkipped.ExecutionTime * 1000), null, null, null, null);

            lock (consoleLock)
            {
                Console.WriteLine("   {0} [SKIP]", Escape(testSkipped.Test.DisplayName));
                Console.WriteLine("      {0}", Escape(testSkipped.Reason));
            }

            return(base.Visit(testSkipped));
        }
Пример #19
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            lock (consoleLock)
            {
                // TODO: Thread-safe way to figure out the default foreground color
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.Error.WriteLine("   {0} [SKIP]", Escape(testSkipped.TestDisplayName));
                Console.ForegroundColor = ConsoleColor.Gray;
                Console.Error.WriteLine("      {0}", Escape(testSkipped.Reason));
            }

            return base.Visit(testSkipped);
        }
Пример #20
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            lock (consoleLock)
            {
                // TODO: Thread-safe way to figure out the default foreground color
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.Error.WriteLine("   {0} [SKIP]", XmlEscape(testSkipped.Test.DisplayName));
                Console.ForegroundColor = ConsoleColor.Gray;
                Console.Error.WriteLine("      {0}", XmlEscape(testSkipped.Reason));
            }

            return(base.Visit(testSkipped));
        }
Пример #21
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var test = _conversions[testSkipped.TestCase];

            if (_sink != null)
            {
                _sink.RecordResult(new TestResult(test)
                {
                    Outcome = TestOutcome.Skipped
                });
            }

            return(true);
        }
Пример #22
0
        protected override bool Visit(ITestSkipped skipped)
        {
            if (TestRunState == TestRunState.NoTests)
            {
                TestRunState = TestRunState.Success;
            }

            var testResult = skipped.ToTdNetTestResult(TestState.Ignored);

            testResult.Message = skipped.Reason;

            TestListener.TestFinished(testResult);

            return(true);
        }
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var result = MakeVsTestResult(TestOutcome.Skipped, testSkipped);

            if (result != null)
            {
                TryAndReport("RecordResult (Skip)", testSkipped.TestCase, () => recorder.RecordResult(result));
            }
            else
            {
                logger.LogWarning(testSkipped.TestCase, "(Skip) Could not find VS test case for {0} (ID = {1})", testSkipped.TestCase.DisplayName, testSkipped.TestCase.UniqueID);
            }

            return(!cancelledThunk());
        }
Пример #24
0
        _TestSkipped AdaptTestSkipped(ITestSkipped message)
        {
            var testCollectionUniqueID = UniqueIDForTestCollection(assemblyUniqueID, message.TestCollection);
            var testClassUniqueID      = UniqueIDForTestClass(testCollectionUniqueID, message.TestClass);
            var testMethodUniqueID     = UniqueIDForTestMethod(testClassUniqueID, message.TestMethod);
            var testCaseUniqueID       = message.TestCase.UniqueID;
            var testUniqueID           = UniqueIDForTest(testCaseUniqueID, message.Test);

            return(new _TestSkipped
            {
                AssemblyUniqueID = assemblyUniqueID,
                ExecutionTime = message.ExecutionTime,
                Output = message.Output,
                Reason = message.Reason,
                TestCaseUniqueID = testCaseUniqueID,
                TestCollectionUniqueID = testCollectionUniqueID,
                TestClassUniqueID = testClassUniqueID,
                TestMethodUniqueID = testMethodUniqueID,
                TestUniqueID = testUniqueID
            });
        }
Пример #25
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            Log.LogWarning("{0}: {1}", Escape(testSkipped.TestDisplayName), Escape(testSkipped.Reason));

            return(base.Visit(testSkipped));
        }
Пример #26
0
 protected abstract void OnTestSkipped(ITestSkipped testSkipped);
 protected override bool Visit(ITestSkipped testSkipped)
 {
     executionListener.OnTestSkipped(testSkipped.TestCase.UniqueID, testSkipped.Reason);
     return(true);
 }
Пример #28
0
 protected override bool Visit(ITestSkipped testSkipped)
 {
     Register(TestOutcome.Skipped, testSkipped);
     return(base.Visit(testSkipped));
 }
Пример #29
0
 protected override bool Visit(ITestSkipped testSkipped)
 {
     MakeTestResultViewModel(testSkipped, TestState.Skipped);
     return(!cancelledThunk());
 }
Пример #30
0
 protected override void OnTestSkipped(ITestSkipped testSkipped)
 {
     Process(testSkipped.TestCase.DisplayName, TestState.Skipped);
 }
        protected override bool Visit(ITestSkipped testSkipped)
        {
            logger.LogImportantMessage("##teamcity[testIgnored name='{0}' message='{1}' flowId='{2}']",
                                       Escape(displayNameFormatter.DisplayName(testSkipped.Test)),
                                       Escape(testSkipped.Reason),
                                       ToFlowId(testSkipped.TestCollection.DisplayName));
            LogFinish(testSkipped);

            return base.Visit(testSkipped);
        }
 protected abstract void OnTestSkipped(ITestSkipped testSkipped);
Пример #33
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            logger.LogImportantMessage(testSkipped.ToJson(ToFlowId(testSkipped.TestCollection.DisplayName)));

            return(base.Visit(testSkipped));
        }
Пример #34
0
 public OnMessage_TestSkipped()
 {
     testSkipped = Substitute.For<ITestSkipped>();
     testSkipped.TestDisplayName.Returns("This is my display name \t\r\n");
     testSkipped.Reason.Returns("This is my skip reason \t\r\n");
 }
Пример #35
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            Log.LogWarning("{0}: {1}", Escape(testSkipped.TestDisplayName), Escape(testSkipped.Reason));

            return base.Visit(testSkipped);
        }
Пример #36
0
 protected override void OnTestSkipped(ITestSkipped testSkipped)
 {
     Process(testSkipped.TestCase.DisplayName, TestState.Skipped);
 }
Пример #37
0
 /// <summary>
 /// Called when an instance of <see cref="ITestSkipped"/> is sent to the message sink.
 /// </summary>
 /// <param name="testSkipped">The message.</param>
 /// <returns>Return <c>true</c> to continue executing tests; <c>false</c> otherwise.</returns>
 protected virtual bool Visit(ITestSkipped testSkipped)
 {
     return(true);
 }
        protected override bool Visit(ITestSkipped testSkipped)
        {
            var displayName = TeamCityEscape(GetDisplayName(testSkipped.Test));
            LogMessage(displayName, false, "##teamcity[testIgnored name='{0}' message='{1}' flowId='{2}']",
                           displayName,
                           TeamCityEscape(testSkipped.Reason),
                           ToFlowId(testSkipped.TestCollection.DisplayName));
            
            LogFinish(testSkipped);

            return base.Visit(testSkipped);
        }
Пример #39
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            AppVeyorLogger.UpdateTest(GetFinishedTestName(testSkipped.Test.DisplayName), FrameworkName, assemblyFileName, "Skipped",
                                      Convert.ToInt64(testSkipped.ExecutionTime * 1000), null, null, null, null);

            lock (consoleLock)
            {
                Console.Error.WriteLine("   {0} [SKIP]", Escape(testSkipped.Test.DisplayName));
                Console.Error.WriteLine("      {0}", Escape(testSkipped.Reason));
            }

            return base.Visit(testSkipped);
        }
 VsTestResult MakeVsTestResult(TestOutcome outcome, ITestSkipped skippedResult)
 => MakeVsTestResult(outcome, skippedResult.TestCase, skippedResult.Test.DisplayName, (double)skippedResult.ExecutionTime, skippedResult.Reason);
Пример #41
0
 protected override bool Visit(ITestSkipped testSkipped)
 {
     Calls.Add("ITestSkipped");
     return(base.Visit(testSkipped));
 }
Пример #42
0
 protected override bool Visit(ITestSkipped testSkipped)
 {
     Calls.Add("ITestSkipped");
     return base.Visit(testSkipped);
 }
        /// <inheritdoc/>
        protected override bool Visit(ITestSkipped testSkipped)
        {
            lock (Logger.LockObject)
            {
                Logger.LogWarning("    {0} [SKIP]", Escape(testSkipped.Test.DisplayName));
                Logger.LogImportantMessage("      {0}", Escape(testSkipped.Reason));
            }

            return base.Visit(testSkipped);
        }
Пример #44
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            logger.LogImportantMessage(testSkipped.ToJson(ToFlowId(testSkipped.TestCollection.DisplayName)));

            return base.Visit(testSkipped);
        }
Пример #45
0
        protected override bool Visit(ITestSkipped testSkipped)
        {
            Console.WriteLine("{0}: {1}", Escape(testSkipped.TestDisplayName), Escape(testSkipped.Reason));

            return base.Visit(testSkipped);
        }