From 39f7e18005d6dfa916ed03e13889f71096185a0f Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Thu, 8 Sep 2016 20:27:45 +0300 Subject: [PATCH 1/3] #14 Erroneous TeamCity service messages with multiple test assemblies and (default) parallel execution - use test's id as a base for flowId for TC service messages in the case when NUnit 3 console runs test for nunit.framework.dll v2 in parallel mode --- src/extension/TeamCityEventListener.cs | 54 ++- src/extension/teamcity-event-listener.csproj | 2 +- src/nunit.integration.tests/RunTests.feature | 149 ++++++++- .../RunTests.feature.cs | 315 ++++++++++++++---- src/nunit.integration.tests/TeamCity.feature | 96 +++++- .../TeamCity.feature.cs | 159 +++++++-- src/tests/TeamCityEventListenerTests.cs | 129 +++++-- 7 files changed, 748 insertions(+), 156 deletions(-) diff --git a/src/extension/TeamCityEventListener.cs b/src/extension/TeamCityEventListener.cs index 8d4b25a..122a6a5 100644 --- a/src/extension/TeamCityEventListener.cs +++ b/src/extension/TeamCityEventListener.cs @@ -44,14 +44,13 @@ public class TeamCityEventListener : ITestEventListener private static readonly ServiceMessageWriter ServiceMessageWriter = new ServiceMessageWriter(); private readonly TextWriter _outWriter; private readonly Dictionary _refs = new Dictionary(); - private int _blockCounter; - private string _rootFlowId; + private readonly Dictionary _blockCounters = new Dictionary(); public TeamCityEventListener() : this(Console.Out) { } public TeamCityEventListener(TextWriter outWriter) { - if (outWriter == null) throw new ArgumentNullException("outWriter"); + if (outWriter == null) throw new ArgumentNullException("outWriter"); _outWriter = outWriter; } @@ -93,8 +92,13 @@ public void RegisterMessage(XmlNode testEvent) } var id = testEvent.GetAttribute("id"); + if (id == null) + { + id = string.Empty; + } + var parentId = testEvent.GetAttribute("parentId"); - string flowId; + var flowId = "."; if (parentId != null) { // NUnit 3 case @@ -104,7 +108,14 @@ public void RegisterMessage(XmlNode testEvent) else { // NUnit 2 case - flowId = _rootFlowId; + if (!string.IsNullOrEmpty(id)) + { + var idParts = id.Split('-'); + if (idParts.Length == 2) + { + flowId = idParts[0]; + } + } } string testFlowId; @@ -125,12 +136,12 @@ public void RegisterMessage(XmlNode testEvent) { case "start-suite": _refs[id] = parentId; - StartSuiteCase(id, parentId, flowId, fullName); + StartSuiteCase(parentId, flowId, fullName); break; case "test-suite": _refs.Remove(id); - TestSuiteCase(id, parentId, flowId, fullName); + TestSuiteCase(parentId, flowId, fullName); break; case "start-test": @@ -194,7 +205,7 @@ private void CaseStartTest(string id, string flowId, string parentId, string tes OnTestStart(testFlowId, fullName); } - private void TestSuiteCase(string id, string parentId, string flowId, string fullName) + private void TestSuiteCase(string parentId, string flowId, string fullName) { // NUnit 3 case if (parentId == string.Empty) @@ -205,15 +216,14 @@ private void TestSuiteCase(string id, string parentId, string flowId, string ful // NUnit 2 case if (parentId == null) { - if (--_blockCounter == 0) + if (ChangeBlockCounter(flowId, -1) == 0) { - _rootFlowId = null; - OnRootSuiteFinish(id, fullName); + OnRootSuiteFinish(flowId, fullName); } } } - private void StartSuiteCase(string id, string parentId, string flowId, string fullName) + private void StartSuiteCase(string parentId, string flowId, string fullName) { // NUnit 3 case if (parentId == string.Empty) @@ -224,14 +234,26 @@ private void StartSuiteCase(string id, string parentId, string flowId, string fu // NUnit 2 case if (parentId == null) { - if (_blockCounter++ == 0) + if (ChangeBlockCounter(flowId, 1) == 1) { - _rootFlowId = id; - OnRootSuiteStart(id, fullName); + OnRootSuiteStart(flowId, fullName); } } } + private int ChangeBlockCounter(string flowId, int changeValue) + { + int currentBlockCounter; + if (!_blockCounters.TryGetValue(flowId, out currentBlockCounter)) + { + currentBlockCounter = 0; + } + + currentBlockCounter += changeValue; + _blockCounters[flowId] = currentBlockCounter; + return currentBlockCounter; + } + private bool TryFindParentId(string id, out string parentId) { if (id == null) @@ -278,7 +300,7 @@ private void TrySendOutput(string flowId, XmlNode message, string fullName) new ServiceMessageAttr(ServiceMessageAttr.Names.Name, fullName), new ServiceMessageAttr(ServiceMessageAttr.Names.Out, outputStr), new ServiceMessageAttr(ServiceMessageAttr.Names.FlowId, flowId), - new ServiceMessageAttr(ServiceMessageAttr.Names.TcTags, "tc:parseServiceMessagesInside"))); + new ServiceMessageAttr(ServiceMessageAttr.Names.TcTags, "tc:parseServiceMessagesInside"))); } private void OnRootSuiteStart(string flowId, string assemblyName) diff --git a/src/extension/teamcity-event-listener.csproj b/src/extension/teamcity-event-listener.csproj index 67fe117..45f71ad 100644 --- a/src/extension/teamcity-event-listener.csproj +++ b/src/extension/teamcity-event-listener.csproj @@ -16,7 +16,7 @@ true full false - ..\..\bin\nunit\NUnit.Extension.TeamCityEventListener\tools\ + ..\..\..\nunit-console\bin\Debug\addins\ DEBUG;TRACE prompt 4 diff --git a/src/nunit.integration.tests/RunTests.feature b/src/nunit.integration.tests/RunTests.feature index bcd8663..6c6ccb1 100644 --- a/src/nunit.integration.tests/RunTests.feature +++ b/src/nunit.integration.tests/RunTests.feature @@ -3,6 +3,153 @@ Background: Given NUnit path is ..\nunit\ +Scenario Outline: User runs tests for several assemblies + Given Framework version is + And I have created the folder mocks + And I have copied NUnit framework references to folder mocks + And I have added successful method as SuccessfulTest to the class Foo.Tests.UnitTests1 for foo.tests + And I have added NUnit framework references to foo.tests + + And I have compiled the assembly foo.tests to file mocks\foo1.tests.dll + And I have added the assembly mocks\foo1.tests.dll to the list of testing assemblies + + And I have compiled the assembly foo.tests to file mocks\foo2.tests.dll + And I have added the assembly mocks\foo2.tests.dll to the list of testing assemblies + + And I have compiled the assembly foo.tests to file mocks\foo3.tests.dll + And I have added the assembly mocks\foo3.tests.dll to the list of testing assemblies + + And I have compiled the assembly foo.tests to file mocks\foo4.tests.dll + And I have added the assembly mocks\foo4.tests.dll to the list of testing assemblies + + And I have compiled the assembly foo.tests to file mocks\foo5.tests.dll + And I have added the assembly mocks\foo5.tests.dll to the list of testing assemblies + + And I have compiled the assembly foo.tests to file mocks\foo6.tests.dll + And I have added the assembly mocks\foo6.tests.dll to the list of testing assemblies + + And I want to use configuration type + And I have added the arg workers=10 to NUnit console command line + And I have added the arg agents= to NUnit console command line + And I have added the arg process= to NUnit console command line + And I have added the arg domain= to NUnit console command line + + When I run NUnit console + Then the exit code should be 0 + And the output should contain correct set of TeamCity service messages + And the Test Run Summary should has following: + | field | value | + | Test Count | 6 | + | Passed | 6 | + | Failed | 0 | + | Inconclusive | 0 | + | Skipped | 0 | + +Examples: + | frameworkVersion | process | domain | agents | platform | configurationType | + | Version45 | InProcess | Single | 10 | AnyCpu | ProjectFile | + | Version40 | InProcess | Single | 10 | AnyCpu | ProjectFile | + | Version45 | Separate | Single | 10 | AnyCpu | ProjectFile | + | Version40 | Separate | Single | 10 | AnyCpu | ProjectFile | + | Version45 | Multiple | Single | 10 | AnyCpu | ProjectFile | + | Version40 | Multiple | Single | 10 | AnyCpu | ProjectFile | + | Version45 | InProcess | Multiple | 10 | AnyCpu | ProjectFile | + | Version40 | InProcess | Multiple | 10 | AnyCpu | ProjectFile | + | Version45 | Separate | Multiple | 10 | AnyCpu | ProjectFile | + | Version40 | Separate | Multiple | 10 | AnyCpu | ProjectFile | + | Version45 | InProcess | Single | 10 | AnyCpu | ProjectFile | + | Version40 | InProcess | Single | 2 | AnyCpu | ProjectFile | + | Version45 | Separate | Single | 2 | AnyCpu | ProjectFile | + | Version40 | Separate | Single | 2 | AnyCpu | ProjectFile | + | Version45 | Multiple | Single | 2 | AnyCpu | ProjectFile | + | Version40 | Multiple | Single | 2 | AnyCpu | ProjectFile | + | Version45 | InProcess | Multiple | 2 | AnyCpu | ProjectFile | + | Version40 | InProcess | Multiple | 2 | AnyCpu | ProjectFile | + | Version45 | Separate | Multiple | 2 | AnyCpu | ProjectFile | + | Version40 | Separate | Multiple | 2 | AnyCpu | ProjectFile | + | Version45 | InProcess | Single | 1 | AnyCpu | ProjectFile | + | Version40 | InProcess | Single | 1 | AnyCpu | ProjectFile | + | Version45 | Separate | Single | 1 | AnyCpu | ProjectFile | + | Version40 | Separate | Single | 1 | AnyCpu | ProjectFile | + | Version45 | Multiple | Single | 1 | AnyCpu | ProjectFile | + | Version40 | Multiple | Single | 1 | AnyCpu | ProjectFile | + | Version45 | InProcess | Multiple | 1 | AnyCpu | ProjectFile | + | Version40 | InProcess | Multiple | 1 | AnyCpu | ProjectFile | + | Version45 | Separate | Multiple | 1 | AnyCpu | ProjectFile | + | Version40 | Separate | Multiple | 1 | AnyCpu | ProjectFile | + | Version45 | Separate | Single | 10 | X86 | ProjectFile | + | Version40 | Separate | Single | 10 | X86 | ProjectFile | + | Version45 | Multiple | Single | 10 | X86 | ProjectFile | + | Version40 | Multiple | Single | 10 | X86 | ProjectFile | + | Version45 | Separate | Multiple | 10 | X86 | ProjectFile | + | Version40 | Separate | Multiple | 10 | X86 | ProjectFile | + | Version45 | Separate | Single | 1 | X86 | ProjectFile | + | Version40 | Separate | Single | 1 | X86 | ProjectFile | + | Version45 | Multiple | Single | 1 | X86 | ProjectFile | + | Version40 | Multiple | Single | 1 | X86 | ProjectFile | + | Version45 | Separate | Multiple | 1 | X86 | ProjectFile | + | Version40 | Separate | Multiple | 1 | X86 | ProjectFile | + | Version40 | InProcess | Single | 2 | X86 | ProjectFile | + | Version45 | Separate | Single | 2 | X86 | ProjectFile | + | Version40 | Separate | Single | 2 | X86 | ProjectFile | + | Version45 | Multiple | Single | 2 | X86 | ProjectFile | + | Version40 | Multiple | Single | 2 | X86 | ProjectFile | + | Version45 | InProcess | Multiple | 2 | X86 | ProjectFile | + | Version40 | InProcess | Multiple | 2 | X86 | ProjectFile | + | Version45 | Separate | Multiple | 2 | X86 | ProjectFile | + | Version40 | Separate | Multiple | 2 | X86 | ProjectFile | + | Version45 | InProcess | Single | 10 | AnyCpu | CmdArguments | + | Version40 | InProcess | Single | 10 | AnyCpu | CmdArguments | + | Version45 | Separate | Single | 10 | AnyCpu | CmdArguments | + | Version40 | Separate | Single | 10 | AnyCpu | CmdArguments | + | Version45 | Multiple | Single | 10 | AnyCpu | CmdArguments | + | Version40 | Multiple | Single | 10 | AnyCpu | CmdArguments | + | Version45 | InProcess | Multiple | 10 | AnyCpu | CmdArguments | + | Version40 | InProcess | Multiple | 10 | AnyCpu | CmdArguments | + | Version45 | Separate | Multiple | 10 | AnyCpu | CmdArguments | + | Version40 | Separate | Multiple | 10 | AnyCpu | CmdArguments | + | Version45 | InProcess | Single | 10 | AnyCpu | CmdArguments | + | Version40 | InProcess | Single | 2 | AnyCpu | CmdArguments | + | Version45 | Separate | Single | 2 | AnyCpu | CmdArguments | + | Version40 | Separate | Single | 2 | AnyCpu | CmdArguments | + | Version45 | Multiple | Single | 2 | AnyCpu | CmdArguments | + | Version40 | Multiple | Single | 2 | AnyCpu | CmdArguments | + | Version45 | InProcess | Multiple | 2 | AnyCpu | CmdArguments | + | Version40 | InProcess | Multiple | 2 | AnyCpu | CmdArguments | + | Version45 | Separate | Multiple | 2 | AnyCpu | CmdArguments | + | Version40 | Separate | Multiple | 2 | AnyCpu | CmdArguments | + | Version45 | InProcess | Single | 1 | AnyCpu | CmdArguments | + | Version40 | InProcess | Single | 1 | AnyCpu | CmdArguments | + | Version45 | Separate | Single | 1 | AnyCpu | CmdArguments | + | Version40 | Separate | Single | 1 | AnyCpu | CmdArguments | + | Version45 | Multiple | Single | 1 | AnyCpu | CmdArguments | + | Version40 | Multiple | Single | 1 | AnyCpu | CmdArguments | + | Version45 | InProcess | Multiple | 1 | AnyCpu | CmdArguments | + | Version40 | InProcess | Multiple | 1 | AnyCpu | CmdArguments | + | Version45 | Separate | Multiple | 1 | AnyCpu | CmdArguments | + | Version40 | Separate | Multiple | 1 | AnyCpu | CmdArguments | + | Version45 | Separate | Single | 10 | X86 | CmdArguments | + | Version40 | Separate | Single | 10 | X86 | CmdArguments | + | Version45 | Multiple | Single | 10 | X86 | CmdArguments | + | Version40 | Multiple | Single | 10 | X86 | CmdArguments | + | Version45 | Separate | Multiple | 10 | X86 | CmdArguments | + | Version40 | Separate | Multiple | 10 | X86 | CmdArguments | + | Version45 | Separate | Single | 1 | X86 | CmdArguments | + | Version40 | Separate | Single | 1 | X86 | CmdArguments | + | Version45 | Multiple | Single | 1 | X86 | CmdArguments | + | Version40 | Multiple | Single | 1 | X86 | CmdArguments | + | Version45 | Separate | Multiple | 1 | X86 | CmdArguments | + | Version40 | Separate | Multiple | 1 | X86 | CmdArguments | + | Version40 | InProcess | Single | 2 | X86 | CmdArguments | + | Version45 | Separate | Single | 2 | X86 | CmdArguments | + | Version40 | Separate | Single | 2 | X86 | CmdArguments | + | Version45 | Multiple | Single | 2 | X86 | CmdArguments | + | Version40 | Multiple | Single | 2 | X86 | CmdArguments | + | Version45 | InProcess | Multiple | 2 | X86 | CmdArguments | + | Version40 | InProcess | Multiple | 2 | X86 | CmdArguments | + | Version45 | Separate | Multiple | 2 | X86 | CmdArguments | + | Version40 | Separate | Multiple | 2 | X86 | CmdArguments | + Scenario Outline: User runs parallelizable tests Given Framework version is And I have added SuccessfulParallelizable method as SuccessfulParallelizable1 to the class Foo.Tests.UnitTests1 for foo1.tests @@ -151,4 +298,4 @@ Examples: | Version45 | Separate | Multiple | 1 | X86 | | Version40 | Separate | Multiple | 1 | X86 | # | Version45 | Multiple | Multiple | 1 | X86 | -# | Version40 | Multiple | Multiple | 1 | X86 | +# | Version40 | Multiple | Multiple | 1 | X86 | \ No newline at end of file diff --git a/src/nunit.integration.tests/RunTests.feature.cs b/src/nunit.integration.tests/RunTests.feature.cs index 9ca1fbc..bbdbdaa 100644 --- a/src/nunit.integration.tests/RunTests.feature.cs +++ b/src/nunit.integration.tests/RunTests.feature.cs @@ -71,6 +71,193 @@ public virtual void FeatureBackground() #line hidden } + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("User runs tests for several assemblies")] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "2", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", "AnyCpu", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "1", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "1", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "1", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "1", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "2", "X86", "ProjectFile", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "2", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "1", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "1", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "1", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "1", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "2", "X86", "CmdArguments", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "2", "X86", "CmdArguments", new string[0])] + public virtual void UserRunsTestsForSeveralAssemblies(string frameworkVersion, string process, string domain, string agents, string platform, string configurationType, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("User runs tests for several assemblies", exampleTags); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 7 + testRunner.Given(string.Format("Framework version is {0}", frameworkVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 8 + testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 9 + testRunner.And("I have copied NUnit framework references to folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.And("I have added successful method as SuccessfulTest to the class Foo.Tests.UnitTests" + + "1 for foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 11 + testRunner.And("I have added NUnit framework references to foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo1.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.And("I have added the assembly mocks\\foo1.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 16 + testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo2.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 17 + testRunner.And("I have added the assembly mocks\\foo2.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 19 + testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo3.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 20 + testRunner.And("I have added the assembly mocks\\foo3.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 22 + testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo4.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 23 + testRunner.And("I have added the assembly mocks\\foo4.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 25 + testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo5.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 26 + testRunner.And("I have added the assembly mocks\\foo5.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 28 + testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo6.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 29 + testRunner.And("I have added the assembly mocks\\foo6.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 31 + testRunner.And(string.Format("I want to use {0} configuration type", configurationType), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 32 + testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 34 + testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 35 + testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 37 + testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 38 + testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line 39 + testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { + "field", + "value"}); + table1.AddRow(new string[] { + "Test Count", + "6"}); + table1.AddRow(new string[] { + "Passed", + "6"}); + table1.AddRow(new string[] { + "Failed", + "0"}); + table1.AddRow(new string[] { + "Inconclusive", + "0"}); + table1.AddRow(new string[] { + "Skipped", + "0"}); +#line 40 + testRunner.And("the Test Run Summary should has following:", ((string)(null)), table1, "And "); +#line hidden + this.ScenarioCleanup(); + } + [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("User runs parallelizable tests")] [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", new string[0])] @@ -108,99 +295,99 @@ public virtual void FeatureBackground() public virtual void UserRunsParallelizableTests(string frameworkVersion, string process, string domain, string agents, string platform, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("User runs parallelizable tests", exampleTags); -#line 6 +#line 153 this.ScenarioSetup(scenarioInfo); #line 3 this.FeatureBackground(); -#line 7 +#line 154 testRunner.Given(string.Format("Framework version is {0}", frameworkVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 8 +#line 155 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable1 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 9 +#line 156 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable2 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 10 +#line 157 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable3 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 11 +#line 158 testRunner.And("I have added attribute [assembly: NUnit.Framework.Parallelizable] to the assembly" + " foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 12 +#line 159 testRunner.And("I have added attribute [NUnit.Framework.Parallelizable] to the class Foo.Tests.Un" + "itTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 13 +#line 160 testRunner.And("I have added NUnit framework references to foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 14 +#line 161 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable4 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 15 +#line 162 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable5 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 16 +#line 163 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable6 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 17 +#line 164 testRunner.And("I have added attribute [assembly: NUnit.Framework.Parallelizable] to the assembly" + " foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 18 +#line 165 testRunner.And("I have added attribute [NUnit.Framework.Parallelizable] to the class Foo.Tests.Un" + "itTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 19 +#line 166 testRunner.And("I have added NUnit framework references to foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 20 +#line 167 testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 21 +#line 168 testRunner.And("I have copied NUnit framework references to folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 22 +#line 169 testRunner.And(string.Format("I have specified {0} platform for assembly foo1.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 23 +#line 170 testRunner.And("I have compiled the assembly foo1.tests to file mocks\\foo1.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 24 +#line 171 testRunner.And(string.Format("I have specified {0} platform for assembly foo2.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 25 +#line 172 testRunner.And("I have compiled the assembly foo2.tests to file mocks\\foo2.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 26 +#line 173 testRunner.And("I have added the assembly mocks\\foo1.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 27 +#line 174 testRunner.And("I have added the assembly mocks\\foo2.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 28 +#line 175 testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 29 +#line 176 testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 30 +#line 177 testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 31 +#line 178 testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 32 +#line 179 testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 33 +#line 180 testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 34 +#line 181 testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line 35 +#line 182 testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden - TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { + TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { "field", "value"}); - table1.AddRow(new string[] { + table2.AddRow(new string[] { "Test Count", "6"}); - table1.AddRow(new string[] { + table2.AddRow(new string[] { "Passed", "6"}); - table1.AddRow(new string[] { + table2.AddRow(new string[] { "Failed", "0"}); - table1.AddRow(new string[] { + table2.AddRow(new string[] { "Inconclusive", "0"}); - table1.AddRow(new string[] { + table2.AddRow(new string[] { "Skipped", "0"}); -#line 36 - testRunner.And("the Test Run Summary should has following:", ((string)(null)), table1, "And "); +#line 183 + testRunner.And("the Test Run Summary should has following:", ((string)(null)), table2, "And "); #line hidden this.ScenarioCleanup(); } @@ -242,69 +429,69 @@ public virtual void UserRunsParallelizableTests(string frameworkVersion, string public virtual void UserRunsParallelizableTestsForNUnit2Framework(string frameworkVersion, string process, string domain, string agents, string platform, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("User runs parallelizable tests for NUnit 2 framework", exampleTags); -#line 87 +#line 234 this.ScenarioSetup(scenarioInfo); #line 3 this.FeatureBackground(); -#line 88 +#line 235 testRunner.And("I have added successful method as SuccessfulTest to the class Foo.Tests.UnitTests" + "1 for foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 89 +#line 236 testRunner.And("I have added successfulCatA method as SuccessfulTestCatA to the class Foo.Tests.U" + "nitTests1 for foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 90 +#line 237 testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 91 +#line 238 testRunner.And("I have added the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to " + "foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 92 +#line 239 testRunner.And("I have copied the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to" + " folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 93 +#line 240 testRunner.And(string.Format("I have specified {0} platform for assembly foo.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 94 +#line 241 testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 95 +#line 242 testRunner.And("I have added the assembly mocks\\foo.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 96 +#line 243 testRunner.And("I have added the arg Where=cat!=CatA to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 97 +#line 244 testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 98 +#line 245 testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 99 +#line 246 testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 100 +#line 247 testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 101 +#line 248 testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 102 +#line 249 testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 103 +#line 250 testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line 104 +#line 251 testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden - TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { + TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { "field", "value"}); - table2.AddRow(new string[] { + table3.AddRow(new string[] { "Test Count", "1"}); - table2.AddRow(new string[] { + table3.AddRow(new string[] { "Passed", "1"}); - table2.AddRow(new string[] { + table3.AddRow(new string[] { "Failed", "0"}); - table2.AddRow(new string[] { + table3.AddRow(new string[] { "Inconclusive", "0"}); - table2.AddRow(new string[] { + table3.AddRow(new string[] { "Skipped", "0"}); -#line 105 - testRunner.And("the Test Run Summary should has following:", ((string)(null)), table2, "And "); +#line 252 + testRunner.And("the Test Run Summary should has following:", ((string)(null)), table3, "And "); #line hidden this.ScenarioCleanup(); } diff --git a/src/nunit.integration.tests/TeamCity.feature b/src/nunit.integration.tests/TeamCity.feature index b9824a3..fd6fa5f 100644 --- a/src/nunit.integration.tests/TeamCity.feature +++ b/src/nunit.integration.tests/TeamCity.feature @@ -274,9 +274,71 @@ Examples: | Version45 | | Version40 | +@teamcity +Scenario Outline: NUnit sends TeamCity's service messages when I run many test for several assemblies for NUnit2 + Given Framework version is + And I have added 100 successful methods as SuccessfulTest to the class Foo.Tests.UnitTests1 for foo.tests1 + And I have added 100 successful methods as SuccessfulTest to the class Foo.Tests.UnitTests2 for foo.tests2 + And I have created the folder mocks + And I have copied the reference ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll to folder mocks + And I have added the reference ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll to foo.tests1 + And I have added the reference ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll to foo.tests2 + And I have compiled the assembly foo.tests1 to file mocks\foo.tests1.dll + And I have compiled the assembly foo.tests2 to file mocks\foo.tests2.dll + And I have added the assembly mocks\foo.tests1.dll to the list of testing assemblies + And I have added the assembly mocks\foo.tests2.dll to the list of testing assemblies + And I want to use CmdArguments type of TeamCity integration + And I have added the arg workers=10 to NUnit console command line + And I have added the arg agents= to NUnit console command line + And I have added the arg process= to NUnit console command line + And I have added the arg domain= to NUnit console command line + When I run NUnit console + Then the exit code should be 0 + And the output should contain correct set of TeamCity service messages + +Examples: + | frameworkVersion | process | domain | agents | + | Version45 | InProcess | None | 10 | + | Version40 | InProcess | None | 10 | + | Version45 | Separate | None | 10 | + | Version40 | Separate | None | 10 | + | Version45 | Multiple | None | 10 | + | Version40 | Multiple | None | 10 | + | Version45 | InProcess | Single | 10 | + | Version40 | InProcess | Single | 10 | + | Version45 | Separate | Single | 10 | + | Version40 | Separate | Single | 10 | + | Version45 | Multiple | Single | 10 | + | Version40 | Multiple | Single | 10 | + | Version45 | InProcess | Multiple | 10 | + | Version40 | InProcess | Multiple | 10 | + | Version45 | Separate | Multiple | 10 | + | Version40 | Separate | Multiple | 10 | +# | Version45 | Multiple | Multiple | 10 | +# | Version40 | Multiple | Multiple | 10 | + | Version45 | InProcess | None | 1 | + | Version40 | InProcess | None | 1 | + | Version45 | Separate | None | 1 | + | Version40 | Separate | None | 1 | + | Version45 | Multiple | None | 1 | + | Version40 | Multiple | None | 1 | + | Version45 | InProcess | Single | 1 | + | Version40 | InProcess | Single | 1 | + | Version45 | Separate | Single | 1 | + | Version40 | Separate | Single | 1 | + | Version45 | Multiple | Single | 1 | + | Version40 | Multiple | Single | 1 | + | Version45 | InProcess | Multiple | 1 | + | Version40 | InProcess | Multiple | 1 | + | Version45 | Separate | Multiple | 1 | + | Version40 | Separate | Multiple | 1 | +# | Version45 | Multiple | Multiple | 1 | +# | Version40 | Multiple | Multiple | 1 | + + @teamcity @Ignore -Scenario Outline: NUnit sends TeamCity's service messages for bunch of test from several assemblies for NUnit2 +Scenario Outline: NUnit sends TeamCity's service messages for bunch of test for several assemblies for NUnit2 Given Framework version is And I have created the folder mocks And I have copied the reference ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll to folder mocks @@ -297,22 +359,22 @@ Scenario Outline: NUnit sends TeamCity's service messages for bunch of test from And the output should contain correct set of TeamCity service messages Examples: | frameworkVersion | process | domain | agents | -# | Version45 | InProcess | None | 10 | -# | Version40 | InProcess | None | 10 | -# | Version45 | Separate | None | 10 | -# | Version40 | Separate | None | 10 | -# | Version45 | Multiple | None | 10 | -# | Version40 | Multiple | None | 10 | -# | Version45 | InProcess | Single | 10 | -# | Version40 | InProcess | Single | 10 | -# | Version45 | Separate | Single | 10 | -# | Version40 | Separate | Single | 10 | -# | Version45 | Multiple | Single | 10 | -# | Version40 | Multiple | Single | 10 | -# | Version45 | InProcess | Multiple | 10 | -# | Version40 | InProcess | Multiple | 10 | -# | Version45 | Separate | Multiple | 10 | -# | Version40 | Separate | Multiple | 10 | + | Version45 | InProcess | None | 10 | + | Version40 | InProcess | None | 10 | + | Version45 | Separate | None | 10 | + | Version40 | Separate | None | 10 | + | Version45 | Multiple | None | 10 | + | Version40 | Multiple | None | 10 | + | Version45 | InProcess | Single | 10 | + | Version40 | InProcess | Single | 10 | + | Version45 | Separate | Single | 10 | + | Version40 | Separate | Single | 10 | + | Version45 | Multiple | Single | 10 | + | Version40 | Multiple | Single | 10 | + | Version45 | InProcess | Multiple | 10 | + | Version40 | InProcess | Multiple | 10 | + | Version45 | Separate | Multiple | 10 | + | Version40 | Separate | Multiple | 10 | # | Version45 | Multiple | Multiple | 10 | # | Version40 | Multiple | Multiple | 10 | | Version45 | InProcess | None | 1 | diff --git a/src/nunit.integration.tests/TeamCity.feature.cs b/src/nunit.integration.tests/TeamCity.feature.cs index abcb5aa..fcb673c 100644 --- a/src/nunit.integration.tests/TeamCity.feature.cs +++ b/src/nunit.integration.tests/TeamCity.feature.cs @@ -1301,10 +1301,25 @@ public virtual void NUnitSendsTeamCitySServiceMessagesWhenIRunManyTest(string fr } [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("NUnit sends TeamCity\'s service messages for bunch of test from several assemblies" + - " for NUnit2")] - [NUnit.Framework.IgnoreAttribute("Ignored scenario")] + [NUnit.Framework.DescriptionAttribute("NUnit sends TeamCity\'s service messages when I run many test for several assembli" + + "es for NUnit2")] [NUnit.Framework.CategoryAttribute("teamcity")] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "None", "1", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "None", "1", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "None", "1", new string[0])] @@ -1321,47 +1336,47 @@ public virtual void NUnitSendsTeamCitySServiceMessagesWhenIRunManyTest(string fr [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "1", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", new string[0])] - public virtual void NUnitSendsTeamCitySServiceMessagesForBunchOfTestFromSeveralAssembliesForNUnit2(string frameworkVersion, string process, string domain, string agents, string[] exampleTags) + public virtual void NUnitSendsTeamCitySServiceMessagesWhenIRunManyTestForSeveralAssembliesForNUnit2(string frameworkVersion, string process, string domain, string agents, string[] exampleTags) { string[] @__tags = new string[] { - "teamcity", - "Ignore"}; + "teamcity"}; if ((exampleTags != null)) { @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); } - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("NUnit sends TeamCity\'s service messages for bunch of test from several assemblies" + - " for NUnit2", @__tags); -#line 279 + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("NUnit sends TeamCity\'s service messages when I run many test for several assembli" + + "es for NUnit2", @__tags); +#line 278 this.ScenarioSetup(scenarioInfo); #line 3 this.FeatureBackground(); -#line 280 +#line 279 testRunner.Given(string.Format("Framework version is {0}", frameworkVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 280 + testRunner.And("I have added 100 successful methods as SuccessfulTest to the class Foo.Tests.Unit" + + "Tests1 for foo.tests1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 281 - testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + testRunner.And("I have added 100 successful methods as SuccessfulTest to the class Foo.Tests.Unit" + + "Tests2 for foo.tests2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 282 + testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 283 testRunner.And("I have copied the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to" + " folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 283 - testRunner.And("I have created assemblies according to NUnit2 test results ..\\..\\..\\testsData\\NUn" + - "it2HugeTestResult.xml", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 284 testRunner.And("I have added the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to " + - "MAP.Common.Test", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + "foo.tests1", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 285 - testRunner.And("I have compiled the assembly MAP.Common.Test to file mocks\\MAP.Common.Test.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 286 testRunner.And("I have added the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to " + - "MAP.Web.Test", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + "foo.tests2", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 286 + testRunner.And("I have compiled the assembly foo.tests1 to file mocks\\foo.tests1.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 287 - testRunner.And("I have compiled the assembly MAP.Web.Test to file mocks\\MAP.Web.Test.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + testRunner.And("I have compiled the assembly foo.tests2 to file mocks\\foo.tests2.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 288 - testRunner.And("I have added the assembly mocks\\MAP.Common.Test.dll to the list of testing assemb" + - "lies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + testRunner.And("I have added the assembly mocks\\foo.tests1.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 289 - testRunner.And("I have added the assembly mocks\\MAP.Web.Test.dll to the list of testing assemblie" + - "s", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); + testRunner.And("I have added the assembly mocks\\foo.tests2.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 290 testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 291 @@ -1378,6 +1393,104 @@ public virtual void NUnitSendsTeamCitySServiceMessagesForBunchOfTestFromSeveralA testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line 297 testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("NUnit sends TeamCity\'s service messages for bunch of test for several assemblies " + + "for NUnit2")] + [NUnit.Framework.IgnoreAttribute("Ignored scenario")] + [NUnit.Framework.CategoryAttribute("teamcity")] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "None", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "None", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "None", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "None", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "None", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "None", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "None", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", new string[0])] + [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", new string[0])] + public virtual void NUnitSendsTeamCitySServiceMessagesForBunchOfTestForSeveralAssembliesForNUnit2(string frameworkVersion, string process, string domain, string agents, string[] exampleTags) + { + string[] @__tags = new string[] { + "teamcity", + "Ignore"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("NUnit sends TeamCity\'s service messages for bunch of test for several assemblies " + + "for NUnit2", @__tags); +#line 341 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 342 + testRunner.Given(string.Format("Framework version is {0}", frameworkVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 343 + testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 344 + testRunner.And("I have copied the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to" + + " folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 345 + testRunner.And("I have created assemblies according to NUnit2 test results ..\\..\\..\\testsData\\NUn" + + "it2HugeTestResult.xml", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 346 + testRunner.And("I have added the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to " + + "MAP.Common.Test", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 347 + testRunner.And("I have compiled the assembly MAP.Common.Test to file mocks\\MAP.Common.Test.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 348 + testRunner.And("I have added the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to " + + "MAP.Web.Test", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 349 + testRunner.And("I have compiled the assembly MAP.Web.Test to file mocks\\MAP.Web.Test.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 350 + testRunner.And("I have added the assembly mocks\\MAP.Common.Test.dll to the list of testing assemb" + + "lies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 351 + testRunner.And("I have added the assembly mocks\\MAP.Web.Test.dll to the list of testing assemblie" + + "s", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 352 + testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 353 + testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 354 + testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 355 + testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 356 + testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 357 + testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 358 + testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line 359 + testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden this.ScenarioCleanup(); } diff --git a/src/tests/TeamCityEventListenerTests.cs b/src/tests/TeamCityEventListenerTests.cs index 608fe78..0a7ae62 100644 --- a/src/tests/TeamCityEventListenerTests.cs +++ b/src/tests/TeamCityEventListenerTests.cs @@ -21,7 +21,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // *********************************************************************** -namespace NUnit.Engine.Tests +namespace NUnit.Engine.Listeners { using System; using System.IO; @@ -32,10 +32,7 @@ namespace NUnit.Engine.Tests using Framework; - using Listeners; - [TestFixture] - public class TeamCityEventListenerTests { private StringBuilder _output; @@ -45,7 +42,7 @@ public class TeamCityEventListenerTests public void SetUp() { _output = new StringBuilder(); - _outputWriter = new StringWriter(_output); + _outputWriter = new StringWriter(_output); } [TearDown] @@ -271,25 +268,89 @@ public void ShouldSendMessagesWithValidFlowIdWhenTestsFromNUnit2() publisher.RegisterMessage(CreateTestRun()); // Then - Assert.AreEqual( - "##teamcity[testSuiteStarted name='Assembly1' flowId='1-1']" + Environment.NewLine + Assert.AreEqual( + "##teamcity[testSuiteStarted name='Assembly1' flowId='1']" + Environment.NewLine - + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1-1']" + Environment.NewLine - + "##teamcity[testStdOut name='Assembly1.Namespace1.1.Test1' out='Text output' flowId='1-1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine - + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='100' flowId='1-1']" + Environment.NewLine + + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testStdOut name='Assembly1.Namespace1.1.Test1' out='Text output' flowId='1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='100' flowId='1']" + Environment.NewLine - + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test2' captureStandardOutput='false' flowId='1-1']" + Environment.NewLine - + "##teamcity[testFailed name='Assembly1.Namespace1.1.Test2' message='Error output' details='Stack trace' flowId='1-1']" + Environment.NewLine - + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test2' duration='200' flowId='1-1']" + Environment.NewLine + + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test2' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testFailed name='Assembly1.Namespace1.1.Test2' message='Error output' details='Stack trace' flowId='1']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test2' duration='200' flowId='1']" + Environment.NewLine - + "##teamcity[testSuiteFinished name='Assembly1' flowId='1-1']" + Environment.NewLine + + "##teamcity[testSuiteFinished name='Assembly1' flowId='1']" + Environment.NewLine - + "##teamcity[testSuiteStarted name='Assembly2' flowId='1-6']" + Environment.NewLine - + "##teamcity[testStarted name='Assembly2.Namespace2.1.Test1' captureStandardOutput='false' flowId='1-6']" + Environment.NewLine - + "##teamcity[testStdOut name='Assembly2.Namespace2.1.Test1' out='Text output' flowId='1-6' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine - + "##teamcity[testFinished name='Assembly2.Namespace2.1.Test1' duration='300' flowId='1-6']" + Environment.NewLine + + "##teamcity[testSuiteStarted name='Assembly2' flowId='1']" + Environment.NewLine + + "##teamcity[testStarted name='Assembly2.Namespace2.1.Test1' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testStdOut name='Assembly2.Namespace2.1.Test1' out='Text output' flowId='1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly2.Namespace2.1.Test1' duration='300' flowId='1']" + Environment.NewLine + + + "##teamcity[testSuiteFinished name='Assembly2' flowId='1']" + Environment.NewLine, + _output.ToString()); + } + + [Test] + public void ShouldSendMessagesWithValidFlowIdWhenTestsFromNUnit2AndSeveralAssembliesSimultaneously() + { + // Given + var publisher = CreateInstance(); + + // When + publisher.RegisterMessage(CreateStartRun(1)); + + // Assembly 1 + publisher.RegisterMessage(CreateStartSuite("1-1", null, "aaa" + Path.DirectorySeparatorChar + "Assembly1")); + + // Assembly 2 + publisher.RegisterMessage(CreateStartSuite("2-6", null, "ddd" + Path.DirectorySeparatorChar + "Assembly2")); + + publisher.RegisterMessage(CreateStartSuite("1-2", null, "Assembly1.Namespace1")); + publisher.RegisterMessage(CreateStartSuite("1-3", null, "Assembly1.Namespace1.1")); + + // Test Assembly1.Namespace1.1.Test1 + publisher.RegisterMessage(CreateStartTest("1-4", null, "Assembly1.Namespace1.1.Test1")); + publisher.RegisterMessage(CreateTestCaseSuccessful("1-4", null, "Assembly1.Namespace1.1.Test1", "0.1", "Text output")); + + // Test Assembly1.Namespace1.1.Test2 + publisher.RegisterMessage(CreateStartTest("1-5", null, "Assembly1.Namespace1.1.Test2")); + publisher.RegisterMessage(CreateTestCaseFailed("1-5", null, "Assembly1.Namespace1.1.Test2", "0.2", "Error output", "Stack trace")); + + publisher.RegisterMessage(CreateFinishSuite("1-3", null, "Assembly1.Namespace1.1")); + publisher.RegisterMessage(CreateFinishSuite("1-2", null, "Assembly1.Namespace1")); + + publisher.RegisterMessage(CreateStartSuite("2-7", null, "Assembly2.Namespace2")); + + // Test Assembly2.Namespace2.1.Test1 + publisher.RegisterMessage(CreateStartTest("2-8", null, "Assembly2.Namespace2.1.Test1")); + publisher.RegisterMessage(CreateTestCaseSuccessful("2-8", null, "Assembly2.Namespace2.1.Test1", "0.3", "Text output")); + + publisher.RegisterMessage(CreateFinishSuite("2-7", null, "Assembly2.Namespace2")); + publisher.RegisterMessage(CreateFinishSuite("2-6", null, "Assembly2")); + publisher.RegisterMessage(CreateFinishSuite("1-1", null, "Assembly1")); + + publisher.RegisterMessage(CreateTestRun()); + + // Then + Assert.AreEqual( + "##teamcity[testSuiteStarted name='Assembly1' flowId='1']" + Environment.NewLine + + "##teamcity[testSuiteStarted name='Assembly2' flowId='2']" + Environment.NewLine + + + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testStdOut name='Assembly1.Namespace1.1.Test1' out='Text output' flowId='1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='100' flowId='1']" + Environment.NewLine + + + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test2' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testFailed name='Assembly1.Namespace1.1.Test2' message='Error output' details='Stack trace' flowId='1']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test2' duration='200' flowId='1']" + Environment.NewLine + + + "##teamcity[testStarted name='Assembly2.Namespace2.1.Test1' captureStandardOutput='false' flowId='2']" + Environment.NewLine + + "##teamcity[testStdOut name='Assembly2.Namespace2.1.Test1' out='Text output' flowId='2' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly2.Namespace2.1.Test1' duration='300' flowId='2']" + Environment.NewLine + + + "##teamcity[testSuiteFinished name='Assembly2' flowId='2']" + Environment.NewLine + +"##teamcity[testSuiteFinished name='Assembly1' flowId='1']" + Environment.NewLine, - + "##teamcity[testSuiteFinished name='Assembly2' flowId='1-6']" + Environment.NewLine, _output.ToString()); } @@ -314,14 +375,14 @@ public void ShouldSendMessagesWithValidFlowIdWhenHas1SuiteFromNUnit2() publisher.RegisterMessage(CreateTestRun()); // Then - Assert.AreEqual( - "##teamcity[testSuiteStarted name='Assembly1' flowId='1-1']" + Environment.NewLine + Assert.AreEqual( + "##teamcity[testSuiteStarted name='Assembly1' flowId='1']" + Environment.NewLine - + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1-1']" + Environment.NewLine - + "##teamcity[testStdOut name='Assembly1.Namespace1.1.Test1' out='Text output' flowId='1-1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine - + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='1300' flowId='1-1']" + Environment.NewLine + + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testStdOut name='Assembly1.Namespace1.1.Test1' out='Text output' flowId='1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='1300' flowId='1']" + Environment.NewLine - + "##teamcity[testSuiteFinished name='Assembly1' flowId='1-1']" + Environment.NewLine, + + "##teamcity[testSuiteFinished name='Assembly1' flowId='1']" + Environment.NewLine, _output.ToString()); } @@ -341,10 +402,10 @@ public void ShouldSendMessagesWithValidFlowIdWhenHasNoSuiteFromNUnit2() publisher.RegisterMessage(CreateTestRun()); // Then - Assert.AreEqual( - "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1-1']" + Environment.NewLine - + "##teamcity[testStdOut name='Assembly1.Namespace1.1.Test1' out='Text output' flowId='1-1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine - + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='100' flowId='1-1']" + Environment.NewLine, + Assert.AreEqual( + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testStdOut name='Assembly1.Namespace1.1.Test1' out='Text output' flowId='1' tc:tags='tc:parseServiceMessagesInside']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='100' flowId='1']" + Environment.NewLine, _output.ToString()); } @@ -402,13 +463,13 @@ public void ShouldSendMessagesWhenOneTimeSetUpFailedFromNUnit2() // Then Assert.AreEqual( - "##teamcity[testSuiteStarted name='Assembly1' flowId='1-1']" + Environment.NewLine + "##teamcity[testSuiteStarted name='Assembly1' flowId='1']" + Environment.NewLine - + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1-1']" + Environment.NewLine - + "##teamcity[testFailed name='Assembly1.Namespace1.1.Test1' message='Error output' details='Stack trace' flowId='1-1']" + Environment.NewLine - + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='100' flowId='1-1']" + Environment.NewLine + + "##teamcity[testStarted name='Assembly1.Namespace1.1.Test1' captureStandardOutput='false' flowId='1']" + Environment.NewLine + + "##teamcity[testFailed name='Assembly1.Namespace1.1.Test1' message='Error output' details='Stack trace' flowId='1']" + Environment.NewLine + + "##teamcity[testFinished name='Assembly1.Namespace1.1.Test1' duration='100' flowId='1']" + Environment.NewLine - + "##teamcity[testSuiteFinished name='Assembly1' flowId='1-1']" + Environment.NewLine, + + "##teamcity[testSuiteFinished name='Assembly1' flowId='1']" + Environment.NewLine, _output.ToString()); } From 01fdcd52e1479447480d16b16dc3d58a4aafee0a Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Fri, 9 Sep 2016 12:04:02 +0300 Subject: [PATCH 2/3] #14 Erroneous TeamCity service messages with multiple test assemblies and (default) parallel execution - remove some tests to fix CI issue "Build execution time has reached the maximum allowed time for your plan (60 minutes)." --- src/nunit.integration.tests/RunTests.feature | 25 ---- .../RunTests.feature.cs | 125 +++++++----------- 2 files changed, 50 insertions(+), 100 deletions(-) diff --git a/src/nunit.integration.tests/RunTests.feature b/src/nunit.integration.tests/RunTests.feature index 6c6ccb1..2f2e038 100644 --- a/src/nunit.integration.tests/RunTests.feature +++ b/src/nunit.integration.tests/RunTests.feature @@ -47,17 +47,6 @@ Scenario Outline: User runs tests for several assemblies Examples: | frameworkVersion | process | domain | agents | platform | configurationType | - | Version45 | InProcess | Single | 10 | AnyCpu | ProjectFile | - | Version40 | InProcess | Single | 10 | AnyCpu | ProjectFile | - | Version45 | Separate | Single | 10 | AnyCpu | ProjectFile | - | Version40 | Separate | Single | 10 | AnyCpu | ProjectFile | - | Version45 | Multiple | Single | 10 | AnyCpu | ProjectFile | - | Version40 | Multiple | Single | 10 | AnyCpu | ProjectFile | - | Version45 | InProcess | Multiple | 10 | AnyCpu | ProjectFile | - | Version40 | InProcess | Multiple | 10 | AnyCpu | ProjectFile | - | Version45 | Separate | Multiple | 10 | AnyCpu | ProjectFile | - | Version40 | Separate | Multiple | 10 | AnyCpu | ProjectFile | - | Version45 | InProcess | Single | 10 | AnyCpu | ProjectFile | | Version40 | InProcess | Single | 2 | AnyCpu | ProjectFile | | Version45 | Separate | Single | 2 | AnyCpu | ProjectFile | | Version40 | Separate | Single | 2 | AnyCpu | ProjectFile | @@ -98,17 +87,6 @@ Examples: | Version40 | InProcess | Multiple | 2 | X86 | ProjectFile | | Version45 | Separate | Multiple | 2 | X86 | ProjectFile | | Version40 | Separate | Multiple | 2 | X86 | ProjectFile | - | Version45 | InProcess | Single | 10 | AnyCpu | CmdArguments | - | Version40 | InProcess | Single | 10 | AnyCpu | CmdArguments | - | Version45 | Separate | Single | 10 | AnyCpu | CmdArguments | - | Version40 | Separate | Single | 10 | AnyCpu | CmdArguments | - | Version45 | Multiple | Single | 10 | AnyCpu | CmdArguments | - | Version40 | Multiple | Single | 10 | AnyCpu | CmdArguments | - | Version45 | InProcess | Multiple | 10 | AnyCpu | CmdArguments | - | Version40 | InProcess | Multiple | 10 | AnyCpu | CmdArguments | - | Version45 | Separate | Multiple | 10 | AnyCpu | CmdArguments | - | Version40 | Separate | Multiple | 10 | AnyCpu | CmdArguments | - | Version45 | InProcess | Single | 10 | AnyCpu | CmdArguments | | Version40 | InProcess | Single | 2 | AnyCpu | CmdArguments | | Version45 | Separate | Single | 2 | AnyCpu | CmdArguments | | Version40 | Separate | Single | 2 | AnyCpu | CmdArguments | @@ -128,9 +106,6 @@ Examples: | Version40 | InProcess | Multiple | 1 | AnyCpu | CmdArguments | | Version45 | Separate | Multiple | 1 | AnyCpu | CmdArguments | | Version40 | Separate | Multiple | 1 | AnyCpu | CmdArguments | - | Version45 | Separate | Single | 10 | X86 | CmdArguments | - | Version40 | Separate | Single | 10 | X86 | CmdArguments | - | Version45 | Multiple | Single | 10 | X86 | CmdArguments | | Version40 | Multiple | Single | 10 | X86 | CmdArguments | | Version45 | Separate | Multiple | 10 | X86 | CmdArguments | | Version40 | Separate | Multiple | 10 | X86 | CmdArguments | diff --git a/src/nunit.integration.tests/RunTests.feature.cs b/src/nunit.integration.tests/RunTests.feature.cs index bbdbdaa..3f11c92 100644 --- a/src/nunit.integration.tests/RunTests.feature.cs +++ b/src/nunit.integration.tests/RunTests.feature.cs @@ -73,17 +73,6 @@ public virtual void FeatureBackground() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("User runs tests for several assemblies")] - [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "2", "AnyCpu", "ProjectFile", new string[0])] @@ -124,17 +113,6 @@ public virtual void FeatureBackground() [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "2", "X86", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "2", "X86", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "2", "X86", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "InProcess", "Single", "10", "AnyCpu", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "2", "AnyCpu", "CmdArguments", new string[0])] @@ -154,9 +132,6 @@ public virtual void FeatureBackground() [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "X86", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "X86", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "X86", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "X86", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "X86", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "X86", "CmdArguments", new string[0])] @@ -295,77 +270,77 @@ public virtual void UserRunsTestsForSeveralAssemblies(string frameworkVersion, s public virtual void UserRunsParallelizableTests(string frameworkVersion, string process, string domain, string agents, string platform, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("User runs parallelizable tests", exampleTags); -#line 153 +#line 128 this.ScenarioSetup(scenarioInfo); #line 3 this.FeatureBackground(); -#line 154 +#line 129 testRunner.Given(string.Format("Framework version is {0}", frameworkVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 155 +#line 130 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable1 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 156 +#line 131 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable2 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 157 +#line 132 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable3 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 158 +#line 133 testRunner.And("I have added attribute [assembly: NUnit.Framework.Parallelizable] to the assembly" + " foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 159 +#line 134 testRunner.And("I have added attribute [NUnit.Framework.Parallelizable] to the class Foo.Tests.Un" + "itTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 160 +#line 135 testRunner.And("I have added NUnit framework references to foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 161 +#line 136 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable4 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 162 +#line 137 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable5 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 163 +#line 138 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable6 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 164 +#line 139 testRunner.And("I have added attribute [assembly: NUnit.Framework.Parallelizable] to the assembly" + " foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 165 +#line 140 testRunner.And("I have added attribute [NUnit.Framework.Parallelizable] to the class Foo.Tests.Un" + "itTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 166 +#line 141 testRunner.And("I have added NUnit framework references to foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 167 +#line 142 testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 168 +#line 143 testRunner.And("I have copied NUnit framework references to folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 169 +#line 144 testRunner.And(string.Format("I have specified {0} platform for assembly foo1.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 170 +#line 145 testRunner.And("I have compiled the assembly foo1.tests to file mocks\\foo1.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 171 +#line 146 testRunner.And(string.Format("I have specified {0} platform for assembly foo2.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 172 +#line 147 testRunner.And("I have compiled the assembly foo2.tests to file mocks\\foo2.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 173 +#line 148 testRunner.And("I have added the assembly mocks\\foo1.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 174 +#line 149 testRunner.And("I have added the assembly mocks\\foo2.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 175 +#line 150 testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 176 +#line 151 testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 177 +#line 152 testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 178 +#line 153 testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 179 +#line 154 testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 180 +#line 155 testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 181 +#line 156 testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line 182 +#line 157 testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { @@ -386,7 +361,7 @@ public virtual void UserRunsParallelizableTests(string frameworkVersion, string table2.AddRow(new string[] { "Skipped", "0"}); -#line 183 +#line 158 testRunner.And("the Test Run Summary should has following:", ((string)(null)), table2, "And "); #line hidden this.ScenarioCleanup(); @@ -429,47 +404,47 @@ public virtual void UserRunsParallelizableTests(string frameworkVersion, string public virtual void UserRunsParallelizableTestsForNUnit2Framework(string frameworkVersion, string process, string domain, string agents, string platform, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("User runs parallelizable tests for NUnit 2 framework", exampleTags); -#line 234 +#line 209 this.ScenarioSetup(scenarioInfo); #line 3 this.FeatureBackground(); -#line 235 +#line 210 testRunner.And("I have added successful method as SuccessfulTest to the class Foo.Tests.UnitTests" + "1 for foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 236 +#line 211 testRunner.And("I have added successfulCatA method as SuccessfulTestCatA to the class Foo.Tests.U" + "nitTests1 for foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 237 +#line 212 testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 238 +#line 213 testRunner.And("I have added the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to " + "foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 239 +#line 214 testRunner.And("I have copied the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to" + " folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 240 +#line 215 testRunner.And(string.Format("I have specified {0} platform for assembly foo.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 241 +#line 216 testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 242 +#line 217 testRunner.And("I have added the assembly mocks\\foo.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 243 +#line 218 testRunner.And("I have added the arg Where=cat!=CatA to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 244 +#line 219 testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 245 +#line 220 testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 246 +#line 221 testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 247 +#line 222 testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 248 +#line 223 testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 249 +#line 224 testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 250 +#line 225 testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line 251 +#line 226 testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { @@ -490,7 +465,7 @@ public virtual void UserRunsParallelizableTestsForNUnit2Framework(string framewo table3.AddRow(new string[] { "Skipped", "0"}); -#line 252 +#line 227 testRunner.And("the Test Run Summary should has following:", ((string)(null)), table3, "And "); #line hidden this.ScenarioCleanup(); From ae3f55dbc3180caf78025d075e37c1305d68440b Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Fri, 9 Sep 2016 15:11:05 +0300 Subject: [PATCH 3/3] #14 Erroneous TeamCity service messages with multiple test assemblies and (default) parallel execution - fix CI --- src/nunit.integration.tests/RunTests.feature | 25 +--- .../RunTests.feature.cs | 109 ++++++++---------- 2 files changed, 51 insertions(+), 83 deletions(-) diff --git a/src/nunit.integration.tests/RunTests.feature b/src/nunit.integration.tests/RunTests.feature index 2f2e038..f48a337 100644 --- a/src/nunit.integration.tests/RunTests.feature +++ b/src/nunit.integration.tests/RunTests.feature @@ -66,12 +66,6 @@ Examples: | Version40 | InProcess | Multiple | 1 | AnyCpu | ProjectFile | | Version45 | Separate | Multiple | 1 | AnyCpu | ProjectFile | | Version40 | Separate | Multiple | 1 | AnyCpu | ProjectFile | - | Version45 | Separate | Single | 10 | X86 | ProjectFile | - | Version40 | Separate | Single | 10 | X86 | ProjectFile | - | Version45 | Multiple | Single | 10 | X86 | ProjectFile | - | Version40 | Multiple | Single | 10 | X86 | ProjectFile | - | Version45 | Separate | Multiple | 10 | X86 | ProjectFile | - | Version40 | Separate | Multiple | 10 | X86 | ProjectFile | | Version45 | Separate | Single | 1 | X86 | ProjectFile | | Version40 | Separate | Single | 1 | X86 | ProjectFile | | Version45 | Multiple | Single | 1 | X86 | ProjectFile | @@ -106,9 +100,6 @@ Examples: | Version40 | InProcess | Multiple | 1 | AnyCpu | CmdArguments | | Version45 | Separate | Multiple | 1 | AnyCpu | CmdArguments | | Version40 | Separate | Multiple | 1 | AnyCpu | CmdArguments | - | Version40 | Multiple | Single | 10 | X86 | CmdArguments | - | Version45 | Separate | Multiple | 10 | X86 | CmdArguments | - | Version40 | Separate | Multiple | 10 | X86 | CmdArguments | | Version45 | Separate | Single | 1 | X86 | CmdArguments | | Version40 | Separate | Single | 1 | X86 | CmdArguments | | Version45 | Multiple | Single | 1 | X86 | CmdArguments | @@ -175,8 +166,6 @@ Examples: | Version40 | InProcess | Multiple | 10 | AnyCpu | | Version45 | Separate | Multiple | 10 | AnyCpu | | Version40 | Separate | Multiple | 10 | AnyCpu | -# | Version45 | Multiple | Multiple | 10 | AnyCpu | -# | Version40 | Multiple | Multiple | 10 | AnyCpu | | Version45 | InProcess | Single | 1 | AnyCpu | | Version40 | InProcess | Single | 1 | AnyCpu | | Version45 | Separate | Single | 1 | AnyCpu | @@ -187,24 +176,18 @@ Examples: | Version40 | InProcess | Multiple | 1 | AnyCpu | | Version45 | Separate | Multiple | 1 | AnyCpu | | Version40 | Separate | Multiple | 1 | AnyCpu | -# | Version45 | Multiple | Multiple | 1 | AnyCpu | -# | Version40 | Multiple | Multiple | 1 | AnyCpu | | Version45 | Separate | Single | 10 | X86 | | Version40 | Separate | Single | 10 | X86 | | Version45 | Multiple | Single | 10 | X86 | | Version40 | Multiple | Single | 10 | X86 | | Version45 | Separate | Multiple | 10 | X86 | | Version40 | Separate | Multiple | 10 | X86 | -# | Version45 | Multiple | Multiple | 10 | X86 | -# | Version40 | Multiple | Multiple | 10 | X86 | | Version45 | Separate | Single | 1 | X86 | | Version40 | Separate | Single | 1 | X86 | | Version45 | Multiple | Single | 1 | X86 | | Version40 | Multiple | Single | 1 | X86 | | Version45 | Separate | Multiple | 1 | X86 | | Version40 | Separate | Multiple | 1 | X86 | -# | Version45 | Multiple | Multiple | 1 | X86 | -# | Version40 | Multiple | Multiple | 1 | X86 | Scenario Outline: User runs parallelizable tests for NUnit 2 framework And I have added successful method as SuccessfulTest to the class Foo.Tests.UnitTests1 for foo.tests @@ -256,21 +239,15 @@ Examples: | Version40 | InProcess | Multiple | 1 | AnyCpu | | Version45 | Separate | Multiple | 1 | AnyCpu | | Version40 | Separate | Multiple | 1 | AnyCpu | -# | Version45 | Multiple | Multiple | 1 | AnyCpu | -# | Version40 | Multiple | Multiple | 1 | AnyCpu | | Version45 | Separate | Single | 10 | X86 | | Version40 | Separate | Single | 10 | X86 | | Version45 | Multiple | Single | 10 | X86 | | Version40 | Multiple | Single | 10 | X86 | | Version45 | Separate | Multiple | 10 | X86 | | Version40 | Separate | Multiple | 10 | X86 | -# | Version45 | Multiple | Multiple | 10 | X86 | -# | Version40 | Multiple | Multiple | 10 | X86 | | Version45 | Separate | Single | 1 | X86 | | Version40 | Separate | Single | 1 | X86 | | Version45 | Multiple | Single | 1 | X86 | | Version40 | Multiple | Single | 1 | X86 | | Version45 | Separate | Multiple | 1 | X86 | - | Version40 | Separate | Multiple | 1 | X86 | -# | Version45 | Multiple | Multiple | 1 | X86 | -# | Version40 | Multiple | Multiple | 1 | X86 | \ No newline at end of file + | Version40 | Separate | Multiple | 1 | X86 | \ No newline at end of file diff --git a/src/nunit.integration.tests/RunTests.feature.cs b/src/nunit.integration.tests/RunTests.feature.cs index 3f11c92..5f2746e 100644 --- a/src/nunit.integration.tests/RunTests.feature.cs +++ b/src/nunit.integration.tests/RunTests.feature.cs @@ -92,12 +92,6 @@ public virtual void FeatureBackground() [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "1", "AnyCpu", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", "AnyCpu", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", "AnyCpu", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "10", "X86", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "10", "X86", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "10", "X86", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "X86", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "X86", "ProjectFile", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "X86", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "1", "X86", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "1", "X86", "ProjectFile", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "1", "X86", "ProjectFile", new string[0])] @@ -132,9 +126,6 @@ public virtual void FeatureBackground() [NUnit.Framework.TestCaseAttribute("Version40", "InProcess", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "1", "AnyCpu", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Multiple", "Single", "10", "X86", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Multiple", "10", "X86", "CmdArguments", new string[0])] - [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Multiple", "10", "X86", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Separate", "Single", "1", "X86", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version40", "Separate", "Single", "1", "X86", "CmdArguments", new string[0])] [NUnit.Framework.TestCaseAttribute("Version45", "Multiple", "Single", "1", "X86", "CmdArguments", new string[0])] @@ -270,77 +261,77 @@ public virtual void UserRunsTestsForSeveralAssemblies(string frameworkVersion, s public virtual void UserRunsParallelizableTests(string frameworkVersion, string process, string domain, string agents, string platform, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("User runs parallelizable tests", exampleTags); -#line 128 +#line 119 this.ScenarioSetup(scenarioInfo); #line 3 this.FeatureBackground(); -#line 129 +#line 120 testRunner.Given(string.Format("Framework version is {0}", frameworkVersion), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 130 +#line 121 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable1 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 131 +#line 122 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable2 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 132 +#line 123 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable3 to the " + "class Foo.Tests.UnitTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 133 +#line 124 testRunner.And("I have added attribute [assembly: NUnit.Framework.Parallelizable] to the assembly" + " foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 134 +#line 125 testRunner.And("I have added attribute [NUnit.Framework.Parallelizable] to the class Foo.Tests.Un" + "itTests1 for foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 135 +#line 126 testRunner.And("I have added NUnit framework references to foo1.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 136 +#line 127 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable4 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 137 +#line 128 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable5 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 138 +#line 129 testRunner.And("I have added SuccessfulParallelizable method as SuccessfulParallelizable6 to the " + "class Foo.Tests.UnitTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 139 +#line 130 testRunner.And("I have added attribute [assembly: NUnit.Framework.Parallelizable] to the assembly" + " foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 140 +#line 131 testRunner.And("I have added attribute [NUnit.Framework.Parallelizable] to the class Foo.Tests.Un" + "itTests1 for foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 141 +#line 132 testRunner.And("I have added NUnit framework references to foo2.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 142 +#line 133 testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 143 +#line 134 testRunner.And("I have copied NUnit framework references to folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 144 +#line 135 testRunner.And(string.Format("I have specified {0} platform for assembly foo1.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 145 +#line 136 testRunner.And("I have compiled the assembly foo1.tests to file mocks\\foo1.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 146 +#line 137 testRunner.And(string.Format("I have specified {0} platform for assembly foo2.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 147 +#line 138 testRunner.And("I have compiled the assembly foo2.tests to file mocks\\foo2.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 148 +#line 139 testRunner.And("I have added the assembly mocks\\foo1.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 149 +#line 140 testRunner.And("I have added the assembly mocks\\foo2.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 150 +#line 141 testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 151 +#line 142 testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 152 +#line 143 testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 153 +#line 144 testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 154 +#line 145 testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 155 +#line 146 testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 156 +#line 147 testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line 157 +#line 148 testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { @@ -361,7 +352,7 @@ public virtual void UserRunsParallelizableTests(string frameworkVersion, string table2.AddRow(new string[] { "Skipped", "0"}); -#line 158 +#line 149 testRunner.And("the Test Run Summary should has following:", ((string)(null)), table2, "And "); #line hidden this.ScenarioCleanup(); @@ -404,47 +395,47 @@ public virtual void UserRunsParallelizableTests(string frameworkVersion, string public virtual void UserRunsParallelizableTestsForNUnit2Framework(string frameworkVersion, string process, string domain, string agents, string platform, string[] exampleTags) { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("User runs parallelizable tests for NUnit 2 framework", exampleTags); -#line 209 +#line 192 this.ScenarioSetup(scenarioInfo); #line 3 this.FeatureBackground(); -#line 210 +#line 193 testRunner.And("I have added successful method as SuccessfulTest to the class Foo.Tests.UnitTests" + "1 for foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 211 +#line 194 testRunner.And("I have added successfulCatA method as SuccessfulTestCatA to the class Foo.Tests.U" + "nitTests1 for foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 212 +#line 195 testRunner.And("I have created the folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 213 +#line 196 testRunner.And("I have added the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to " + "foo.tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 214 +#line 197 testRunner.And("I have copied the reference ..\\..\\packages\\NUnit.2.6.4\\lib\\nunit.framework.dll to" + " folder mocks", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 215 +#line 198 testRunner.And(string.Format("I have specified {0} platform for assembly foo.tests", platform), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 216 +#line 199 testRunner.And("I have compiled the assembly foo.tests to file mocks\\foo.tests.dll", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 217 +#line 200 testRunner.And("I have added the assembly mocks\\foo.tests.dll to the list of testing assemblies", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 218 +#line 201 testRunner.And("I have added the arg Where=cat!=CatA to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 219 +#line 202 testRunner.And("I want to use CmdArguments type of TeamCity integration", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 220 +#line 203 testRunner.And("I have added the arg workers=10 to NUnit console command line", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 221 +#line 204 testRunner.And(string.Format("I have added the arg agents={0} to NUnit console command line", agents), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 222 +#line 205 testRunner.And(string.Format("I have added the arg process={0} to NUnit console command line", process), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 223 +#line 206 testRunner.And(string.Format("I have added the arg domain={0} to NUnit console command line", domain), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 224 +#line 207 testRunner.When("I run NUnit console", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 225 +#line 208 testRunner.Then("the exit code should be 0", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line 226 +#line 209 testRunner.And("the output should contain correct set of TeamCity service messages", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { @@ -465,7 +456,7 @@ public virtual void UserRunsParallelizableTestsForNUnit2Framework(string framewo table3.AddRow(new string[] { "Skipped", "0"}); -#line 227 +#line 210 testRunner.And("the Test Run Summary should has following:", ((string)(null)), table3, "And "); #line hidden this.ScenarioCleanup();