diff --git a/.gitignore b/.gitignore index 1d4ab3d..c4ad25f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,9 +22,7 @@ bld/ [Oo]bj/ [Ll]og/ -tools -!tools/packages.config -!src/ReportPortal.SpecFlowPlugin/tools +*.feature.cs # Visual Studio 2015 cache/options directory .vs/ diff --git a/test/ReportPortal.SpecFlowPlugin.Tests/ReportPortal.SpecFlowPlugin.IntegrationTests.csproj b/test/ReportPortal.SpecFlowPlugin.Tests/ReportPortal.SpecFlowPlugin.IntegrationTests.csproj index a58a8c6..185d957 100644 --- a/test/ReportPortal.SpecFlowPlugin.Tests/ReportPortal.SpecFlowPlugin.IntegrationTests.csproj +++ b/test/ReportPortal.SpecFlowPlugin.Tests/ReportPortal.SpecFlowPlugin.IntegrationTests.csproj @@ -11,56 +11,17 @@ + - - - True - True - AfterFeatureFails.feature - - - True - True - BeforeFeatureFails.feature - - - True - True - PassFeature.feature - - - True - True - ScenarioLevelHooks.feature - - - PreserveNewest - - SpecFlowSingleFileGenerator - AfterFeatureFails.feature.cs - - - - SpecFlowSingleFileGenerator - BeforeFeatureFails.feature.cs - - - SpecFlowSingleFileGenerator - PassFeature.feature.cs - - - SpecFlowSingleFileGenerator - ScenarioLevelHooks.feature.cs - diff --git a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/AfterFeatureFails.feature.cs b/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/AfterFeatureFails.feature.cs deleted file mode 100644 index c2ced04..0000000 --- a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/AfterFeatureFails.feature.cs +++ /dev/null @@ -1,90 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (http://www.specflow.org/). -// SpecFlow Version:2.4.0.0 -// SpecFlow Generator Version:2.4.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace ReportPortal.SpecFlowPlugin.IntegrationTests.Scenarios -{ - using TechTalk.SpecFlow; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "2.4.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("After Fails")] - [NUnit.Framework.CategoryAttribute("feature_should_fail_after")] - public partial class AfterFailsFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - -#line 1 "AfterFeatureFails.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "After Fails", null, ProgrammingLanguage.CSharp, new string[] { - "feature_should_fail_after"}); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void ScenarioTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("This scenario should pass because of feature fails after")] - public virtual void ThisScenarioShouldPassBecauseOfFeatureFailsAfter() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario should pass because of feature fails after", null, ((string[])(null))); -#line 4 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 5 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/BeforeFeatureFails.feature.cs b/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/BeforeFeatureFails.feature.cs deleted file mode 100644 index 1f53498..0000000 --- a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/BeforeFeatureFails.feature.cs +++ /dev/null @@ -1,96 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (http://www.specflow.org/). -// SpecFlow Version:2.4.0.0 -// SpecFlow Generator Version:2.4.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace ReportPortal.SpecFlowPlugin.IntegrationTests.Scenarios -{ - using TechTalk.SpecFlow; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "2.4.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("Before Fails")] - [NUnit.Framework.CategoryAttribute("feature_should_fail_before")] - public partial class BeforeFailsFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - -#line 1 "BeforeFeatureFails.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Before Fails", "\tBefore Feature hook fails", ProgrammingLanguage.CSharp, new string[] { - "feature_should_fail_before"}); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void ScenarioTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("This scenario should fail because of feature fails before")] - public virtual void ThisScenarioShouldFailBecauseOfFeatureFailsBefore() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario should fail because of feature fails before", null, ((string[])(null))); -#line 5 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 6 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 7 - testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 8 - testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 9 - testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/PassFeature.feature.cs b/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/PassFeature.feature.cs deleted file mode 100644 index bc3d506..0000000 --- a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/PassFeature.feature.cs +++ /dev/null @@ -1,120 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (http://www.specflow.org/). -// SpecFlow Version:2.4.0.0 -// SpecFlow Generator Version:2.4.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace ReportPortal.SpecFlowPlugin.IntegrationTests.Scenarios -{ - using TechTalk.SpecFlow; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "2.4.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("Pass")] - public partial class PassFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - -#line 1 "PassFeature.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Pass", "\tAll scenarios in this feature are passed", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void ScenarioTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Pass Scenario 1")] - [NUnit.Framework.CategoryAttribute("mytag")] - public virtual void PassScenario1() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Pass Scenario 1", null, new string[] { - "mytag"}); -#line 5 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 6 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 7 - testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 8 - testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 9 - testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Pass Scenario 2")] - [NUnit.Framework.CategoryAttribute("mytag")] - [NUnit.Framework.CategoryAttribute("super_super_tag")] - public virtual void PassScenario2() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Pass Scenario 2", null, new string[] { - "mytag", - "super_super_tag"}); -#line 12 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 13 - testRunner.Given("I have entered 3 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 14 - testRunner.And("I have entered 7 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line 15 - testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line 16 - testRunner.Then("the result should be 10 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/ScenarioLevelHooks.feature.cs b/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/ScenarioLevelHooks.feature.cs deleted file mode 100644 index d16360e..0000000 --- a/test/ReportPortal.SpecFlowPlugin.Tests/Scenarios/ScenarioLevelHooks.feature.cs +++ /dev/null @@ -1,170 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (http://www.specflow.org/). -// SpecFlow Version:2.4.0.0 -// SpecFlow Generator Version:2.4.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace ReportPortal.SpecFlowPlugin.IntegrationTests.Scenarios -{ - using TechTalk.SpecFlow; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "2.4.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("Scenario Level Hooks")] - public partial class ScenarioLevelHooksFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - -#line 1 "ScenarioLevelHooks.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenario Level Hooks", null, ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void ScenarioTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Should Fail In ScenarioBefore hook")] - [NUnit.Framework.CategoryAttribute("scenario_should_fail_before")] - public virtual void ShouldFailInScenarioBeforeHook() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Should Fail In ScenarioBefore hook", null, new string[] { - "scenario_should_fail_before"}); -#line 5 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 6 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Should Fail In ScenarioAfter hook")] - [NUnit.Framework.CategoryAttribute("scenario_should_fail_after")] - public virtual void ShouldFailInScenarioAfterHook() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Should Fail In ScenarioAfter hook", null, new string[] { - "scenario_should_fail_after"}); -#line 9 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 10 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Should Pass")] - public virtual void ShouldPass() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Should Pass", null, ((string[])(null))); -#line 12 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 13 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Should fail in step")] - public virtual void ShouldFailInStep() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Should fail in step", null, ((string[])(null))); -#line 15 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 16 - testRunner.Then("I execute failed step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Should fail because of step fails before")] - [NUnit.Framework.CategoryAttribute("step_should_fail_before")] - public virtual void ShouldFailBecauseOfStepFailsBefore() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Should fail because of step fails before", null, new string[] { - "step_should_fail_before"}); -#line 19 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 20 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 21 - testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Should fail because of step fails after")] - [NUnit.Framework.CategoryAttribute("step_should_fail_after")] - public virtual void ShouldFailBecauseOfStepFailsAfter() - { - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Should fail because of step fails after", null, new string[] { - "step_should_fail_after"}); -#line 24 -this.ScenarioInitialize(scenarioInfo); - this.ScenarioStart(); -#line 25 - testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line 26 - testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion