diff --git a/.gitignore b/.gitignore index e8e57ec7e..89048f442 100644 --- a/.gitignore +++ b/.gitignore @@ -82,9 +82,15 @@ src/Pickles/PrecompiledWeb/ # FAKE stuff packages/FAKE/ packages/Chocolatey/ +packages/NUnit.ConsoleRunner/ # Fody !src/Pickles/packages/Fody*/build/* src/Pickles/.vs/config/applicationhost.config src/Pickles/Pickles/PortabilityAnalysis.html src/Pickles/.vs/config/applicationhost.config +TestResult.xml + +# test harness +test-harness/packages/ +node_modules/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ed770b3..5ac56e826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,16 +14,24 @@ Features in Experimental are subject to change and removal without being conside This document is formatted according to the principles of [Keep A CHANGELOG](http://keepachangelog.com). +## [2.6.2] - 2016-05-11 + +### Fixed + +- Command line help does not list all possible test result formats ([340](https://github.com/picklesdoc/pickles/issues/340)) (by [@magicmonty](https://github.com/magicmonty)). +- Some examples were not recognized ([#343](https://github.com/picklesdoc/pickles/issues/343)) (by [@danielpullwitt](https://github.com/danielpullwitt)). + + ## [2.6.1] - 2016-05-10 ### Changed -- Remove Dependency on AutoMapper ([#333](https://github.com/picklesdoc/pickles/issues/323)) (by [@dirkrombauts](https://github.com/dirkrombauts)). +- Remove Dependency on AutoMapper ([#333](https://github.com/picklesdoc/pickles/issues/333)) (by [@dirkrombauts](https://github.com/dirkrombauts)). - Update DHTML version to use Knockout version 3.4.0 ([#325](https://github.com/picklesdoc/pickles/issues/325)) (by [@dirkrombauts](https://github.com/dirkrombauts)). ### Fixed -- General handling of special characters in scenario outline inputs, and XUnit failed, if multiple TestResults.xml were used ([336]()) (by [@magicmonty](https://github.com/magicmonty)). +- General handling of special characters in scenario outline inputs, and XUnit failed, if multiple TestResults.xml were used ([336](https://github.com/picklesdoc/pickles/issues/336)) (by [@magicmonty](https://github.com/magicmonty)). - SpecFlow conformant name mapping in other test result providers ([#326](https://github.com/picklesdoc/pickles/issues/326)) (by [@danielpullwitt](https://github.com/danielpullwitt)). ## [2.6.0] - 2016-04-12 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b53844806..6dc764fca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,18 +12,46 @@ Pickles is a volunteer effort. We encourage you to pitch in! ### To Contribute to the Test Results Providers -If you find a bug in a Test Result Provider and want to contribute towards fixing it, start of by adding a scenario or feature file that shows off the bug to the test harness solution in the [pickles-testresults repository](https://github.com/picklesdoc/pickles-testresults). Add the scenario to the projects of each test result provider: it is quite likely that the same bug will occur across several test result providers. Don't forget the Cucumber and CucumberJS providers: it's easy to overlook them because they are not in the visual studio solution. +If you find a bug in a Test Result Provider and want to contribute towards fixing it, start of by adding a scenario or feature file that shows off the bug to the test harness solution in the `test-harness` directory.. Add the scenario to the projects of each test result provider: it is quite likely that the same bug will occur across several test result providers. Don't forget the Cucumber and CucumberJS providers: it's easy to overlook them because they are not in the visual studio solution. Implement the automation layer in .NET, Ruby and JS if you are able. If you create your scenarios so that they use only steps from the other feature files, then you will most likely not need this step. -Use the `CreateTestresults.cmd` script to create test result files and to deploy them to the source code of Pickles. This step depends on you having checked out the `pickles` and `pickles-testresults` repositories in the same parent directory. +Use the `CreateTestresults.cmd` script to create test result files and to deploy them to the source code of Pickles. Please remember to build the `TestHarness.sln` solution first! Extend the set of unit tests for the unit test providers. Your best bet is to add test scenarios to the [Standard Test Suite](https://github.com/picklesdoc/pickles/blob/develop/src/Pickles/Pickles.TestFrameworks.UnitTests/StandardTestSuite.cs). Now comes the boring part: for each class that derives from `StandardTestSuite`, add methods in that class that call the test scenarios that you added in `StandardTestSuite`. -You will now have several failing tests. You can now go and fix them :-) +You will now have several failing tests. You can now go and fix them :-) Once you're done, send a pull request. +#### Setting up the Test Harness + +the `test-harness` directory contains the scenarios from which test results are derived to test the parsing of test results in Pickles + +##### .NET Code + +The .NET code is found in `./TestHarness/TestHarness.sln` solution. You will need [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx) in order to open the solution; the free Community version is fine. Remember to restore the NuGet packages before you compile. + +##### Cucumber/Ruby Code + +In order to generate the thest output of the Cucumber features, you need to install the following software: + +- [Ruby](http://rubyinstaller.org/downloads): use the stable 2.2.x version +- Install Cucumber by opening an admin-enabled command line window in the directory where you cloned this repository, and running these gem commands: + - `gem install cucumber` + - `gem install rspec` + + +##### CucumberJS/JS Code + +In order to generate the test output of the CucumberJS features, you need to install the following software: + +- [Node.js](https://nodejs.org/en/download/): the LTE version is good enough. You may have to restart your computer. You can optionally verify the installation of Node.js by running these two commands from a command line: + - `node -v` + - `npm -v` +- Install CucumberJS by opening an admin-enabled command line window in the directory where you cloned this repository, and running the `npm install --save-dev cucumber` command. + + ## To Contribute Documentation - Fork the `doc` repository diff --git a/CreateTestresults.cmd b/CreateTestresults.cmd new file mode 100644 index 000000000..714dfe4e9 --- /dev/null +++ b/CreateTestresults.cmd @@ -0,0 +1,41 @@ +@echo off +@pushd %~dp0 + +ECHO Remember to build the solution first! + +"%~dp0\test-harness\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe" "%~dp0\test-harness\nunit\bin\Debug\nunitHarness.dll" /result="%~dp0\results-example-nunit.xml" + +"%~dp0\test-harness\packages\NUnit.Console.3.0.0\tools\nunit3-console.exe" "%~dp0\test-harness\nunit3\bin\Debug\nunit3Harness.dll" /result="%~dp0\results-example-nunit3.xml" + +"%~dp0\test-harness\packages\SpecRun.Runner.1.2.0\tools\specrun.exe" run default.srprofile "/baseFolder:%~dp0\test-harness\SpecRun\bin\Debug" /log:specrun.log /report:"%~dp0\results-example-specrun.html" + +"%~dp0\test-harness\packagesNonNuget\xunit.runner\xunit.console.clr4.exe" "%~dp0\test-harness\xunit\bin\Debug\xunitHarness.dll" /xml "%~dp0\results-example-xunit.xml" + +"%~dp0\test-harness\packages\xunit.runner.console.2.1.0\tools\xunit.console.exe" "%~dp0\test-harness\xunit2\bin\Debug\xunit2Harness.dll" -xml "%~dp0\results-example-xunit2.xml" -parallel none + +del "%~dp0\results-example-mstest.trx" +"%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe" /testcontainer:"%~dp0\test-harness\mstest\bin\Debug\mstestHarness.dll" /resultsfile:"%~dp0\results-example-mstest.trx" /testsettings:"%~dp0\test-harness\TestSettings.testsettings" + +cd "%~dp0\test-harness\Cucumber" +call cucumber --format json_pretty --out "%~dp0\results-example-json.json" --tags ~@ignore +cd "%~dp0" + +cd "%~dp0\test-harness\CucumberJS" +call ..\..\node_modules\.bin\cucumber-js --format json:"..\..\results-example-cucumberjs-json.json" --tags ~@ignore +cd "%~dp0" + +rmdir /s /q "%~dp0\TestResults\" +"%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "%~dp0\test-harness\mstest\bin\Debug\mstestHarness.dll" /logger:trx +FOR /R "%~dp0\TestResults\" %%G IN (*.trx) DO move "%%G" "%~dp0\results-example-vstest.trx" + +move "%~dp0\results-example-nunit.xml" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\NUnit\NUnit2\" +move "%~dp0\results-example-nunit3.xml" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\NUnit\NUnit3\" +move "%~dp0\results-example-xunit.xml" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\XUnit\XUnit1\" +move "%~dp0\results-example-xunit2.xml" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\XUnit\XUnit2\" +move "%~dp0\results-example-specrun.html" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\SpecRun\" +move "%~dp0\results-example-json.json" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\CucumberJSON\" +move "%~dp0\results-example-mstest.trx" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\MsTest\" +move "%~dp0\results-example-cucumberjs-json.json" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\CucumberJSON\" +move "%~dp0\results-example-vstest.trx" "%~dp0\src\Pickles\Pickles.TestFrameworks.UnitTests\VsTest\" + +@popd diff --git a/README.md b/README.md index 30c972c8f..ea8f7534e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Supported Test Runner Integrations Contributing ------------ -It's easy to contribute to Pickles, just setup an account on github and fork the project. When you have some code to contribute, send a pull request! There are plenty of ideas for contributions on the wiki and in the issues list. +Pickles welcomes contributions from the community! Please refer to [Contributing.md](https://github.com/picklesdoc/pickles/blob/develop/CONTRIBUTING.md) for more information on how to contribute and how to set up your environment. License ------- diff --git a/build.bat b/build.bat index 868a7eeac..66d812577 100644 --- a/build.bat +++ b/build.bat @@ -1,13 +1,16 @@ @echo off -set "picklesVersion=2.6.1" +set "picklesVersion=2.6.2" cls "packages\nuget\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion" "packages\nuget\NuGet.exe" "Install" "Chocolatey" "-OutputDirectory" "packages" "-ExcludeVersion" +"packages\nuget\NuGet.exe" "Install" "NUnit.ConsoleRunner" "-OutputDirectory" "packages" "-ExcludeVersion" "packages\nuget\NuGet.exe" "Restore" "src\Pickles\Pickles.sln" "packages\FAKE\tools\Fake.exe" build.fsx --envvar version %picklesVersion% +"packages\FAKE\tools\Fake.exe" test.fsx --envvar version %picklesVersion% +if errorlevel 1 goto handleerror1orhigher "packages\FAKE\tools\Fake.exe" nuget.fsx --envvar version %picklesVersion% "packages\FAKE\tools\Fake.exe" chocolatey.fsx --envvar version %picklesVersion% diff --git a/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs b/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs index 98d38fd13..82530823a 100644 --- a/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs +++ b/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs @@ -41,7 +41,8 @@ public class WhenParsingCommandLineArguments : BaseFixture " directory where output files will be placed" + "{0}" + " --trfmt, --test-results-format=VALUE" + "{0}" + " the format of the linked test results " + "{0}" + - " (nunit|xunit)" + "{0}" + + " (nunit|nunit3|xunit|xunit2|mstest " + "{0}" + + " |cucumberjson|specrun|vstest)" + "{0}" + " --lr, --link-results-file=VALUE" + "{0}" + " the path to the linked test results file (can be " + "{0}" + " a semicolon-separated list of files)" + "{0}" + diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromJSResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromJSResultsFileWithIndividualResults.cs index 266ac7471..b18bed901 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromJSResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromJSResultsFileWithIndividualResults.cs @@ -62,5 +62,11 @@ public WhenParsingCucumberJsonFromJSResultsFileWithIndividualResults() { base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromRubyResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromRubyResultsFileWithIndividualResults.cs index 53bc5e85b..165eec77e 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromRubyResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/WhenParsingCucumberJsonFromRubyResultsFileWithIndividualResults.cs @@ -62,5 +62,11 @@ public WhenParsingCucumberJsonFromRubyResultsFileWithIndividualResults() { base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-cucumberjs-json.json b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-cucumberjs-json.json index b2815df2e..eb9fe8709 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-cucumberjs-json.json +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-cucumberjs-json.json @@ -1368,6 +1368,52 @@ } } ] + }, + { + "name": "Deal correctly with overlong example values", + "id": "Scenario-Outlines;deal-correctly-with-overlong-example-values", + "line": 88, + "keyword": "Scenario", + "description": "", + "type": "scenario", + "steps": [ + { + "name": "I have a field with value 'Please enter a valid two letter country code (e.g. DE)!'", + "line": 82, + "keyword": "When ", + "result": { + "status": "passed", + "duration": 80965 + }, + "match": { + "location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:37" + } + }, + { + "name": "I have a field with value 'This is just a very very very veery long error message!'", + "line": 83, + "keyword": "And ", + "result": { + "status": "passed", + "duration": 54167 + }, + "match": { + "location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:37" + } + }, + { + "name": "the scenario will 'pass_1'", + "line": 84, + "keyword": "Then ", + "result": { + "status": "passed", + "duration": 54736 + }, + "match": { + "location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7" + } + } + ] } ] }, diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-json.json b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-json.json index 6bd36ffd8..e2c7bc11b 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-json.json +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/CucumberJson/results-example-json.json @@ -1480,6 +1480,52 @@ } } ] + }, + { + "id": "scenario-outlines;deal-correctly-with-overlong-example-values;;2", + "keyword": "Scenario Outline", + "name": "Deal correctly with overlong example values", + "description": "", + "line": 88, + "type": "scenario", + "steps": [ + { + "keyword": "When ", + "name": "I have a field with value 'Please enter a valid two letter country code (e.g. DE)!'", + "line": 88, + "match": { + "location": "features/step_definitions/ScenarioOutlineSteps.rb:25" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "And ", + "name": "I have a field with value 'This is just a very very very veery long error message!'", + "line": 88, + "match": { + "location": "features/step_definitions/ScenarioOutlineSteps.rb:25" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the scenario will 'pass_1'", + "line": 88, + "match": { + "location": "features/step_definitions/ScenarioOutlineSteps.rb:1" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] } ] }, diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/WhenParsingMsTestResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/WhenParsingMsTestResultsFileWithIndividualResults.cs index 0e7a8dc88..20c302c4e 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/WhenParsingMsTestResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/WhenParsingMsTestResultsFileWithIndividualResults.cs @@ -62,5 +62,11 @@ public WhenParsingMsTestResultsFileWithIndividualResults() { base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/results-example-mstest.trx b/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/results-example-mstest.trx index b3e62685a..4ce905140 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/results-example-mstest.trx +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/MsTest/results-example-mstest.trx @@ -1,8 +1,8 @@  - + These are default test settings for a local test run. - + @@ -10,14 +10,14 @@ - + - + - + This scenario contains examples with Regex-special characters - + FeatureTitle @@ -32,25 +32,25 @@ [] - + Not automated scenario 1 - + FeatureTitle Not Automated At All - + Adding several numbers - + Parameter:first number @@ -77,11 +77,11 @@ Addition - + And we can go totally bonkers with multiple example sections. - + FeatureTitle @@ -96,22 +96,22 @@ fail_2 - + Not automated scenario 3 - + FeatureTitle Not Automated At All - + - + This scenario contains examples with Regex-special characters - + FeatureTitle @@ -126,22 +126,22 @@ .* - + This is a scenario with parentheses, hyphen and comma (10-20, 30-40) - + FeatureTitle Scenarios With Special Characters - + - + This scenario contains examples with Regex-special characters - + FeatureTitle @@ -156,55 +156,55 @@ ++ - + Add two numbers - + FeatureTitle Failing Background - + Failing Feature Inconclusive Scenario - + FeatureTitle Failing - + Inconclusive Feature Inconclusive Scenario - + FeatureTitle Inconclusive - + Failing Feature Passing Scenario - + FeatureTitle Failing - + Deal correctly with backslashes in the examples - + FeatureTitle @@ -219,11 +219,11 @@ c:\Temp\ - + This is a scenario outline where one scenario fails - + FeatureTitle @@ -238,11 +238,11 @@ pass_2 - + And we can go totally bonkers with multiple example sections. - + FeatureTitle @@ -257,11 +257,11 @@ fail_1 - + - + This scenario contains examples with Regex-special characters - + FeatureTitle @@ -276,11 +276,11 @@ ^.*(?<foo>BAR)\s[^0-9]{3,4}A+$ - + - + This scenario contains examples with Regex-special characters - + FeatureTitle @@ -295,14 +295,14 @@ () - + Adding several numbers - + Parameter:first number @@ -312,10 +312,6 @@ VariantName 60 - - Parameter:result - 260 - Parameter:third number 130 @@ -328,12 +324,16 @@ FeatureTitle Addition + + Parameter:result + 260 + - + And we can go totally bonkers with multiple example sections. - + FeatureTitle @@ -348,41 +348,41 @@ pass_2 - + Failing Feature Failing Scenario - + FeatureTitle Failing - + Deal correctly with parenthesis in the examples - + FeatureTitle Scenario Outlines - VariantName + Parameter:overly descriptive field This is a description (and more) - Parameter:overly descriptive field + VariantName This is a description (and more) - + This is a scenario outline where one scenario is inconclusive - + FeatureTitle @@ -397,11 +397,11 @@ pass_1 - + This is a scenario outline where all scenarios pass - + FeatureTitle @@ -416,22 +416,22 @@ pass_2 - + Inconclusive Feature Passing Scenario - + FeatureTitle Inconclusive - + This is a scenario outline where one scenario is inconclusive - + FeatureTitle @@ -446,21 +446,21 @@ inconclusive_1 - + - + FeatureTitle Addition - + This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) - + FeatureTitle @@ -475,25 +475,25 @@ pass_1 - + Add two numbers - + FeatureTitle Addition - + This is a scenario outline where one scenario is inconclusive - + FeatureTitle @@ -508,11 +508,11 @@ pass_2 - + This is a scenario outline where one scenario fails - + FeatureTitle @@ -527,11 +527,11 @@ fail_1 - + And we can go totally bonkers with multiple example sections. - + FeatureTitle @@ -546,11 +546,11 @@ inconclusive_2 - + Adding several numbers - + Parameter:first number @@ -560,10 +560,6 @@ VariantName 60 - - Parameter:result - 260 - Parameter:third number 130 @@ -576,23 +572,27 @@ FeatureTitle Failing Background + + Parameter:result + 260 + - + Not automated scenario 2 - + FeatureTitle Not Automated At All - + This is a scenario outline where all scenarios pass - + FeatureTitle @@ -607,11 +607,34 @@ pass_1 - + + + + Deal correctly with overlong example values + + + + FeatureTitle + Scenario Outlines + + + VariantName + Please enter a valid two letter country code (e.g. DE)! + + + Parameter:value1 + Please enter a valid two letter country code (e.g. DE)! + + + Parameter:value2 + This is just a very very very veery long error message! + + + And we can go totally bonkers with multiple example sections. - + FeatureTitle @@ -626,22 +649,22 @@ pass_1 - + Passing Feature Passing Scenario - + FeatureTitle Passing - + - + This scenario contains examples with Regex-special characters - + FeatureTitle @@ -656,11 +679,11 @@ ** - + This is a scenario outline where all scenarios pass - + FeatureTitle @@ -675,11 +698,11 @@ pass_3 - + This is a scenario outline where one scenario fails - + FeatureTitle @@ -694,11 +717,11 @@ pass_1 - + - + This scenario contains examples with Regex-special characters - + FeatureTitle @@ -713,11 +736,11 @@ {} - + Adding several numbers - + Parameter:first number @@ -727,10 +750,6 @@ VariantName 40 - - Parameter:result - 180 - Parameter:third number 90 @@ -743,37 +762,41 @@ FeatureTitle Failing Background + + Parameter:result + 180 + - + Fail to add two numbers - + FeatureTitle Addition - + Not automated adding two numbers - + FeatureTitle Addition - + And we can go totally bonkers with multiple example sections. - + FeatureTitle @@ -788,7 +811,7 @@ inconclusive_1 - + @@ -796,53 +819,54 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -855,10 +879,10 @@ And I have entered 90 into the calculator When I press add -> done: AdditionSteps.WhenIPressAdd() (0,0s) Then the result should be 180 on the screen --> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(180) (0,1s) +-> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(180) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -874,7 +898,7 @@ Then the result should be 260 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(260) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -888,7 +912,7 @@ Then the result should be 3 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(3) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -919,13 +943,13 @@ System.FormatException: Die Eingabezeichenfolge hat das falsche Format. - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -988,13 +1012,13 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.AdditionFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Addition.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.AdditionFeature.NotAutomatedAddingTwoNumbers() in D:\Work\pickles-testresults\TestHarness\MsTest\Addition.feature:Zeile 46. + bei Pickles.TestHarness.MsTest.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Addition.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.AdditionFeature.NotAutomatedAddingTwoNumbers() in c:\Development\pickles-testresults\TestHarness\MsTest\Addition.feature:Zeile 46. - + Given the background step fails -> error: @@ -1025,21 +1049,21 @@ Shouldly.ChuckedAWobbly: 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei lambda_method(Closure , IContextManager ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_40() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_40() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - + Given the background step fails -> error: @@ -1070,21 +1094,21 @@ Shouldly.ChuckedAWobbly: 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei lambda_method(Closure , IContextManager ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_60() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_60() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - + Given the background step fails -> error: @@ -1113,20 +1137,20 @@ Shouldly.ChuckedAWobbly: 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei lambda_method(Closure , IContextManager ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddTwoNumbers() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 12. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 12. - + Then failing step -> error: @@ -1145,20 +1169,20 @@ Shouldly.ChuckedAWobbly: True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.MinimalFeatures.MinimalSteps.ThenFailingStep() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\MinimalFeatures\MinimalSteps.cs:Zeile 24. + bei AutomationLayer.MinimalFeatures.MinimalSteps.ThenFailingStep() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\MinimalFeatures\MinimalSteps.cs:Zeile 24. bei lambda_method(Closure , IContextManager ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 10. + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 10. - + Then inconclusive step -> pending: MinimalSteps.ThenInconclusiveStep() @@ -1171,19 +1195,19 @@ Shouldly.ChuckedAWobbly: bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureInconclusiveScenario() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 7. + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureInconclusiveScenario() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 7. - + Then passing step -> done: MinimalSteps.ThenPassingStep() (0,0s) - + Then inconclusive step -> pending: MinimalSteps.ThenInconclusiveStep() @@ -1196,25 +1220,25 @@ Shouldly.ChuckedAWobbly: bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.InconclusiveFeatureInconclusiveScenario() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature:Zeile 7. + bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.InconclusiveFeatureInconclusiveScenario() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature:Zeile 7. - + Then passing step -> done: MinimalSteps.ThenPassingStep() (0,0s) - + Then passing step -> done: MinimalSteps.ThenPassingStep() (0,0s) - + Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: @@ -1283,13 +1307,13 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario1() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 9. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario1() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 9. - + Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: @@ -1358,13 +1382,13 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario2() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 14. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario2() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 14. - + Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: @@ -1433,27 +1457,27 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario3() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 19. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario3() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 19. - + - + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Then the scenario will 'inconclusive_1' -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") @@ -1466,14 +1490,14 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'inconclusive_2' -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2") @@ -1486,14 +1510,14 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'fail_1' -> error: @@ -1512,21 +1536,21 @@ Shouldly.ChuckedAWobbly: True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei lambda_method(Closure , IContextManager , String ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'fail_2' -> error: @@ -1545,51 +1569,61 @@ Shouldly.ChuckedAWobbly: True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei lambda_method(Closure , IContextManager , String ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_2() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_2() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + When I have backslashes in the value, for example a 'c:\Temp\' -> done: ScenarioOutlineSteps.WhenIHaveBackslashesInTheValueForExampleAFilePath("c:\Temp\") (0,0s) - + + + When I have a field with value 'Please enter a valid two letter country code (e.g. DE)!' +-> done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("Please enter a va...") (0,0s) +And I have a field with value 'This is just a very very very veery long error message!' +-> done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("This is just a ve...") (0,0s) +Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) + + + When I have parenthesis in the value, for example an 'This is a description (and more)' -> done: ScenarioOutlineSteps.WhenIHaveParenthesisInTheValueForExampleAnOverlyDescriptiveField("This is a descrip...") (0,0s) - + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Then the scenario will 'pass_3' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_3") (0,0s) - + Then the scenario will 'fail_1' -> error: @@ -1608,33 +1642,33 @@ Shouldly.ChuckedAWobbly: True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei lambda_method(Closure , IContextManager , String ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 34. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails_Fail_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 34. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails_Fail_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Then the scenario will 'inconclusive_1' -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") @@ -1647,26 +1681,26 @@ Shouldly.ChuckedAWobbly: bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 21. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 21. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1674,7 +1708,7 @@ Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1688,7 +1722,7 @@ Then the result should be 120 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(120) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1698,7 +1732,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1708,7 +1742,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1718,7 +1752,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1728,7 +1762,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1738,7 +1772,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -1748,7 +1782,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenDeterminingTheSignatureOfAnNUnitExampleRow.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenDeterminingTheSignatureOfAnNUnitExampleRow.cs index 3f26f3ee3..ff99f0cae 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenDeterminingTheSignatureOfAnNUnitExampleRow.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenDeterminingTheSignatureOfAnNUnitExampleRow.cs @@ -18,10 +18,8 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using System.Text.RegularExpressions; -using Autofac; using NFluent; @@ -29,7 +27,7 @@ using PicklesDoc.Pickles.ObjectModel; using PicklesDoc.Pickles.Test; -using PicklesDoc.Pickles.TestFrameworks.NUnit; +using PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit2; namespace PicklesDoc.Pickles.TestFrameworks.UnitTests.NUnit.NUnit2 { @@ -42,20 +40,37 @@ public void ThenCanSuccessfullyMatch() var scenarioOutline = new ScenarioOutline { Name = "Adding several numbers" }; var exampleRow = new[] { "40", "50", "90" }; - var signatureBuilder = new NUnitExampleSignatureBuilder(); + var signatureBuilder = new NUnit2ExampleSignatureBuilder(); Regex signature = signatureBuilder.Build(scenarioOutline, exampleRow); var isMatch = signature.IsMatch("Pickles.TestHarness.AdditionFeature.AddingSeveralNumbers(\"40\",\"50\",\"90\",System.String[])".ToLowerInvariant()); Check.That(isMatch).IsTrue(); } + [Test] + public void ThenCanSuccessfullyMatchExamplesWithLongValues() + { + var scenarioOutline = new ScenarioOutline { Name = "Deal correctly with overlong example values" }; + var exampleRow = new[] + { + "Please enter a valid two letter country code (e.g. DE)!", + "This is just a very very very veery long error message!" + }; + + var signatureBuilder = new NUnit2ExampleSignatureBuilder(); + var signature = signatureBuilder.Build(scenarioOutline, exampleRow); + + var isMatch = signature.IsMatch("Pickles.TestHarness.nunit.ScenarioOutlinesFeature.DealCorrectlyWithOverlongExampleValues(\"Please enter a valid two letter country code (e.g. DE)!\",\"This is just a very very very veery long error message!\",null)".ToLowerInvariant()); + Check.That(isMatch).IsTrue(); + } + [Test] public void ThenCanSuccessfullyMatchSpecialCharacters() { var scenarioOutline = new ScenarioOutline { Name = "Adding several numbers (foo-bar, foo bar)" }; var exampleRow = new[] { "40", "50", "90" }; - var signatureBuilder = new NUnitExampleSignatureBuilder(); + var signatureBuilder = new NUnit2ExampleSignatureBuilder(); Regex signature = signatureBuilder.Build(scenarioOutline, exampleRow); var isMatch = signature.IsMatch("Pickles.TestHarness.AdditionFeature.AddingSeveralNumbersFoo_BarFooBar(\"40\",\"50\",\"90\",System.String[])".ToLowerInvariant()); diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenParsingNUnitResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenParsingNUnitResultsFileWithIndividualResults.cs index a50f55383..70934aaf7 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenParsingNUnitResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/WhenParsingNUnitResultsFileWithIndividualResults.cs @@ -18,7 +18,6 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using NUnit.Framework; @@ -63,5 +62,11 @@ public WhenParsingNUnitResultsFileWithIndividualResults() { base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/results-example-nunit.xml b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/results-example-nunit.xml index ee1b01958..4079f78a1 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/results-example-nunit.xml +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit2/results-example-nunit.xml @@ -1,25 +1,25 @@ - - + + - + - + - + - + - + - + - - + + @@ -27,7 +27,7 @@ - + @@ -43,8 +43,8 @@ bei System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.GetExecuteArguments(BindingMatch match) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() -bei Pickles.TestHarness.nunit.AdditionFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\nunit\Addition.feature.cs:Zeile 0. -bei Pickles.TestHarness.nunit.AdditionFeature.FailToAddTwoNumbers() in D:\Work\pickles-testresults\TestHarness\nunit\Addition.feature:Zeile 34. +bei Pickles.TestHarness.nunit.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit\Addition.feature.cs:Zeile 0. +bei Pickles.TestHarness.nunit.AdditionFeature.FailToAddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\nunit\Addition.feature:Zeile 34. ]]> @@ -53,7 +53,7 @@ bei Pickles.TestHarness.nunit.AdditionFeature.FailToAddTwoNumbers() in D:\Work\p - + - + - + - + - + - + - + - + - + - + @@ -189,7 +189,7 @@ bei Pickles.TestHarness.nunit.MinimalFeatures.FailingFeature.FailingFeatureFaili - + @@ -197,19 +197,19 @@ bei Pickles.TestHarness.nunit.MinimalFeatures.FailingFeature.FailingFeatureFaili MinimalSteps.ThenInconclusiveStep()]]> - + - + - + - + - + - + - + - + - + - + @@ -328,7 +328,7 @@ namespace MyNamespace ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2")]]> - + - + - + - + - + + + + + + - + - + - + - + - + - + - - + + - + - - + + - + + + - - diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenDeterminingTheSignatureOfAnNunit3ExampleRow.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenDeterminingTheSignatureOfAnNunit3ExampleRow.cs index cb3137517..eefa4484d 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenDeterminingTheSignatureOfAnNunit3ExampleRow.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenDeterminingTheSignatureOfAnNunit3ExampleRow.cs @@ -18,10 +18,8 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using System.Text.RegularExpressions; -using Autofac; using NFluent; @@ -29,7 +27,7 @@ using PicklesDoc.Pickles.ObjectModel; using PicklesDoc.Pickles.Test; -using PicklesDoc.Pickles.TestFrameworks.NUnit; +using PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit3; namespace PicklesDoc.Pickles.TestFrameworks.UnitTests.NUnit.NUnit3 { @@ -42,20 +40,37 @@ public void ThenCanSuccessfullyMatch() var scenarioOutline = new ScenarioOutline { Name = "Adding several numbers" }; var exampleRow = new[] { "40", "50", "90" }; - var signatureBuilder = new NUnitExampleSignatureBuilder(); + var signatureBuilder = new NUnit3ExampleSignatureBuilder(); Regex signature = signatureBuilder.Build(scenarioOutline, exampleRow); var isMatch = signature.IsMatch("AddingSeveralNumbers(\"40\",\"50\",\"90\",System.String[])".ToLowerInvariant()); Check.That(isMatch).IsTrue(); } + [Test] + public void ThenCanSuccessfullyMatchExamplesWithLongValues() + { + var scenarioOutline = new ScenarioOutline { Name = "Deal correctly with overlong example values" }; + var exampleRow = new[] + { + "Please enter a valid two letter country code (e.g. DE)!", + "This is just a very very very veery long error message!" + }; + + var signatureBuilder = new NUnit3ExampleSignatureBuilder(); + var signature = signatureBuilder.Build(scenarioOutline, exampleRow); + + var isMatch = signature.IsMatch("DealCorrectlyWithOverlongExampleValues(\"Please enter a valid two letter count...\",\"This is just a very very very veery l...\",null)".ToLowerInvariant()); + Check.That(isMatch).IsTrue(); + } + [Test] public void ThenCanSuccessfullyMatchSpecialCharacters() { var scenarioOutline = new ScenarioOutline { Name = "Adding several numbers (foo-bar, foo bar)" }; var exampleRow = new[] { "40", "50", "90" }; - var signatureBuilder = new NUnitExampleSignatureBuilder(); + var signatureBuilder = new NUnit3ExampleSignatureBuilder(); Regex signature = signatureBuilder.Build(scenarioOutline, exampleRow); var isMatch = signature.IsMatch("AddingSeveralNumbersFoo_BarFooBar(\"40\",\"50\",\"90\",System.String[])".ToLowerInvariant()); diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenParsingNUnitResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenParsingNUnitResultsFileWithIndividualResults.cs index fc89e1200..528cf2335 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenParsingNUnitResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/WhenParsingNUnitResultsFileWithIndividualResults.cs @@ -18,7 +18,6 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using NUnit.Framework; @@ -63,5 +62,11 @@ public WhenParsingNUnitResultsFileWithIndividualResults() { base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } \ No newline at end of file diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/results-example-nunit3.xml b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/results-example-nunit3.xml index 06ccdfea5..e0e5aa14e 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/results-example-nunit3.xml +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/NUnit/NUnit3/results-example-nunit3.xml @@ -1,44 +1,44 @@  - + - - + + - + - + - + - + - + - + - + - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) Given I have entered 60 into the calculator @@ -53,7 +53,7 @@ Then the result should be 260 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(260) (0,0s) ]]> - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) Given I have entered 40 into the calculator @@ -69,7 +69,7 @@ Then the result should be 180 on the screen ]]> - + @@ -86,10 +86,10 @@ Then the result should be 3 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(3) (0,0s) ]]> - + - + @@ -103,8 +103,8 @@ Then the result should be 3 on the screen bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.GetExecuteArguments(BindingMatch match) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.nunit3.AdditionFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\nunit3\Addition.feature.cs:Zeile 0. - bei Pickles.TestHarness.nunit3.AdditionFeature.FailToAddTwoNumbers() in D:\Work\pickles-testresults\TestHarness\nunit3\Addition.feature:Zeile 34.]]> + bei Pickles.TestHarness.nunit3.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\Addition.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.AdditionFeature.FailToAddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\nunit3\Addition.feature:Zeile 34.]]> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -118,7 +118,7 @@ Then the result should be 3.2 on the screen -> error: Die Eingabezeichenfolge hat das falsche Format. ]]> - + @@ -127,7 +127,7 @@ Then the result should be 3.2 on the screen - + @@ -191,21 +191,21 @@ Then unimplemented step ]]> - + - + - + + bei Pickles.TestHarness.nunit3.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\nunit3\FailingBackground.feature:Zeile 19.]]> error: @@ -244,7 +244,7 @@ Then the result should be 260 on the screen -> skipped because of previous errors ]]> - + + bei Pickles.TestHarness.nunit3.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\nunit3\FailingBackground.feature:Zeile 19.]]> error: @@ -284,7 +284,7 @@ Then the result should be 180 on the screen ]]> - + @@ -297,13 +297,13 @@ Then the result should be 180 on the screen 1]]> + bei Pickles.TestHarness.nunit3.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.FailingBackgroundFeature.AddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\nunit3\FailingBackground.feature:Zeile 12.]]> error: @@ -325,18 +325,18 @@ Then the result should be 120 on the screen ]]> - + - + - + @@ -349,13 +349,13 @@ Then the result should be 120 on the screen True]]> + bei Pickles.TestHarness.nunit3.MinimalFeatures.FailingFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\Minimal Features\Failing.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario() in c:\Development\pickles-testresults\TestHarness\nunit3\Minimal Features\Failing.feature:Zeile 10.]]> error: @@ -366,7 +366,7 @@ Then the result should be 120 on the screen True ]]> - + @@ -378,7 +378,7 @@ Then the result should be 120 on the screen -> pending: MinimalSteps.ThenInconclusiveStep() ]]> - + @@ -387,11 +387,11 @@ Then the result should be 120 on the screen ]]> - + - + @@ -403,7 +403,7 @@ Then the result should be 120 on the screen -> pending: MinimalSteps.ThenInconclusiveStep() ]]> - + @@ -412,11 +412,11 @@ Then the result should be 120 on the screen ]]> - + - + @@ -426,28 +426,28 @@ Then the result should be 120 on the screen - + - + - + bei Pickles.TestHarness.nunit3.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.NotAutomatedAtAllFeature.AddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\nunit3\NotAutomatedAtAll.feature:Zeile 11.]]> error: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. @@ -460,31 +460,31 @@ Then the result should be 120 on the screen ]]> - + - + - + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) ]]> - + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) ]]> - + @@ -493,7 +493,7 @@ Then the result should be 120 on the screen -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") ]]> - + @@ -502,7 +502,7 @@ Then the result should be 120 on the screen -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2") ]]> - + + bei Pickles.TestHarness.nunit3.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\nunit3\ScenarioOutlines.feature:Zeile 45.]]> error: @@ -529,7 +529,7 @@ Then the result should be 120 on the screen True ]]> - + + bei Pickles.TestHarness.nunit3.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\nunit3\ScenarioOutlines.feature:Zeile 45.]]> error: @@ -557,64 +557,78 @@ Then the result should be 120 on the screen ]]> - + - + done: ScenarioOutlineSteps.WhenIHaveBackslashesInTheValueForExampleAFilePath("c:\Temp\") (0,0s) ]]> - + + + + + + done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("Please enter a va...") (0,0s) +And I have a field with value 'This is just a very very very veery long error message!' +-> done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("This is just a ve...") (0,0s) +Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) +]]> + + + - + done: ScenarioOutlineSteps.WhenIHaveParenthesisInTheValueForExampleAnOverlyDescriptiveField("This is a descrip...") (0,0s) ]]> - + - + + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_3") (0,0s) +]]> + + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) ]]> - + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) -]]> - - - done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_3") (0,0s) ]]> - + - + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) ]]> - + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) ]]> - + + bei Pickles.TestHarness.nunit3.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\nunit3\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.nunit3.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\nunit3\ScenarioOutlines.feature:Zeile 34.]]> error: @@ -642,21 +656,21 @@ Then the result should be 120 on the screen ]]> - + - + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) ]]> - + done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) ]]> - + @@ -667,15 +681,15 @@ Then the result should be 120 on the screen - + - + - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) Then the scenario will 'pass_1' @@ -683,7 +697,7 @@ Then the scenario will 'pass_1' ]]> - + @@ -699,11 +713,20 @@ Then the result should be 120 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(120) (0,0s) ]]> - + - + + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '^.*(?BAR)\s[^0-9]{3,4}A+$' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("^.*(?BAR)\s[...") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) +]]> + + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) When I have special characters for regexes in the value, for example a '**' @@ -712,7 +735,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) ]]> - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) When I have special characters for regexes in the value, for example a '++' @@ -721,7 +744,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) ]]> - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) When I have special characters for regexes in the value, for example a '.*' @@ -730,7 +753,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) ]]> - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) When I have special characters for regexes in the value, for example a '[]' @@ -739,7 +762,7 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) ]]> - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) When I have special characters for regexes in the value, for example a '{}' @@ -748,22 +771,13 @@ Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) ]]> - + done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) When I have special characters for regexes in the value, for example a '()' -> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("()") (0,0s) Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) -]]> - - - done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -When I have special characters for regexes in the value, for example a '^.*(?BAR)\s[^0-9]{3,4}A+$' --> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("^.*(?BAR)\s[...") (0,0s) -Then the scenario will 'PASS' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) ]]> diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/WhenParsingSpecRunTestResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/WhenParsingSpecRunTestResultsFileWithIndividualResults.cs index 75afd4633..db2a67a67 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/WhenParsingSpecRunTestResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/WhenParsingSpecRunTestResultsFileWithIndividualResults.cs @@ -56,5 +56,11 @@ public WhenParsingSpecRunTestResultsFileWithIndividualResults() { base.ThenCanReadIndividualResultsFromScenarioOutline_MultipleExampleSections_ShouldBeTestResultFailed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/results-example-specrun.html b/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/results-example-specrun.html index 2307053f3..8a7c34d66 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/results-example-specrun.html +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/SpecRun/results-example-specrun.html @@ -182,6 +182,10 @@ <title>Deal correctly with parenthesis in the examples, This is a description (and more)</title> <result>Passed</result> </scenario> + <scenario> + <title>Deal correctly with overlong example values, Please enter a valid two letter country code (e.g. DE)!</title> + <result>Passed</result> + </scenario> </scenarios> </feature> <feature> diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/StandardTestSuiteForScenarioOutlines.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/StandardTestSuiteForScenarioOutlines.cs index 5a9a32eb6..526a0652c 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/StandardTestSuiteForScenarioOutlines.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/StandardTestSuiteForScenarioOutlines.cs @@ -21,7 +21,6 @@ using NFluent; -using NUnit.Framework; using PicklesDoc.Pickles.ObjectModel; @@ -163,5 +162,20 @@ public void ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestRe TestResult exampleResult7 = results.GetExampleResult(scenarioOutline, new[] { @"^.*(?BAR)\s[^0-9]{3,4}A+$" }); Check.That(exampleResult7).IsEqualTo(TestResult.Passed); } + + public void ThenCanReadExamplesWithLongExampleValues() + { + var results = ParseResultsFile(); + + var feature = new Feature { Name = "Scenario Outlines" }; + + var scenarioOutline = new ScenarioOutline { Name = "Deal correctly with overlong example values", Feature = feature }; + + TestResult exampleResultOutline = results.GetScenarioOutlineResult(scenarioOutline); + Check.That(exampleResultOutline).IsEqualTo(TestResult.Passed); + + TestResult exampleResult1 = results.GetExampleResult(scenarioOutline, new[] { "Please enter a valid two letter country code (e.g. DE)!", "This is just a very very very veery long error message!" }); + Check.That(exampleResult1).IsEqualTo(TestResult.Passed); + } } } diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/WhenParsingVsTestResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/WhenParsingVsTestResultsFileWithIndividualResults.cs index b8d0af789..c93cdcac0 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/WhenParsingVsTestResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/WhenParsingVsTestResultsFileWithIndividualResults.cs @@ -18,7 +18,6 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using NUnit.Framework; @@ -57,5 +56,11 @@ public WhenParsingVsTestResultsFileWithIndividualResults() { base.ThenCanReadIndividualResultsFromScenarioOutline_MultipleExampleSections_ShouldBeTestResultFailed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/results-example-vstest.trx b/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/results-example-vstest.trx index db2577f2d..0b5cf0f3a 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/results-example-vstest.trx +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/VsTest/results-example-vstest.trx @@ -1,15 +1,15 @@  - - - + + + - + - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -25,7 +25,7 @@ Then the result should be 260 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(260) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -41,7 +41,7 @@ Then the result should be 180 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(180) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -55,7 +55,7 @@ Then the result should be 3 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(3) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -86,14 +86,14 @@ System.FormatException: Die Eingabezeichenfolge hat das falsche Format. - - + + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -156,13 +156,13 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.AdditionFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Addition.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.AdditionFeature.NotAutomatedAddingTwoNumbers() in D:\Work\pickles-testresults\TestHarness\MsTest\Addition.feature:Zeile 46. + bei Pickles.TestHarness.MsTest.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Addition.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.AdditionFeature.NotAutomatedAddingTwoNumbers() in c:\Development\pickles-testresults\TestHarness\MsTest\Addition.feature:Zeile 46. - + Given the background step fails -> error: @@ -191,20 +191,20 @@ Shouldly.ChuckedAWobbly: 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei lambda_method(Closure , IContextManager ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddTwoNumbers() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 12. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 12. - + Given the background step fails -> error: @@ -235,21 +235,21 @@ Shouldly.ChuckedAWobbly: 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei lambda_method(Closure , IContextManager ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_60() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_60() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - + Given the background step fails -> error: @@ -280,21 +280,103 @@ Shouldly.ChuckedAWobbly: 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei lambda_method(Closure , IContextManager ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. - bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_40() in D:\Work\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature:Zeile 19. + bei Pickles.TestHarness.MsTest.FailingBackgroundFeature.AddingSeveralNumbers_40() in c:\Development\pickles-testresults\TestHarness\MsTest\FailingBackground.feature.cs:Zeile 0. - + + + Then passing step +-> done: MinimalSteps.ThenPassingStep() (0,0s) + + + + + Then inconclusive step +-> pending: MinimalSteps.ThenInconclusiveStep() + + Assert.Inconclusive failed. One or more step definitions are not implemented yet. + MinimalSteps.ThenInconclusiveStep() + bei lambda_method(Closure , String , Object[] ) + bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestInconclusive(String message) + bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestPending(String message) + bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() + bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureInconclusiveScenario() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 7. + + + + + + + Then failing step +-> error: + true + should be + False + but was + True + + Test method Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario threw exception: +Shouldly.ChuckedAWobbly: + true + should be + False + but was + True + bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. + bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. + bei AutomationLayer.MinimalFeatures.MinimalSteps.ThenFailingStep() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\MinimalFeatures\MinimalSteps.cs:Zeile 24. + bei lambda_method(Closure , IContextManager ) + bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() + bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 10. + + + + + + + Then passing step +-> done: MinimalSteps.ThenPassingStep() (0,0s) + + + + + Then inconclusive step +-> pending: MinimalSteps.ThenInconclusiveStep() + + Assert.Inconclusive failed. One or more step definitions are not implemented yet. + MinimalSteps.ThenInconclusiveStep() + bei lambda_method(Closure , String , Object[] ) + bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestInconclusive(String message) + bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestPending(String message) + bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() + bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() + bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.InconclusiveFeatureInconclusiveScenario() in c:\Development\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature:Zeile 7. + + + + + Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: @@ -363,13 +445,13 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario1() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 9. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario1() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 9. - + Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: @@ -438,13 +520,13 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario2() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 14. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario2() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 14. - + Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: @@ -513,43 +595,49 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario3() in D:\Work\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 19. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.NotAutomatedScenario3() in c:\Development\pickles-testresults\TestHarness\MsTest\NotAutomatedAtAll.feature:Zeile 19. - + + + Then passing step +-> done: MinimalSteps.ThenPassingStep() (0,0s) + + + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Then the scenario will 'pass_3' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_3") (0,0s) - + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Then the scenario will 'inconclusive_1' -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") @@ -562,26 +650,26 @@ namespace MyNamespace bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 21. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 21. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Then the scenario will 'fail_1' -> error: @@ -600,33 +688,33 @@ Shouldly.ChuckedAWobbly: True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei lambda_method(Closure , IContextManager , String ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 34. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails_Fail_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 34. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails_Fail_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + Then the scenario will 'pass_2' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) - + Then the scenario will 'inconclusive_1' -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") @@ -639,14 +727,14 @@ Shouldly.ChuckedAWobbly: bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'inconclusive_2' -> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2") @@ -659,14 +747,14 @@ Shouldly.ChuckedAWobbly: bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'fail_1' -> error: @@ -685,21 +773,21 @@ Shouldly.ChuckedAWobbly: True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei lambda_method(Closure , IContextManager , String ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_1() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_1() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + Then the scenario will 'fail_2' -> error: @@ -718,34 +806,44 @@ Shouldly.ChuckedAWobbly: True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei lambda_method(Closure , IContextManager , String ) bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. - bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_2() in D:\Work\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature:Zeile 45. + bei Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_2() in c:\Development\pickles-testresults\TestHarness\MsTest\ScenarioOutlines.feature.cs:Zeile 0. - + When I have backslashes in the value, for example a 'c:\Temp\' -> done: ScenarioOutlineSteps.WhenIHaveBackslashesInTheValueForExampleAFilePath("c:\Temp\") (0,0s) - + When I have parenthesis in the value, for example an 'This is a description (and more)' -> done: ScenarioOutlineSteps.WhenIHaveParenthesisInTheValueForExampleAnOverlyDescriptiveField("This is a descrip...") (0,0s) - - + + + When I have a field with value 'Please enter a valid two letter country code (e.g. DE)!' +-> done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("Please enter a va...") (0,0s) +And I have a field with value 'This is just a very very very veery long error message!' +-> done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("This is just a ve...") (0,0s) +Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) + + + + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -759,7 +857,7 @@ Then the result should be 120 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(120) (0,0s) - + Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) @@ -767,297 +865,319 @@ Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) - + - Then passing step --> done: MinimalSteps.ThenPassingStep() (0,0s) + Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '**' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("**") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + - Then inconclusive step --> pending: MinimalSteps.ThenInconclusiveStep() - - Assert.Inconclusive failed. One or more step definitions are not implemented yet. - MinimalSteps.ThenInconclusiveStep() - bei lambda_method(Closure , String , Object[] ) - bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestInconclusive(String message) - bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestPending(String message) - bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureInconclusiveScenario() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 7. - - + Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '++' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("++") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + - Then failing step --> error: - true - should be - False - but was - True - - Test method Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario threw exception: -Shouldly.ChuckedAWobbly: - true - should be - False - but was - True - bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. - bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.MinimalFeatures.MinimalSteps.ThenFailingStep() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\MinimalFeatures\MinimalSteps.cs:Zeile 24. - bei lambda_method(Closure , IContextManager ) - bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Failing.feature:Zeile 10. - - + Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '.*' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex(".*") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + - Then passing step --> done: MinimalSteps.ThenPassingStep() (0,0s) + Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '[]' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("[]") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + - Then inconclusive step --> pending: MinimalSteps.ThenInconclusiveStep() - - Assert.Inconclusive failed. One or more step definitions are not implemented yet. - MinimalSteps.ThenInconclusiveStep() - bei lambda_method(Closure , String , Object[] ) - bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestInconclusive(String message) - bei TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestPending(String message) - bei TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei TechTalk.SpecFlow.TestRunner.CollectScenarioErrors() - bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature.cs:Zeile 0. - bei Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.InconclusiveFeatureInconclusiveScenario() in D:\Work\pickles-testresults\TestHarness\MsTest\Minimal Features\Inconclusive.feature:Zeile 7. - - + Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '{}' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("{}") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + - Then passing step --> done: MinimalSteps.ThenPassingStep() (0,0s) + Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '()' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("()") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) + + + + + Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '^.*(?<foo>BAR)\s[^0-9]{3,4}A+$' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("^.*(?<foo>BAR)\s[...") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + - + - + - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - Test 'IgnoredAddingTwoNumbers' was skipped in the test run.Test 'NotAutomatedAddingTwoNumbers' was skipped in the test run.Test 'NotAutomatedScenario1' was skipped in the test run.Test 'NotAutomatedScenario2' was skipped in the test run.Test 'NotAutomatedScenario3' was skipped in the test run.Test 'ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1' was skipped in the test run.Test 'AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1' was skipped in the test run.Test 'AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2' was skipped in the test run.Test 'FailingFeatureInconclusiveScenario' was skipped in the test run.Test 'InconclusiveFeatureInconclusiveScenario' was skipped in the test run. + Test 'IgnoredAddingTwoNumbers' was skipped in the test run.Test 'NotAutomatedAddingTwoNumbers' was skipped in the test run.Test 'FailingFeatureInconclusiveScenario' was skipped in the test run.Test 'InconclusiveFeatureInconclusiveScenario' was skipped in the test run.Test 'NotAutomatedScenario1' was skipped in the test run.Test 'NotAutomatedScenario2' was skipped in the test run.Test 'NotAutomatedScenario3' was skipped in the test run.Test 'ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1' was skipped in the test run.Test 'AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1' was skipped in the test run.Test 'AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2' was skipped in the test run. \ No newline at end of file diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/WhenParsingXUnitResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/WhenParsingXUnitResultsFileWithIndividualResults.cs index 500461bd7..5df1ee78d 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/WhenParsingXUnitResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/WhenParsingXUnitResultsFileWithIndividualResults.cs @@ -18,7 +18,6 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using NUnit.Framework; @@ -64,5 +63,11 @@ public WhenParsingXUnitResultsFileWithIndividualResults() { base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } \ No newline at end of file diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/results-example-xunit.xml b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/results-example-xunit.xml index 5079e16e5..58f1d8520 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/results-example-xunit.xml +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit1/results-example-xunit.xml @@ -1,59 +1,4 @@ -IgnoredGiven the calculator has clean memory --> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -Given I have entered 60 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(60) (0,0s) -And I have entered 70 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(70) (0,0s) -And I have entered 130 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(130) (0,0s) -When I press add --> done: AdditionSteps.WhenIPressAdd() (0,0s) -Then the result should be 260 on the screen --> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(260) (0,0s) -Given the calculator has clean memory --> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -Given I have entered 40 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(40) (0,0s) -And I have entered 50 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(50) (0,0s) -And I have entered 90 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(90) (0,0s) -When I press add --> done: AdditionSteps.WhenIPressAdd() (0,0s) -Then the result should be 180 on the screen --> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(180) (0,0s) -Given the calculator has clean memory --> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -Given I have entered 1 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(1) (0,0s) -And I have entered 2.2 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(2,2) (0,0s) -When I press add --> done: AdditionSteps.WhenIPressAdd() (0,0s) -Then the result should be 3.2 on the screen --> error: Die Eingabezeichenfolge hat das falsche Format. -System.FormatException : Die Eingabezeichenfolge hat das falsche Format. bei System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) - bei System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) - bei System.String.System.IConvertible.ToInt32(IFormatProvider provider) - bei System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) - bei System.Linq.Enumerable.<SelectIterator>d__5`2.MoveNext() - bei System.Linq.Buffer`1..ctor(IEnumerable`1 source) - bei System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.GetExecuteArguments(BindingMatch match) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.AdditionFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\Addition.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.AdditionFeature.FailToAddTwoNumbers() in D:\Work\pickles-testresults\TestHarness\xunit\Addition.feature:Zeile 34.Given the calculator has clean memory --> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -Given I have entered 1 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(1) (0,0s) -And I have entered 2 into the calculator --> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(2) (0,0s) -When I press add --> done: AdditionSteps.WhenIPressAdd() (0,0s) -Then the result should be 3 on the screen --> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(3) (0,0s) -Given the calculator has clean memory +Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: @@ -108,8 +53,63 @@ namespace MyNamespace } } bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.AdditionFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\Addition.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.AdditionFeature.NotAutomatedAddingTwoNumbers() in D:\Work\pickles-testresults\TestHarness\xunit\Addition.feature:Zeile 46.Given the background step fails + bei Pickles.TestHarness.xunit.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\Addition.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.AdditionFeature.NotAutomatedAddingTwoNumbers() in c:\Development\pickles-testresults\TestHarness\xunit\Addition.feature:Zeile 46.IgnoredGiven the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +Given I have entered 40 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(40) (0,0s) +And I have entered 50 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(50) (0,0s) +And I have entered 90 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(90) (0,0s) +When I press add +-> done: AdditionSteps.WhenIPressAdd() (0,0s) +Then the result should be 180 on the screen +-> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(180) (0,0s) +Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +Given I have entered 60 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(60) (0,0s) +And I have entered 70 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(70) (0,0s) +And I have entered 130 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(130) (0,0s) +When I press add +-> done: AdditionSteps.WhenIPressAdd() (0,0s) +Then the result should be 260 on the screen +-> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(260) (0,0s) +Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +Given I have entered 1 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(1) (0,0s) +And I have entered 2 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(2) (0,0s) +When I press add +-> done: AdditionSteps.WhenIPressAdd() (0,0s) +Then the result should be 3 on the screen +-> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(3) (0,0s) +Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +Given I have entered 1 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(1) (0,0s) +And I have entered 2.2 into the calculator +-> done: AdditionSteps.GivenIHaveEnteredIntoTheCalculator(2,2) (0,0s) +When I press add +-> done: AdditionSteps.WhenIPressAdd() (0,0s) +Then the result should be 3.2 on the screen +-> error: Die Eingabezeichenfolge hat das falsche Format. +System.FormatException : Die Eingabezeichenfolge hat das falsche Format. bei System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) + bei System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) + bei System.String.System.IConvertible.ToInt32(IFormatProvider provider) + bei System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) + bei System.Linq.Enumerable.<SelectIterator>d__5`2.MoveNext() + bei System.Linq.Buffer`1..ctor(IEnumerable`1 source) + bei System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.GetExecuteArguments(BindingMatch match) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() + bei Pickles.TestHarness.xunit.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\Addition.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.AdditionFeature.FailToAddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\xunit\Addition.feature:Zeile 34.Given the background step fails -> error: 1 should be @@ -118,15 +118,15 @@ namespace MyNamespace 1 And the calculator has clean memory -> skipped because of previous errors -Given I have entered 60 into the calculator +Given I have entered 40 into the calculator -> skipped because of previous errors -And I have entered 70 into the calculator +And I have entered 50 into the calculator -> skipped because of previous errors -And I have entered 130 into the calculator +And I have entered 90 into the calculator -> skipped because of previous errors When I press add -> skipped because of previous errors -Then the result should be 260 on the screen +Then the result should be 180 on the screen -> skipped because of previous errors Shouldly.ChuckedAWobbly : 1 @@ -135,13 +135,13 @@ Then the result should be 260 on the screen but was 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\FailingBackground.feature:Zeile 19.Given the background step fails + bei Pickles.TestHarness.xunit.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\FailingBackground.feature:Zeile 19.Given the background step fails -> error: 1 should be @@ -150,15 +150,15 @@ Then the result should be 260 on the screen 1 And the calculator has clean memory -> skipped because of previous errors -Given I have entered 40 into the calculator +Given I have entered 60 into the calculator -> skipped because of previous errors -And I have entered 50 into the calculator +And I have entered 70 into the calculator -> skipped because of previous errors -And I have entered 90 into the calculator +And I have entered 130 into the calculator -> skipped because of previous errors When I press add -> skipped because of previous errors -Then the result should be 180 on the screen +Then the result should be 260 on the screen -> skipped because of previous errors Shouldly.ChuckedAWobbly : 1 @@ -167,13 +167,13 @@ Then the result should be 180 on the screen but was 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\FailingBackground.feature:Zeile 19.Given the background step fails + bei Pickles.TestHarness.xunit.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\FailingBackground.feature:Zeile 19.Given the background step fails -> error: 1 should be @@ -197,13 +197,49 @@ Then the result should be 120 on the screen but was 1 bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei AutomationLayer.AdditionSteps.GivenTheBackgroundStepFails() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\AdditionSteps.cs:Zeile 25. + bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) + bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() + bei Pickles.TestHarness.xunit.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.FailingBackgroundFeature.AddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\xunit\FailingBackground.feature:Zeile 12.Then failing step +-> error: + true + should be + False + but was + True +Shouldly.ChuckedAWobbly : + true + should be + False + but was + True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. + bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. + bei AutomationLayer.MinimalFeatures.MinimalSteps.ThenFailingStep() in c:\Development\pickles-testresults\TestHarness\AutomationLayer\MinimalFeatures\MinimalSteps.cs:Zeile 24. bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.FailingBackgroundFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\FailingBackground.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.FailingBackgroundFeature.AddTwoNumbers() in D:\Work\pickles-testresults\TestHarness\xunit\FailingBackground.feature:Zeile 12.Given unimplemented step + bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario() in c:\Development\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature:Zeile 10.Then inconclusive step +-> pending: MinimalSteps.ThenInconclusiveStep() +TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. + MinimalSteps.ThenInconclusiveStep() bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) + bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.FailingFeatureInconclusiveScenario() in c:\Development\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature:Zeile 7.Then passing step +-> done: MinimalSteps.ThenPassingStep() (0,0s) +Then inconclusive step +-> pending: MinimalSteps.ThenInconclusiveStep() +TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. + MinimalSteps.ThenInconclusiveStep() bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) + bei Pickles.TestHarness.xunit.MinimalFeatures.InconclusiveFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\Minimal Features\Inconclusive.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.MinimalFeatures.InconclusiveFeature.InconclusiveFeatureInconclusiveScenario() in c:\Development\pickles-testresults\TestHarness\xunit\Minimal Features\Inconclusive.feature:Zeile 7.Then passing step +-> done: MinimalSteps.ThenPassingStep() (0,0s) +Then passing step +-> done: MinimalSteps.ThenPassingStep() (0,0s) +Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: [Given(@"unimplemented step")] public void GivenUnimplementedStep() @@ -264,8 +300,8 @@ namespace MyNamespace } } bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.NotAutomatedScenario2() in D:\Work\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature:Zeile 14.Given unimplemented step + bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.NotAutomatedScenario2() in c:\Development\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature:Zeile 14.Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: [Given(@"unimplemented step")] public void GivenUnimplementedStep() @@ -326,8 +362,8 @@ namespace MyNamespace } } bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.NotAutomatedScenario3() in D:\Work\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature:Zeile 19.Given unimplemented step + bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.NotAutomatedScenario1() in c:\Development\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature:Zeile 9.Given unimplemented step -> No matching step definition found for the step. Use the following code to create one: [Given(@"unimplemented step")] public void GivenUnimplementedStep() @@ -388,24 +424,8 @@ namespace MyNamespace } } bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.NotAutomatedScenario1() in D:\Work\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature:Zeile 9.When I have parenthesis in the value, for example an 'This is a description (and more)' --> done: ScenarioOutlineSteps.WhenIHaveParenthesisInTheValueForExampleAnOverlyDescriptiveField("This is a descrip...") (0,0s) -Then the scenario will 'pass_1' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) -Then the scenario will 'pass_2' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) -Then the scenario will 'inconclusive_1' --> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") -TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. - ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.Then the scenario will 'inconclusive_2' --> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2") -TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. - ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2") bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.Then the scenario will 'fail_1' + bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.NotAutomatedAtAllFeature.NotAutomatedScenario3() in c:\Development\pickles-testresults\TestHarness\xunit\NotAutomatedAtAll.feature:Zeile 19.Then the scenario will 'fail_1' -> error: true should be @@ -419,13 +439,36 @@ namespace MyNamespace but was True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.Then the scenario will 'fail_2' + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 34.Then the scenario will 'pass_2' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) +Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) +When I have backslashes in the value, for example a 'c:\Temp\' +-> done: ScenarioOutlineSteps.WhenIHaveBackslashesInTheValueForExampleAFilePath("c:\Temp\") (0,0s) +When I have parenthesis in the value, for example an 'This is a description (and more)' +-> done: ScenarioOutlineSteps.WhenIHaveParenthesisInTheValueForExampleAnOverlyDescriptiveField("This is a descrip...") (0,0s) +Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) +Then the scenario will 'pass_2' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) +Then the scenario will 'pass_3' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_3") (0,0s) +Then the scenario will 'pass_2' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) +Then the scenario will 'inconclusive_1' +-> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") +TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. + ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 21.Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) +Then the scenario will 'fail_1' -> error: true should be @@ -439,34 +482,18 @@ namespace MyNamespace but was True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.When I have backslashes in the value, for example a 'c:\Temp\' --> done: ScenarioOutlineSteps.WhenIHaveBackslashesInTheValueForExampleAFilePath("c:\Temp\") (0,0s) -Then the scenario will 'pass_1' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) -Then the scenario will 'pass_2' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) -Then the scenario will 'pass_3' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_3") (0,0s) -Then the scenario will 'pass_1' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) -Then the scenario will 'pass_2' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) -Then the scenario will 'inconclusive_1' --> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.Then the scenario will 'inconclusive_2' +-> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2") TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. - ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 21.Then the scenario will 'pass_1' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) -Then the scenario will 'pass_2' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) -Then the scenario will 'fail_1' + ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_2") bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.Then the scenario will 'fail_2' -> error: true should be @@ -480,17 +507,50 @@ namespace MyNamespace but was True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in D:\Work\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. + bei AutomationLayer.ScenarioOutlineSteps.ThenTheScenarioWill(String result) in c:\Development\pickles-testresults\TestHarness\AutomationLayer\ScenarioOutlineSteps.cs:Zeile 21. bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in D:\Work\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 34.Given the calculator has clean memory + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.Then the scenario will 'pass_2' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_2") (0,0s) +Then the scenario will 'inconclusive_1' +-> pending: ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") +TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. + ScenarioOutlineSteps.ThenTheScenarioWill("inconclusive_1") bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit\ScenarioOutlines.feature:Zeile 45.Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) +When I have a field with value 'Please enter a valid two letter country code (e.g. DE)!' +-> done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("Please enter a va...") (0,0s) +And I have a field with value 'This is just a very very very veery long error message!' +-> done: ScenarioOutlineSteps.WhenIHaveAFieldWithValue("This is just a ve...") (0,0s) +Then the scenario will 'pass_1' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) +Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) Then the scenario will 'pass_1' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("pass_1") (0,0s) -Given the calculator has clean memory +Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '{}' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("{}") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) +Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '()' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("()") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) +Given the calculator has clean memory +-> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) +When I have special characters for regexes in the value, for example a '^.*(?<foo>BAR)\s[^0-9]{3,4}A+$' +-> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("^.*(?<foo>BAR)\s[...") (0,0s) +Then the scenario will 'PASS' +-> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) +Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) When I have special characters for regexes in the value, for example a '**' -> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("**") (0,0s) @@ -514,24 +574,6 @@ When I have special characters for regexes in the value, for example a '[]' -> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("[]") (0,0s) Then the scenario will 'PASS' -> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) -Given the calculator has clean memory --> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -When I have special characters for regexes in the value, for example a '{}' --> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("{}") (0,0s) -Then the scenario will 'PASS' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) -Given the calculator has clean memory --> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -When I have special characters for regexes in the value, for example a '()' --> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("()") (0,0s) -Then the scenario will 'PASS' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) -Given the calculator has clean memory --> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) -When I have special characters for regexes in the value, for example a '^.*(?<foo>BAR)\s[^0-9]{3,4}A+$' --> done: ScenarioOutlineSteps.WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex("^.*(?<foo>BAR)\s[...") (0,0s) -Then the scenario will 'PASS' --> done: ScenarioOutlineSteps.ThenTheScenarioWill("PASS") (0,0s) Given the calculator has clean memory -> done: AdditionSteps.GivenTheCalculatorHasCleanMemory() (0,0s) Given I have entered 50 into the calculator @@ -542,40 +584,4 @@ When I press add -> done: AdditionSteps.WhenIPressAdd() (0,0s) Then the result should be 120 on the screen -> done: AdditionSteps.ThenTheResultShouldBeOnTheScreen(120) (0,0s) -Then inconclusive step --> pending: MinimalSteps.ThenInconclusiveStep() -TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. - MinimalSteps.ThenInconclusiveStep() bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.FailingFeatureInconclusiveScenario() in D:\Work\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature:Zeile 7.Then failing step --> error: - true - should be - False - but was - True -Shouldly.ChuckedAWobbly : - true - should be - False - but was - True bei Shouldly.ShouldlyCoreExtensions.AssertAwesomely[T](T actual, Func`2 specifiedConstraint, Object originalActual, Object originalExpected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldlyCoreExtensions.cs:Zeile 18. - bei Shouldly.ShouldBeTestExtensions.ShouldBe[T](T actual, T expected) in c:\TeamCity\buildAgent\work\10efaabfa8adbd4e\src\Shouldly\ShouldBeTestExtensions.cs:Zeile 17. - bei AutomationLayer.MinimalFeatures.MinimalSteps.ThenFailingStep() in D:\Work\pickles-testresults\TestHarness\AutomationLayer\MinimalFeatures\MinimalSteps.cs:Zeile 24. - bei TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) - bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.MinimalFeatures.FailingFeature.FailingFeatureFailingScenario() in D:\Work\pickles-testresults\TestHarness\xunit\Minimal Features\Failing.feature:Zeile 10.Then passing step --> done: MinimalSteps.ThenPassingStep() (0,0s) -Then passing step --> done: MinimalSteps.ThenPassingStep() (0,0s) -Then inconclusive step --> pending: MinimalSteps.ThenInconclusiveStep() -TechTalk.SpecFlow.SpecFlowException : Test pending: One or more step definitions are not implemented yet. - MinimalSteps.ThenInconclusiveStep() bei TechTalk.SpecFlow.UnitTestProvider.XUnitRuntimeProvider.TestPending(String message) - bei Pickles.TestHarness.xunit.MinimalFeatures.InconclusiveFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit\Minimal Features\Inconclusive.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit.MinimalFeatures.InconclusiveFeature.InconclusiveFeatureInconclusiveScenario() in D:\Work\pickles-testresults\TestHarness\xunit\Minimal Features\Inconclusive.feature:Zeile 7.Then passing step --> done: MinimalSteps.ThenPassingStep() (0,0s) \ No newline at end of file diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenDeterminingTheSignatureOfAnXUnit2ExampleRow.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenDeterminingTheSignatureOfAnXUnit2ExampleRow.cs index d4d1bccf7..cb6079c38 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenDeterminingTheSignatureOfAnXUnit2ExampleRow.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenDeterminingTheSignatureOfAnXUnit2ExampleRow.cs @@ -46,6 +46,23 @@ public void ThenCanSuccessfullyMatch() Check.That(isMatch).IsTrue(); } + [Test] + public void ThenCanSuccessfullyMatchExamplesWithLongValues() + { + var scenarioOutline = new ScenarioOutline { Name = "Deal correctly with overlong example values" }; + var exampleRow = new[] + { + "Please enter a valid two letter country code (e.g. DE)!", + "This is just a very very very veery long error message!" + }; + + var signatureBuilder = new XUnitExampleSignatureBuilder(); + var signature = signatureBuilder.Build(scenarioOutline, exampleRow); + + var isMatch = signature.IsMatch("Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.DealCorrectlyWithOverlongExampleValues(value1: \"Please enter a valid two letter country code (e.g.\"..., value2: \"This is just a very very very veery long error mes\"..., exampleTags: [])".ToLowerInvariant()); + Check.That(isMatch).IsTrue(); + } + private static bool MatchRegexSpecialChars(string expectedParameter) { var scenarioOutline = new ScenarioOutline { Name = "This scenario contains examples with Regex-special characters" }; diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenParsingXUnitResultsFileWithIndividualResults.cs b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenParsingXUnitResultsFileWithIndividualResults.cs index 44ce35b9f..9e5637148 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenParsingXUnitResultsFileWithIndividualResults.cs +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/WhenParsingXUnitResultsFileWithIndividualResults.cs @@ -18,7 +18,7 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; + using NUnit.Framework; @@ -64,5 +64,11 @@ public WhenParsingXUnitResultsFileWithIndividualResults() { base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed(); } + + [Test] + public new void ThenCanReadExamplesWithLongExampleValues() + { + base.ThenCanReadExamplesWithLongExampleValues(); + } } } \ No newline at end of file diff --git a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/results-example-xunit2.xml b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/results-example-xunit2.xml index e44303a18..b7e7778ef 100644 --- a/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/results-example-xunit2.xml +++ b/src/Pickles/Pickles.TestFrameworks.UnitTests/XUnit/XUnit2/results-example-xunit2.xml @@ -1,39 +1,93 @@  - + - - + + - - + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + @@ -42,220 +96,144 @@ + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioFails(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature:Zeile 34.]]> - + - + - + - + - + - + - - - - - + - - - - - - - + - + - + + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature:Zeile 21.]]> - + - + - - - - - + - + + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature:Zeile 45.]]> - + - + - - - + + + - + + - - + + - + + + + - - - + - - + + - + - - + + + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.ScenarioOutlinesFeature.AndWeCanGoTotallyBonkersWithMultipleExampleSections_(String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit2\ScenarioOutlines.feature:Zeile 45.]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + - - + + - - + + @@ -264,16 +242,16 @@ + bei Pickles.TestHarness.xunit2.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit2\FailingBackground.feature:Zeile 19.]]> - + @@ -282,16 +260,16 @@ + bei Pickles.TestHarness.xunit2.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.FailingBackgroundFeature.AddingSeveralNumbers(String firstNumber, String secondNumber, String thirdNumber, String result, String[] exampleTags) in c:\Development\pickles-testresults\TestHarness\xunit2\FailingBackground.feature:Zeile 19.]]> - + @@ -300,96 +278,86 @@ + bei Pickles.TestHarness.xunit2.FailingBackgroundFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\FailingBackground.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.FailingBackgroundFeature.AddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\xunit2\FailingBackground.feature:Zeile 12.]]> - - + + - - + + - + - - + + - - - - - - - + - - + + - - - - - + - - + + - - - - - + - - + + - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + - - + + - + - + @@ -397,11 +365,11 @@ + bei Pickles.TestHarness.xunit2.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\Addition.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.AdditionFeature.NotAutomatedAddingTwoNumbers() in c:\Development\pickles-testresults\TestHarness\xunit2\Addition.feature:Zeile 46.]]> - + @@ -409,15 +377,15 @@ - + - + - + @@ -431,8 +399,46 @@ bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.GetExecuteArguments(BindingMatch match) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) bei TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() - bei Pickles.TestHarness.xunit2.AdditionFeature.ScenarioCleanup() in D:\Work\pickles-testresults\TestHarness\xunit2\Addition.feature.cs:Zeile 0. - bei Pickles.TestHarness.xunit2.AdditionFeature.FailToAddTwoNumbers() in D:\Work\pickles-testresults\TestHarness\xunit2\Addition.feature:Zeile 34.]]> + bei Pickles.TestHarness.xunit2.AdditionFeature.ScenarioCleanup() in c:\Development\pickles-testresults\TestHarness\xunit2\Addition.feature.cs:Zeile 0. + bei Pickles.TestHarness.xunit2.AdditionFeature.FailToAddTwoNumbers() in c:\Development\pickles-testresults\TestHarness\xunit2\Addition.feature:Zeile 34.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnitExampleSignatureBuilder.cs b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2ExampleSignatureBuilder.cs similarity index 76% rename from src/Pickles/Pickles.TestFrameworks/NUnit/NUnitExampleSignatureBuilder.cs rename to src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2ExampleSignatureBuilder.cs index 2f14de97e..b5adf9ed0 100644 --- a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnitExampleSignatureBuilder.cs +++ b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2ExampleSignatureBuilder.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// +// // Copyright 2011 Jeffrey Cameron // Copyright 2012-present PicklesDoc team and community contributors // @@ -23,13 +23,10 @@ using PicklesDoc.Pickles.ObjectModel; -namespace PicklesDoc.Pickles.TestFrameworks.NUnit +namespace PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit2 { - public class NUnitExampleSignatureBuilder + public class NUnit2ExampleSignatureBuilder { - private static readonly Regex PunctuationCharactersRegex = new Regex(@"[\n\.-]+", RegexOptions.Compiled); - private static readonly Regex NonIdentifierCharacterRegex = new Regex(@"[^\p{Ll}\p{Lu}\p{Lt}\p{Lm}\p{Lo}\p{Nl}\p{Nd}\p{Pc}]", RegexOptions.Compiled); - public Regex Build(ScenarioOutline scenarioOutline, string[] row) { var stringBuilder = new StringBuilder(); @@ -37,7 +34,7 @@ public Regex Build(ScenarioOutline scenarioOutline, string[] row) var name = SpecFlowNameMapping.Build(scenarioOutline.Name.ToLowerInvariant()); stringBuilder.Append(name).Append("\\("); - foreach (string value in row) + foreach (var value in row) { stringBuilder.AppendFormat("\"{0}\",", Regex.Escape(value.ToLowerInvariant())); } diff --git a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2Results.cs b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2Results.cs index a70b897e1..082389cfd 100644 --- a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2Results.cs +++ b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2Results.cs @@ -18,13 +18,12 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; namespace PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit2 { public class NUnit2Results : MultipleTestRunsBase { - public NUnit2Results(IConfiguration configuration, NUnit2SingleResultLoader singleResultLoader, NUnitScenarioOutlineExampleMatcher scenarioOutlineExampleMatcher) + public NUnit2Results(IConfiguration configuration, NUnit2SingleResultLoader singleResultLoader, NUnit2ScenarioOutlineExampleMatcher scenarioOutlineExampleMatcher) : base(configuration, singleResultLoader, scenarioOutlineExampleMatcher) { } diff --git a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnitScenarioOutlineExampleMatcher.cs b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2ScenarioOutlineExampleMatcher.cs similarity index 82% rename from src/Pickles/Pickles.TestFrameworks/NUnit/NUnitScenarioOutlineExampleMatcher.cs rename to src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2ScenarioOutlineExampleMatcher.cs index 0438d7c94..59d40f2ed 100644 --- a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnitScenarioOutlineExampleMatcher.cs +++ b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit2/NUnit2ScenarioOutlineExampleMatcher.cs @@ -1,5 +1,5 @@ // -------------------------------------------------------------------------------------------------------------------- -// +// // Copyright 2011 Jeffrey Cameron // Copyright 2012-present PicklesDoc team and community contributors // @@ -23,11 +23,11 @@ using PicklesDoc.Pickles.ObjectModel; -namespace PicklesDoc.Pickles.TestFrameworks.NUnit +namespace PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit2 { - public class NUnitScenarioOutlineExampleMatcher : IScenarioOutlineExampleMatcher + public class NUnit2ScenarioOutlineExampleMatcher : IScenarioOutlineExampleMatcher { - private readonly NUnitExampleSignatureBuilder signatureBuilder = new NUnitExampleSignatureBuilder(); + private readonly NUnit2ExampleSignatureBuilder signatureBuilder = new NUnit2ExampleSignatureBuilder(); public bool IsMatch(ScenarioOutline scenarioOutline, string[] exampleValues, object scenarioElement) { diff --git a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3ExampleSignatureBuilder.cs b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3ExampleSignatureBuilder.cs new file mode 100644 index 000000000..f928f9f71 --- /dev/null +++ b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3ExampleSignatureBuilder.cs @@ -0,0 +1,50 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright 2011 Jeffrey Cameron +// Copyright 2012-present PicklesDoc team and community contributors +// +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// -------------------------------------------------------------------------------------------------------------------- + +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +using PicklesDoc.Pickles.ObjectModel; + +namespace PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit3 +{ + public class NUnit3ExampleSignatureBuilder + { + private const int MaxExampleValueLength = 37; + + public Regex Build(ScenarioOutline scenarioOutline, string[] row) + { + var stringBuilder = new StringBuilder(); + + var name = SpecFlowNameMapping.Build(scenarioOutline.Name.ToLowerInvariant()); + stringBuilder.Append(name).Append("\\("); + + foreach (var value in row.Select(v => v.Length > MaxExampleValueLength ? new { Value = v.Substring(0, MaxExampleValueLength), Ellipsis = "..." } : new { Value = v, Ellipsis = "" })) + { + stringBuilder.AppendFormat("\"{0}{1}\",", Regex.Escape(value.Value.ToLowerInvariant()), value.Ellipsis); + } + + stringBuilder.Remove(stringBuilder.Length - 1, 1); + + return new Regex(stringBuilder.ToString()); + } + } +} diff --git a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3Results.cs b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3Results.cs index 78f4996bb..335c50eb0 100644 --- a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3Results.cs +++ b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3Results.cs @@ -18,13 +18,12 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; namespace PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit3 { public class NUnit3Results : MultipleTestRunsBase { - public NUnit3Results(IConfiguration configuration, NUnit3SingleResultLoader singleResultLoader, NUnitScenarioOutlineExampleMatcher scenarioOutlineExampleMatcher) + public NUnit3Results(IConfiguration configuration, NUnit3SingleResultLoader singleResultLoader, NUnit3ScenarioOutlineExampleMatcher scenarioOutlineExampleMatcher) : base(configuration, singleResultLoader, scenarioOutlineExampleMatcher) { } diff --git a/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3ScenarioOutlineExampleMatcher.cs b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3ScenarioOutlineExampleMatcher.cs new file mode 100644 index 000000000..feb8bd994 --- /dev/null +++ b/src/Pickles/Pickles.TestFrameworks/NUnit/NUnit3/NUnit3ScenarioOutlineExampleMatcher.cs @@ -0,0 +1,45 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright 2011 Jeffrey Cameron +// Copyright 2012-present PicklesDoc team and community contributors +// +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// -------------------------------------------------------------------------------------------------------------------- + +using System.Text.RegularExpressions; +using System.Xml.Linq; + +using PicklesDoc.Pickles.ObjectModel; + +namespace PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit3 +{ + public class NUnit3ScenarioOutlineExampleMatcher : IScenarioOutlineExampleMatcher + { + private readonly NUnit3ExampleSignatureBuilder signatureBuilder = new NUnit3ExampleSignatureBuilder(); + + public bool IsMatch(ScenarioOutline scenarioOutline, string[] exampleValues, object scenarioElement) + { + var build = this.signatureBuilder.Build(scenarioOutline, exampleValues); + + return IsMatchingTestCase((XElement)scenarioElement, build); + } + + internal static bool IsMatchingTestCase(XElement x, Regex exampleSignature) + { + var name = x.Attribute("name"); + return name != null && exampleSignature.IsMatch(name.Value.ToLowerInvariant().Replace(@"\\", @"\")); + } + } +} \ No newline at end of file diff --git a/src/Pickles/Pickles.TestFrameworks/Pickles.TestFrameworks.csproj b/src/Pickles/Pickles.TestFrameworks/Pickles.TestFrameworks.csproj index b9182bc97..b28ffae04 100644 --- a/src/Pickles/Pickles.TestFrameworks/Pickles.TestFrameworks.csproj +++ b/src/Pickles/Pickles.TestFrameworks/Pickles.TestFrameworks.csproj @@ -56,6 +56,8 @@ + + @@ -70,7 +72,7 @@ - + @@ -80,7 +82,7 @@ results-example-nunit3.xsd - + diff --git a/src/Pickles/Pickles.TestFrameworks/VsTest/VsTestScenarioOutlineExampleMatcher.cs b/src/Pickles/Pickles.TestFrameworks/VsTest/VsTestScenarioOutlineExampleMatcher.cs index 85597910c..96b179b09 100644 --- a/src/Pickles/Pickles.TestFrameworks/VsTest/VsTestScenarioOutlineExampleMatcher.cs +++ b/src/Pickles/Pickles.TestFrameworks/VsTest/VsTestScenarioOutlineExampleMatcher.cs @@ -18,7 +18,6 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using System.Xml.Linq; using PicklesDoc.Pickles.ObjectModel; @@ -31,16 +30,18 @@ public bool IsMatch(ScenarioOutline scenarioOutline, string[] exampleValues, obj { var element = (XElement)scenarioElement; + var matchValue = exampleValues[0] + .Replace(" ", string.Empty) + .Replace(":", string.Empty) + .Replace("\\", string.Empty) + .Replace("(", string.Empty) + .Replace(")", string.Empty) + .Replace(".", "_") + .Replace("!", string.Empty) + .ToUpperInvariant(); + var isMatch = element.Name().ToUpperInvariant() - .EndsWith( - exampleValues[0] - .Replace(" ", string.Empty) - .Replace(":", string.Empty) - .Replace("\\", string.Empty) - .Replace("(", string.Empty) - .Replace(")", string.Empty) - .ToUpperInvariant() - ); + .EndsWith(matchValue); return isMatch; } diff --git a/src/Pickles/Pickles.TestFrameworks/XUnit/xUnitExampleSignatureBuilder.cs b/src/Pickles/Pickles.TestFrameworks/XUnit/xUnitExampleSignatureBuilder.cs index 98516f126..d7b989724 100644 --- a/src/Pickles/Pickles.TestFrameworks/XUnit/xUnitExampleSignatureBuilder.cs +++ b/src/Pickles/Pickles.TestFrameworks/XUnit/xUnitExampleSignatureBuilder.cs @@ -18,6 +18,7 @@ // // -------------------------------------------------------------------------------------------------------------------- +using System.Linq; using System.Text; using System.Text.RegularExpressions; @@ -27,6 +28,8 @@ namespace PicklesDoc.Pickles.TestFrameworks.XUnit { public class XUnitExampleSignatureBuilder { + private const int MaxExampleValueLength = 50; + public Regex Build(ScenarioOutline scenarioOutline, string[] row) { var stringBuilder = new StringBuilder(); @@ -34,10 +37,8 @@ public Regex Build(ScenarioOutline scenarioOutline, string[] row) var name = SpecFlowNameMapping.Build(scenarioOutline.Name.ToLowerInvariant()); stringBuilder.Append(name).Append("\\("); - foreach (string value in row) - { - stringBuilder.AppendFormat("(.*): \"{0}\", ", Regex.Escape(value.ToLowerInvariant())); - } + foreach (var value in row.Select(v => v.Length > MaxExampleValueLength ? new { Value = v.Substring(0, MaxExampleValueLength), Ellipsis = "..." } : new { Value = v, Ellipsis = "" })) + stringBuilder.AppendFormat("(.*): \"{0}\"{1}, ", Regex.Escape(value.Value.ToLowerInvariant()), value.Ellipsis); stringBuilder.Remove(stringBuilder.Length - 2, 2); diff --git a/src/Pickles/Pickles/CommandLineArgumentParser.cs b/src/Pickles/Pickles/CommandLineArgumentParser.cs index a1e9bbb5d..253bf2ce3 100644 --- a/src/Pickles/Pickles/CommandLineArgumentParser.cs +++ b/src/Pickles/Pickles/CommandLineArgumentParser.cs @@ -37,7 +37,7 @@ public class CommandLineArgumentParser public const string HelpSutVersion = "the version of the system under test"; public const string HelpLanguageFeatureFiles = "the language of the feature files"; public const string HelpDocumentationFormat = "the format of the output documentation"; - public const string HelpTestResultsFormat = "the format of the linked test results (nunit|xunit)"; + public const string HelpTestResultsFormat = "the format of the linked test results (nunit|nunit3|xunit|xunit2|mstest |cucumberjson|specrun|vstest)"; public const string HelpIncludeExperimentalFeatures = "whether to include experimental features"; public const string HelpTestResultsFile = diff --git a/src/Pickles/Pickles/PicklesModule.cs b/src/Pickles/Pickles/PicklesModule.cs index 52330a2f0..4419d1b02 100644 --- a/src/Pickles/Pickles/PicklesModule.cs +++ b/src/Pickles/Pickles/PicklesModule.cs @@ -18,7 +18,6 @@ // // -------------------------------------------------------------------------------------------------------------------- -using System; using Autofac; using PicklesDoc.Pickles.DirectoryCrawler; using PicklesDoc.Pickles.DocumentationBuilders; @@ -32,7 +31,6 @@ using PicklesDoc.Pickles.TestFrameworks; using PicklesDoc.Pickles.TestFrameworks.CucumberJson; using PicklesDoc.Pickles.TestFrameworks.MsTest; -using PicklesDoc.Pickles.TestFrameworks.NUnit; using PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit2; using PicklesDoc.Pickles.TestFrameworks.NUnit.NUnit3; using PicklesDoc.Pickles.TestFrameworks.SpecRun; @@ -80,7 +78,8 @@ protected override void Load(ContainerBuilder builder) builder.RegisterType(); builder.RegisterType(); - builder.RegisterType(); + builder.RegisterType(); + builder.RegisterType(); builder.RegisterType(); builder.RegisterType(); builder.RegisterType(); @@ -145,18 +144,10 @@ protected override void Load(ContainerBuilder builder) builder.RegisterType(); builder.RegisterType(); - builder.Register( - c => - { - if (FeatureSwitcher.Feature.Is().Enabled) - { - return c.Resolve(); - } - else - { - return c.Resolve(); - } - }).SingleInstance(); + builder.Register( + c => FeatureSwitcher.Feature.Is().Enabled + ? (IMarkdownProvider)c.Resolve() + : c.Resolve()).SingleInstance(); } } } diff --git a/src/Pickles/VersionInfo.cs b/src/Pickles/VersionInfo.cs index 16e0fdd31..18779fcf5 100644 --- a/src/Pickles/VersionInfo.cs +++ b/src/Pickles/VersionInfo.cs @@ -8,11 +8,11 @@ [assembly: AssemblyTrademarkAttribute("")] [assembly: AssemblyCultureAttribute("")] [assembly: ComVisibleAttribute(false)] -[assembly: AssemblyVersionAttribute("2.6.1")] -[assembly: AssemblyFileVersionAttribute("2.6.1")] +[assembly: AssemblyVersionAttribute("2.6.2")] +[assembly: AssemblyFileVersionAttribute("2.6.2")] namespace System { internal static class AssemblyVersionInformation { - internal const string Version = "2.6.1"; - internal const string InformationalVersion = "2.6.1"; + internal const string Version = "2.6.2"; + internal const string InformationalVersion = "2.6.2"; } } diff --git a/test-harness/AutomationLayer/AdditionSteps.cs b/test-harness/AutomationLayer/AdditionSteps.cs new file mode 100644 index 000000000..fdd3b41e4 --- /dev/null +++ b/test-harness/AutomationLayer/AdditionSteps.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Shouldly; +using TechTalk.SpecFlow; + +namespace AutomationLayer +{ + [Binding] + public class AdditionSteps + { + private List numbersList; + + private int result; + + [Given(@"the calculator has clean memory")] + public void GivenTheCalculatorHasCleanMemory() + { + this.numbersList = new List(); + this.result = 0; + } + + [Given(@"the background step fails")] + public void GivenTheBackgroundStepFails() + { + 1.ShouldBe(2); + } + + [Given(@"I have entered (.*) into the calculator")] + public void GivenIHaveEnteredIntoTheCalculator(Decimal p0) + { + this.numbersList.Add((int)p0); + } + + [When(@"I press add")] + public void WhenIPressAdd() + { + foreach (var i in this.numbersList) + { + this.result += i; + } + } + + [Then(@"the result should be (.*) on the screen")] + public void ThenTheResultShouldBeOnTheScreen(int p0) + { + this.result.ShouldBe(p0); + } + } +} diff --git a/test-harness/AutomationLayer/App.config b/test-harness/AutomationLayer/App.config new file mode 100644 index 000000000..4f03aecb9 --- /dev/null +++ b/test-harness/AutomationLayer/App.config @@ -0,0 +1,9 @@ + + + +
+ + + + + diff --git a/test-harness/AutomationLayer/AutomationLayer.csproj b/test-harness/AutomationLayer/AutomationLayer.csproj new file mode 100644 index 000000000..e44463a7c --- /dev/null +++ b/test-harness/AutomationLayer/AutomationLayer.csproj @@ -0,0 +1,71 @@ + + + + + Debug + AnyCPU + {073862DE-D599-4941-9716-03206CF1CFA2} + Library + Properties + AutomationLayer + AutomationLayer + v4.5 + 512 + ..\ + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + False + ..\packages\Shouldly.2.1.1\lib\net40\Shouldly.dll + + + + + + + + + + ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-harness/AutomationLayer/MinimalFeatures/MinimalSteps.cs b/test-harness/AutomationLayer/MinimalFeatures/MinimalSteps.cs new file mode 100644 index 000000000..2a19c595d --- /dev/null +++ b/test-harness/AutomationLayer/MinimalFeatures/MinimalSteps.cs @@ -0,0 +1,27 @@ +using System; +using Shouldly; +using TechTalk.SpecFlow; + +namespace AutomationLayer.MinimalFeatures +{ + [Binding] + public class MinimalSteps + { + [Then(@"passing step")] + public void ThenPassingStep() + { + } + + [Then(@"inconclusive step")] + public void ThenInconclusiveStep() + { + ScenarioContext.Current.Pending(); + } + + [Then(@"failing step")] + public void ThenFailingStep() + { + true.ShouldBe(false); + } + } +} diff --git a/test-harness/AutomationLayer/Properties/AssemblyInfo.cs b/test-harness/AutomationLayer/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..72c946d96 --- /dev/null +++ b/test-harness/AutomationLayer/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AutomationLayer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AIM Software")] +[assembly: AssemblyProduct("AutomationLayer")] +[assembly: AssemblyCopyright("Copyright © AIM Software 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f91ae381-e0a7-4360-85ea-ff5ee05745a7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test-harness/AutomationLayer/ScenarioOutlineSteps.cs b/test-harness/AutomationLayer/ScenarioOutlineSteps.cs new file mode 100644 index 000000000..69efd65b3 --- /dev/null +++ b/test-harness/AutomationLayer/ScenarioOutlineSteps.cs @@ -0,0 +1,53 @@ +using System; + +using Shouldly; + +using TechTalk.SpecFlow; + +namespace AutomationLayer +{ + [Binding] + public class ScenarioOutlineSteps + { + [Then(@"the scenario will '(.*)'")] + public void ThenTheScenarioWill(string result) + { + if (result.ToUpperInvariant().StartsWith("PASS")) + { + // nothing to be done + } + else if (result.ToUpperInvariant().StartsWith("FAIL")) + { + true.ShouldBe(false); + } + else + { + ScenarioContext.Current.Pending(); + } + } + + [When(@"I have special characters for regexes in the value, for example a '(.*)'")] + public void WhenIHaveSpecialCharactersForRegexesInTheValueForExampleARegex(string regex) + { + // nothing to be done + } + + [When(@"I have backslashes in the value, for example a '(.*)'")] + public void WhenIHaveBackslashesInTheValueForExampleAFilePath(string filePath) + { + // nothing to be done + } + + [When(@"I have parenthesis in the value, for example an '(.*)'")] + public void WhenIHaveParenthesisInTheValueForExampleAnOverlyDescriptiveField(string description) + { + // nothing to be done - test case requires pass + } + + [When(@"I have a field with value '(.*)'")] + public void WhenIHaveAFieldWithValue(string value) + { + // nothing to be done - test case requires pass + } + } +} diff --git a/test-harness/AutomationLayer/packages.config b/test-harness/AutomationLayer/packages.config new file mode 100644 index 000000000..a0b524124 --- /dev/null +++ b/test-harness/AutomationLayer/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/test-harness/Cucumber/features/Addition.feature b/test-harness/Cucumber/features/Addition.feature new file mode 100644 index 000000000..b1aee1f37 --- /dev/null +++ b/test-harness/Cucumber/features/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/Cucumber/features/FailingBackground.feature b/test-harness/Cucumber/features/FailingBackground.feature new file mode 100644 index 000000000..99c245fdc --- /dev/null +++ b/test-harness/Cucumber/features/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/Cucumber/features/Minimal Features/Failing.feature b/test-harness/Cucumber/features/Minimal Features/Failing.feature new file mode 100644 index 000000000..cfea2ed25 --- /dev/null +++ b/test-harness/Cucumber/features/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step diff --git a/test-harness/Cucumber/features/Minimal Features/Inconclusive.feature b/test-harness/Cucumber/features/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..ee594c98b --- /dev/null +++ b/test-harness/Cucumber/features/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step diff --git a/test-harness/Cucumber/features/Minimal Features/Passing.feature b/test-harness/Cucumber/features/Minimal Features/Passing.feature new file mode 100644 index 000000000..0aa8f7625 --- /dev/null +++ b/test-harness/Cucumber/features/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/Cucumber/features/NotAutomatedAtAll.feature b/test-harness/Cucumber/features/NotAutomatedAtAll.feature new file mode 100644 index 000000000..2e0911aa6 --- /dev/null +++ b/test-harness/Cucumber/features/NotAutomatedAtAll.feature @@ -0,0 +1,19 @@ +Feature: Not Automated At All + +Background: + Given unimplemented step + +Scenario: Not automated scenario 1 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 2 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 3 + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/Cucumber/features/ScenarioOutlines.feature b/test-harness/Cucumber/features/ScenarioOutlines.feature new file mode 100644 index 000000000..68462e674 --- /dev/null +++ b/test-harness/Cucumber/features/ScenarioOutlines.feature @@ -0,0 +1,88 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + +Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + And I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/Cucumber/features/ScenariosWithSpecialCharacters.feature b/test-harness/Cucumber/features/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..408724653 --- /dev/null +++ b/test-harness/Cucumber/features/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'pass_1' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | \ No newline at end of file diff --git a/test-harness/Cucumber/features/step_definitions/AdditionSteps.rb b/test-harness/Cucumber/features/step_definitions/AdditionSteps.rb new file mode 100644 index 000000000..6de34b066 --- /dev/null +++ b/test-harness/Cucumber/features/step_definitions/AdditionSteps.rb @@ -0,0 +1,30 @@ +Given(/^the calculator has clean memory$/) do + @result = 0 + @numbersList = [] +end + +Given(/^I have entered (\d+) into the calculator$/) do |arg1| + @numbersList << arg1.to_i +end + +Given(/^I have entered (\d+)\.(\d+) into the calculator$/) do |arg1, arg2| + expect("this is a hacky way of making the scenario with a non-integer number").to eql("fail") +end + +When(/^I press add$/) do + @numbersList.each do |number| + @result = @result + number + end +end + +Then(/^the result should be (\d+) on the screen$/) do |arg1| + expect(@result).to eql(arg1.to_i) +end + +Then(/^the result should be (\d+)\.(\d+) on the screen$/) do |arg1, arg2| + expect("this is a hacky way of making the scenario with a non-integer number").to eql("fail") +end + +Given(/^the background step fails$/) do + expect("true").to eql("false") +end diff --git a/test-harness/Cucumber/features/step_definitions/MinimalSteps.rb b/test-harness/Cucumber/features/step_definitions/MinimalSteps.rb new file mode 100644 index 000000000..7bdee88bd --- /dev/null +++ b/test-harness/Cucumber/features/step_definitions/MinimalSteps.rb @@ -0,0 +1,11 @@ +Then(/^passing step$/) do + # Nothing to be done here +end + +Then(/^inconclusive step$/) do + pending # We want pending here +end + +Then(/^failing step$/) do + expect("true").to eql("false") +end diff --git a/test-harness/Cucumber/features/step_definitions/ScenarioOutlineSteps.rb b/test-harness/Cucumber/features/step_definitions/ScenarioOutlineSteps.rb new file mode 100644 index 000000000..37675d8ae --- /dev/null +++ b/test-harness/Cucumber/features/step_definitions/ScenarioOutlineSteps.rb @@ -0,0 +1,27 @@ +Then(/^the scenario will 'pass_(\d+)'$/) do |arg1| + # Nothing to be done here +end + +Then(/^the scenario will 'inconclusive_(\d+)'$/) do |arg1| + pending # We want pending here +end + +Then(/^the scenario will 'fail_(\d+)'$/) do |arg1| + expect("true").to eql("false") +end + +When(/^I have backslashes in the value, for example a 'c:\\Temp\\'$/) do + # Nothing to be done here +end + +When(/^I have parenthesis in the value, for example an '(.*)'$/) do |arg1| + #Nothing to be done here +end + +When(/^I have special characters for regexes in the value, for example a '(.*)'$/) do |arg1| + #Nothing to be done here +end + +When(/^I have a field with value '(.*)'$/) do |arg1| + #Nothing to be done here +end \ No newline at end of file diff --git a/test-harness/Cucumber/features/support/env.rb b/test-harness/Cucumber/features/support/env.rb new file mode 100644 index 000000000..ac66ee5f3 --- /dev/null +++ b/test-harness/Cucumber/features/support/env.rb @@ -0,0 +1 @@ +require 'rspec/expectations' diff --git a/test-harness/CucumberJS/features/Addition.feature b/test-harness/CucumberJS/features/Addition.feature new file mode 100644 index 000000000..b1aee1f37 --- /dev/null +++ b/test-harness/CucumberJS/features/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/CucumberJS/features/FailingBackground.feature b/test-harness/CucumberJS/features/FailingBackground.feature new file mode 100644 index 000000000..99c245fdc --- /dev/null +++ b/test-harness/CucumberJS/features/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/CucumberJS/features/Minimal Features/Failing.feature b/test-harness/CucumberJS/features/Minimal Features/Failing.feature new file mode 100644 index 000000000..cfea2ed25 --- /dev/null +++ b/test-harness/CucumberJS/features/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step diff --git a/test-harness/CucumberJS/features/Minimal Features/Inconclusive.feature b/test-harness/CucumberJS/features/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..ee594c98b --- /dev/null +++ b/test-harness/CucumberJS/features/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step diff --git a/test-harness/CucumberJS/features/Minimal Features/Passing.feature b/test-harness/CucumberJS/features/Minimal Features/Passing.feature new file mode 100644 index 000000000..0aa8f7625 --- /dev/null +++ b/test-harness/CucumberJS/features/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/CucumberJS/features/NotAutomatedAtAll.feature b/test-harness/CucumberJS/features/NotAutomatedAtAll.feature new file mode 100644 index 000000000..2e0911aa6 --- /dev/null +++ b/test-harness/CucumberJS/features/NotAutomatedAtAll.feature @@ -0,0 +1,19 @@ +Feature: Not Automated At All + +Background: + Given unimplemented step + +Scenario: Not automated scenario 1 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 2 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 3 + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/CucumberJS/features/ScenarioOutlines.feature b/test-harness/CucumberJS/features/ScenarioOutlines.feature new file mode 100644 index 000000000..68462e674 --- /dev/null +++ b/test-harness/CucumberJS/features/ScenarioOutlines.feature @@ -0,0 +1,88 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + +Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + And I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/CucumberJS/features/ScenariosWithSpecialCharacters.feature b/test-harness/CucumberJS/features/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..408724653 --- /dev/null +++ b/test-harness/CucumberJS/features/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'pass_1' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | \ No newline at end of file diff --git a/test-harness/CucumberJS/features/stepdefinitions/AdditionSteps.js b/test-harness/CucumberJS/features/stepdefinitions/AdditionSteps.js new file mode 100644 index 000000000..c9c5c15c3 --- /dev/null +++ b/test-harness/CucumberJS/features/stepdefinitions/AdditionSteps.js @@ -0,0 +1,39 @@ +'use strict'; + +var Calculator = require(process.cwd() + '/script/model/calculator'); +var assert = require('assert'); + +module.exports = function() { + + var myCalculator; + + this.Given(/^the calculator has clean memory$/, function (callback) { + myCalculator = Calculator.create(); + callback(); + }); + + this.Given(/^I have entered (.*) into the calculator$/, function (firstNumber, callback) { + myCalculator.enter(firstNumber); + callback(); + }); + + this.Given(/^I have entered (\d+)\.(\d+) into the calculator$/, function (firstNumber, secondNumber, callback) { + assert.equal("this is a hacky way of making the scenario with a non-integer number", "fail"); + callback(); + }); + + this.When(/^I press add$/, function (callback) { + myCalculator.add(); + callback(); + }); + + this.Then(/^the result should be (.*) on the screen$/, function (arg1, callback) { + assert.equal(myCalculator.result, parseInt(arg1)); + callback(); + }); + + this.Given(/^the background step fails$/, function (callback) { + assert.equal("true", "false"); + callback(); + }); +} diff --git a/test-harness/CucumberJS/features/stepdefinitions/MinimalSteps.js b/test-harness/CucumberJS/features/stepdefinitions/MinimalSteps.js new file mode 100644 index 000000000..d31ee1bdc --- /dev/null +++ b/test-harness/CucumberJS/features/stepdefinitions/MinimalSteps.js @@ -0,0 +1,21 @@ +'use strict'; + +var assert = require('assert'); + +module.exports = function() { + + this.Then(/^passing step$/, function (callback) { + // nothing to be done here + callback(); + }); + + this.Then(/^inconclusive step$/, function (callback) { + // we want pending here + callback(null, 'pending'); + }); + + this.Then(/^failing step$/, function (callback) { + assert.equal("true", "false"); + callback(); + }); +}; diff --git a/test-harness/CucumberJS/features/stepdefinitions/ScenarioOutlineSteps.js b/test-harness/CucumberJS/features/stepdefinitions/ScenarioOutlineSteps.js new file mode 100644 index 000000000..982c29676 --- /dev/null +++ b/test-harness/CucumberJS/features/stepdefinitions/ScenarioOutlineSteps.js @@ -0,0 +1,41 @@ +'use strict'; + +var assert = require('assert'); + +module.exports = function() { + + this.Then(/^the scenario will 'pass_(\d+)'$/, function (result, callback) { + // nothing to be done here + callback(); + }); + + this.Then(/^the scenario will 'inconclusive_(\d+)'$/, function (result, callback) { + // we want pending here + callback(null, 'pending'); + }); + + this.Then(/^the scenario will 'fail_(\d+)'$/, function (result, callback) { + assert.equal("true", "false"); + callback(); + }); + + this.When(/^I have backslashes in the value, for example a '(.*)'$/, function (filePath, callback) { + // nothing to be done here + callback(); + }); + + this.When(/^I have parenthesis in the value, for example an '(.*)'$/, function (description, callback) { + // nothing to be done here + callback(); + }); + + this.When(/^I have special characters for regexes in the value, for example a '(.*)'$/, function (description, callback) { + // nothing to be done here + callback(); + }); + + this.When(/^I have a field with value '(.*)'$/, function name(value, callback) { + // nothing to be done here + callback(); + }); +}; diff --git a/test-harness/CucumberJS/script/model/calculator.js b/test-harness/CucumberJS/script/model/calculator.js new file mode 100644 index 000000000..060abaaca --- /dev/null +++ b/test-harness/CucumberJS/script/model/calculator.js @@ -0,0 +1,26 @@ +'use strict'; + +var calculator = { + enter: function(item) { + this.list.push(parseInt(item)); + }, + add: function() { + var index; + for (index = 0; index < this.list.length; index++) { + this.result = this.result + this.list[index]; + } + }, +}; + +module.exports = { + create: function() { + return Object.create(calculator, { + 'list': { + value: [], + writable: false, + enumerable: true + }, + 'result': { value: 0, writable: true } + }); + } +}; diff --git a/test-harness/MsTest/Addition.feature b/test-harness/MsTest/Addition.feature new file mode 100644 index 000000000..238e261e9 --- /dev/null +++ b/test-harness/MsTest/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/MsTest/Addition.feature.cs b/test-harness/MsTest/Addition.feature.cs new file mode 100644 index 000000000..b5aed87e7 --- /dev/null +++ b/test-harness/MsTest/Addition.feature.cs @@ -0,0 +1,229 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.MsTest +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class AdditionFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Addition.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to avoid silly mistakes\r\nAs a math idiot\r\nI want to be told the sum of t" + + "wo numbers", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Addition"))) + { + Pickles.TestHarness.MsTest.AdditionFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 6 +#line 7 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + string[] @__tags = new string[] { + "tag2"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", @__tags); +#line 10 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 11 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 12 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 15 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Adding several numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Addition")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("tag2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "60")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:first number", "60")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:second number", "70")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:third number", "130")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "260")] + public virtual void AddingSeveralNumbers_60() + { + this.AddingSeveralNumbers("60", "70", "130", "260", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Adding several numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Addition")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("tag2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "40")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:first number", "40")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:second number", "50")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:third number", "90")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "180")] + public virtual void AddingSeveralNumbers_40() + { + this.AddingSeveralNumbers("40", "50", "90", "180", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Add two numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Addition")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("tag1")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] { + "tag1"}); +#line 23 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 24 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 25 + testRunner.And("I have entered 2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 26 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 27 + testRunner.Then("the result should be 3 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Fail to add two numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Addition")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("tag1")] + public virtual void FailToAddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fail to add two numbers", new string[] { + "tag1"}); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 31 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 32 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 34 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Ignored adding two numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Addition")] + [Microsoft.VisualStudio.TestTools.UnitTesting.IgnoreAttribute()] + public virtual void IgnoredAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Ignored adding two numbers", new string[] { + "ignore"}); +#line 37 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 38 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 39 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 40 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 41 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Not automated adding two numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Addition")] + public virtual void NotAutomatedAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated adding two numbers", ((string[])(null))); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 44 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 45 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 46 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/App.config b/test-harness/MsTest/App.config new file mode 100644 index 000000000..a44d679c3 --- /dev/null +++ b/test-harness/MsTest/App.config @@ -0,0 +1,13 @@ + + + +
+ + + + + + + + + diff --git a/test-harness/MsTest/FailingBackground.feature b/test-harness/MsTest/FailingBackground.feature new file mode 100644 index 000000000..83a70483a --- /dev/null +++ b/test-harness/MsTest/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/MsTest/FailingBackground.feature.cs b/test-harness/MsTest/FailingBackground.feature.cs new file mode 100644 index 000000000..b8dd97c5a --- /dev/null +++ b/test-harness/MsTest/FailingBackground.feature.cs @@ -0,0 +1,152 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.MsTest +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class FailingBackgroundFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "FailingBackground.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing Background", "This feature has a failing background.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Failing Background"))) + { + Pickles.TestHarness.MsTest.FailingBackgroundFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the background step fails", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 6 + testRunner.And("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Add two numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Failing Background")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", ((string[])(null))); +#line 8 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 9 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 10 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 11 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 12 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 16 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 17 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 18 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Adding several numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Failing Background")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "60")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:first number", "60")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:second number", "70")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:third number", "130")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "260")] + public virtual void AddingSeveralNumbers_60() + { + this.AddingSeveralNumbers("60", "70", "130", "260", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Adding several numbers")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Failing Background")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "40")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:first number", "40")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:second number", "50")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:third number", "90")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "180")] + public virtual void AddingSeveralNumbers_40() + { + this.AddingSeveralNumbers("40", "50", "90", "180", ((string[])(null))); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/Minimal Features/Failing.feature b/test-harness/MsTest/Minimal Features/Failing.feature new file mode 100644 index 000000000..d7c5b7f53 --- /dev/null +++ b/test-harness/MsTest/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step \ No newline at end of file diff --git a/test-harness/MsTest/Minimal Features/Failing.feature.cs b/test-harness/MsTest/Minimal Features/Failing.feature.cs new file mode 100644 index 000000000..2184a702a --- /dev/null +++ b/test-harness/MsTest/Minimal Features/Failing.feature.cs @@ -0,0 +1,115 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.MsTest.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class FailingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Failing.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Failing"))) + { + Pickles.TestHarness.MsTest.MinimalFeatures.FailingFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Failing Feature Passing Scenario")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Failing")] + public virtual void FailingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Failing Feature Inconclusive Scenario")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Failing")] + public virtual void FailingFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Failing Feature Failing Scenario")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Failing")] + public virtual void FailingFeatureFailingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Failing Scenario", ((string[])(null))); +#line 9 +this.ScenarioSetup(scenarioInfo); +#line 10 + testRunner.Then("failing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/Minimal Features/Inconclusive.feature b/test-harness/MsTest/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..7ce63f2d5 --- /dev/null +++ b/test-harness/MsTest/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step \ No newline at end of file diff --git a/test-harness/MsTest/Minimal Features/Inconclusive.feature.cs b/test-harness/MsTest/Minimal Features/Inconclusive.feature.cs new file mode 100644 index 000000000..5d211b93b --- /dev/null +++ b/test-harness/MsTest/Minimal Features/Inconclusive.feature.cs @@ -0,0 +1,101 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.MsTest.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class InconclusiveFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Inconclusive.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Inconclusive", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Inconclusive"))) + { + Pickles.TestHarness.MsTest.MinimalFeatures.InconclusiveFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Inconclusive Feature Passing Scenario")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Inconclusive")] + public virtual void InconclusiveFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Inconclusive Feature Inconclusive Scenario")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Inconclusive")] + public virtual void InconclusiveFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/Minimal Features/Passing.feature b/test-harness/MsTest/Minimal Features/Passing.feature new file mode 100644 index 000000000..14bf35e22 --- /dev/null +++ b/test-harness/MsTest/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/MsTest/Minimal Features/Passing.feature.cs b/test-harness/MsTest/Minimal Features/Passing.feature.cs new file mode 100644 index 000000000..c1bcb807e --- /dev/null +++ b/test-harness/MsTest/Minimal Features/Passing.feature.cs @@ -0,0 +1,87 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.MsTest.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class PassingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Passing.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Passing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Passing"))) + { + Pickles.TestHarness.MsTest.MinimalFeatures.PassingFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Passing Feature Passing Scenario")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Passing")] + public virtual void PassingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Passing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/MsTest.csproj b/test-harness/MsTest/MsTest.csproj new file mode 100644 index 000000000..c2d14aadb --- /dev/null +++ b/test-harness/MsTest/MsTest.csproj @@ -0,0 +1,172 @@ + + + + Debug + AnyCPU + {0DBA6FCA-5D66-4187-932D-64B55D67E287} + Library + Properties + Pickles.TestHarness.MsTest + MsTestHarness + v4.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + UnitTest + ..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll + + + + + + + + + + + + + + + + + Addition.feature + True + True + + + True + True + FailingBackground.feature + + + True + True + Failing.feature + + + True + True + Inconclusive.feature + + + NotAutomatedAtAll.feature + True + True + + + True + True + Passing.feature + + + + ScenarioOutlines.feature + True + True + + + + True + True + ScenariosWithSpecialCharacters.feature + + + + + SpecFlowSingleFileGenerator + Addition.feature.cs + + + + SpecFlowSingleFileGenerator + FailingBackground.feature.cs + + + SpecFlowSingleFileGenerator + Failing.feature.cs + + + SpecFlowSingleFileGenerator + Inconclusive.feature.cs + + + SpecFlowSingleFileGenerator + NotAutomatedAtAll.feature.cs + + + Designer + + + SpecFlowSingleFileGenerator + Passing.feature.cs + + + SpecFlowSingleFileGenerator + ScenarioOutlines.feature.cs + + + SpecFlowSingleFileGenerator + ScenariosWithSpecialCharacters.feature.cs + + + + + {073862de-d599-4941-9716-03206cf1cfa2} + AutomationLayer + + + + + + + False + + + False + + + False + + + False + + + + + + + + \ No newline at end of file diff --git a/test-harness/MsTest/NotAutomatedAtAll.feature b/test-harness/MsTest/NotAutomatedAtAll.feature new file mode 100644 index 000000000..3bbfcb669 --- /dev/null +++ b/test-harness/MsTest/NotAutomatedAtAll.feature @@ -0,0 +1,19 @@ +Feature: Not Automated At All + +Background: + Given unimplemented step + +Scenario: Not automated scenario 1 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 2 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 3 + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/MsTest/NotAutomatedAtAll.feature.cs b/test-harness/MsTest/NotAutomatedAtAll.feature.cs new file mode 100644 index 000000000..1822045fa --- /dev/null +++ b/test-harness/MsTest/NotAutomatedAtAll.feature.cs @@ -0,0 +1,141 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.MsTest +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class NotAutomatedAtAllFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "NotAutomatedAtAll.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Not Automated At All", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Not Automated At All"))) + { + Pickles.TestHarness.MsTest.NotAutomatedAtAllFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 3 +#line 4 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Not automated scenario 1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Not Automated At All")] + public virtual void NotAutomatedScenario1() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 1", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 7 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 8 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 9 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Not automated scenario 2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Not Automated At All")] + public virtual void NotAutomatedScenario2() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 2", ((string[])(null))); +#line 11 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 12 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 13 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 14 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Not automated scenario 3")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Not Automated At All")] + public virtual void NotAutomatedScenario3() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 3", ((string[])(null))); +#line 16 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 17 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 18 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/OrdinaryUnitTest.cs b/test-harness/MsTest/OrdinaryUnitTest.cs new file mode 100644 index 000000000..21af4d8b1 --- /dev/null +++ b/test-harness/MsTest/OrdinaryUnitTest.cs @@ -0,0 +1,20 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Pickles.TestHarness.MsTest +{ + /// + /// The ordinary unit test. + /// + [TestClass] + public class OrdinaryUnitTest + { + /// + /// The test method that tests something related to Addition feature. + /// + [TestMethod] + [TestProperty("FeatureTitle", "Addition")] + public void TestMethod() + { + } + } +} diff --git a/test-harness/MsTest/Properties/AssemblyInfo.cs b/test-harness/MsTest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..d800f8ed2 --- /dev/null +++ b/test-harness/MsTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MsTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MsTest")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e72eb554-9284-4846-ad46-49bc14fc43ce")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test-harness/MsTest/ScenarioOutlines.feature b/test-harness/MsTest/ScenarioOutlines.feature new file mode 100644 index 000000000..00efa6fc5 --- /dev/null +++ b/test-harness/MsTest/ScenarioOutlines.feature @@ -0,0 +1,88 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + +Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + And I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/MsTest/ScenarioOutlines.feature.cs b/test-harness/MsTest/ScenarioOutlines.feature.cs new file mode 100644 index 000000000..843eb79b8 --- /dev/null +++ b/test-harness/MsTest/ScenarioOutlines.feature.cs @@ -0,0 +1,335 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.MsTest +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class ScenarioOutlinesFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenarioOutlines.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenario Outlines", "Here we demonstrate how we deal with scenario outlines", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Scenario Outlines"))) + { + Pickles.TestHarness.MsTest.ScenarioOutlinesFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where all scenarios pass", exampleTags); +#line 4 +this.ScenarioSetup(scenarioInfo); +#line 8 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where all scenarios pass")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_1")] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass_Pass_1() + { + this.ThisIsAScenarioOutlineWhereAllScenariosPass("pass_1", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where all scenarios pass")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_2")] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass_Pass_2() + { + this.ThisIsAScenarioOutlineWhereAllScenariosPass("pass_2", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where all scenarios pass")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_3")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_3")] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass_Pass_3() + { + this.ThisIsAScenarioOutlineWhereAllScenariosPass("pass_3", ((string[])(null))); + } + + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario is inconclusive", exampleTags); +#line 17 +this.ScenarioSetup(scenarioInfo); +#line 21 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where one scenario is inconclusive")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_1")] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Pass_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive("pass_1", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where one scenario is inconclusive")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_2")] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Pass_2() + { + this.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive("pass_2", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where one scenario is inconclusive")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "inconclusive_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "inconclusive_1")] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive("inconclusive_1", ((string[])(null))); + } + + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario fails", exampleTags); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 34 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where one scenario fails")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_1")] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails_Pass_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioFails("pass_1", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where one scenario fails")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_2")] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails_Pass_2() + { + this.ThisIsAScenarioOutlineWhereOneScenarioFails("pass_2", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline where one scenario fails")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "fail_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "fail_1")] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails_Fail_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioFails("fail_1", ((string[])(null))); + } + + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections_(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("And we can go totally bonkers with multiple example sections.", exampleTags); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 45 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_1")] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet0_Pass_1() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("pass_1", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_2")] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet0_Pass_2() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("pass_2", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "inconclusive_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "inconclusive_1")] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("inconclusive_1", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "inconclusive_2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "inconclusive_2")] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("inconclusive_2", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "fail_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "fail_1")] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_1() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("fail_1", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "fail_2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "fail_2")] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_2() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("fail_2", ((string[])(null))); + } + + public virtual void DealCorrectlyWithBackslashesInTheExamples(string filePath, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with backslashes in the examples", exampleTags); +#line 63 +this.ScenarioSetup(scenarioInfo); +#line 65 + testRunner.When(string.Format("I have backslashes in the value, for example a \'{0}\'", filePath), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Deal correctly with backslashes in the examples")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "c:\\Temp\\")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:file path", "c:\\Temp\\")] + public virtual void DealCorrectlyWithBackslashesInTheExamples_CTemp() + { + this.DealCorrectlyWithBackslashesInTheExamples("c:\\Temp\\", ((string[])(null))); + } + + public virtual void DealCorrectlyWithParenthesisInTheExamples(string overlyDescriptiveField, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with parenthesis in the examples", exampleTags); +#line 72 +this.ScenarioSetup(scenarioInfo); +#line 74 + testRunner.When(string.Format("I have parenthesis in the value, for example an \'{0}\'", overlyDescriptiveField), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Deal correctly with parenthesis in the examples")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "This is a description (and more)")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:overly descriptive field", "This is a description (and more)")] + public virtual void DealCorrectlyWithParenthesisInTheExamples_ThisIsADescriptionAndMore() + { + this.DealCorrectlyWithParenthesisInTheExamples("This is a description (and more)", ((string[])(null))); + } + + public virtual void DealCorrectlyWithOverlongExampleValues(string value1, string value2, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with overlong example values", exampleTags); +#line 80 +this.ScenarioSetup(scenarioInfo); +#line 82 + testRunner.When(string.Format("I have a field with value \'{0}\'", value1), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 83 + testRunner.And(string.Format("I have a field with value \'{0}\'", value2), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 84 + testRunner.Then("the scenario will \'pass_1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Deal correctly with overlong example values")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenario Outlines")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Please enter a valid two letter country code (e.g. DE)!")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:value1", "Please enter a valid two letter country code (e.g. DE)!")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:value2", "This is just a very very very veery long error message!")] + public virtual void DealCorrectlyWithOverlongExampleValues_PleaseEnterAValidTwoLetterCountryCodeE_G_DE() + { + this.DealCorrectlyWithOverlongExampleValues("Please enter a valid two letter country code (e.g. DE)!", "This is just a very very very veery long error message!", ((string[])(null))); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/ScenariosWithSpecialCharacters.feature b/test-harness/MsTest/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..eec8f83ed --- /dev/null +++ b/test-harness/MsTest/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'PASS' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | diff --git a/test-harness/MsTest/ScenariosWithSpecialCharacters.feature.cs b/test-harness/MsTest/ScenariosWithSpecialCharacters.feature.cs new file mode 100644 index 000000000..943ea099e --- /dev/null +++ b/test-harness/MsTest/ScenariosWithSpecialCharacters.feature.cs @@ -0,0 +1,211 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.MsTest +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()] + public partial class ScenariosWithSpecialCharactersFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenariosWithSpecialCharacters.feature" +#line hidden + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()] + public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenarios With Special Characters", "Here we demonstrate usage of special characters in scenario names", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()] + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute()] + public virtual void TestInitialize() + { + if (((TechTalk.SpecFlow.FeatureContext.Current != null) + && (TechTalk.SpecFlow.FeatureContext.Current.FeatureInfo.Title != "Scenarios With Special Characters"))) + { + Pickles.TestHarness.MsTest.ScenariosWithSpecialCharactersFeature.FeatureSetup(null); + } + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + public virtual void ThisIsAScenarioWithParenthesesHyphenAndComma10_2030_40() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)", ((string[])(null))); +#line 7 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 8 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 9 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "pass_1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:result", "pass_1")] + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40_Pass_1() + { + this.ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40("pass_1", ((string[])(null))); + } + + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters(string regex, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario contains examples with Regex-special characters", exampleTags); +#line 21 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 22 + testRunner.When(string.Format("I have special characters for regexes in the value, for example a \'{0}\'", regex), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 23 + testRunner.Then("the scenario will \'PASS\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 0")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:regex", "**")] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant0() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("**", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 1")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:regex", "++")] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant1() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("++", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 2")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:regex", ".*")] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant2() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters(".*", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 3")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:regex", "[]")] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant3() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("[]", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 4")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:regex", "{}")] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant4() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("{}", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 5")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:regex", "()")] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant5() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("()", ((string[])(null))); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("VariantName", "Variant 6")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("Parameter:regex", "^.*(?BAR)\\s[^0-9]{3,4}A+$")] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant6() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("^.*(?BAR)\\s[^0-9]{3,4}A+$", ((string[])(null))); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/MsTest/packages.config b/test-harness/MsTest/packages.config new file mode 100644 index 000000000..c6658054d --- /dev/null +++ b/test-harness/MsTest/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/test-harness/SpecRun/Addition.feature b/test-harness/SpecRun/Addition.feature new file mode 100644 index 000000000..238e261e9 --- /dev/null +++ b/test-harness/SpecRun/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/SpecRun/Addition.feature.cs b/test-harness/SpecRun/Addition.feature.cs new file mode 100644 index 000000000..7b3669e78 --- /dev/null +++ b/test-harness/SpecRun/Addition.feature.cs @@ -0,0 +1,208 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 SpecRun +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Addition", Description="In order to avoid silly mistakes\r\nAs a math idiot\r\nI want to be told the sum of t" + + "wo numbers")] + public partial class AdditionFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Addition.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to avoid silly mistakes\r\nAs a math idiot\r\nI want to be told the sum of t" + + "wo numbers", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 6 +#line 7 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + string[] @__tags = new string[] { + "tag2"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", @__tags); +#line 10 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 11 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 12 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 15 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Adding several numbers, 60", new string[] { + "tag2"})] + public virtual void AddingSeveralNumbers_60() + { + this.AddingSeveralNumbers("60", "70", "130", "260", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("Adding several numbers, 40", new string[] { + "tag2"})] + public virtual void AddingSeveralNumbers_40() + { + this.AddingSeveralNumbers("40", "50", "90", "180", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("Add two numbers", new string[] { + "tag1"})] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] { + "tag1"}); +#line 23 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 24 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 25 + testRunner.And("I have entered 2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 26 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 27 + testRunner.Then("the result should be 3 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Fail to add two numbers", new string[] { + "tag1"})] + public virtual void FailToAddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fail to add two numbers", new string[] { + "tag1"}); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 31 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 32 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 34 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Ignored adding two numbers")] + [TechTalk.SpecRun.IgnoreAttribute()] + public virtual void IgnoredAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Ignored adding two numbers", new string[] { + "ignore"}); +#line 37 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 38 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 39 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 40 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 41 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Not automated adding two numbers")] + public virtual void NotAutomatedAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated adding two numbers", ((string[])(null))); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 44 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 45 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 46 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/App.config b/test-harness/SpecRun/App.config new file mode 100644 index 000000000..521cc9e30 --- /dev/null +++ b/test-harness/SpecRun/App.config @@ -0,0 +1,16 @@ + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/test-harness/SpecRun/CustomReportTemplate.cshtml b/test-harness/SpecRun/CustomReportTemplate.cshtml new file mode 100644 index 000000000..69ae56f5a --- /dev/null +++ b/test-harness/SpecRun/CustomReportTemplate.cshtml @@ -0,0 +1,49 @@ + +@using System.Linq +@using System.Globalization +@using TechTalk.SpecRun.Framework +@using TechTalk.SpecRun.Framework.Results +@using TechTalk.SpecRun.Framework.TestSuiteStructure + +@helper GetResultForPickles(TestNode testNode) +{ + var summary = GetSummary(testNode); + + if (summary.Succeeded > 0) + {Passed} + else if (summary.TotalFailure > 0) + {Failed} + else if (summary.Ignored > 0) + {Ignored} + else if (summary.Pending > 0) + {Pending} + else + {Inconclusive} +} + + + + + + + + + \ No newline at end of file diff --git a/test-harness/SpecRun/Default.srprofile b/test-harness/SpecRun/Default.srprofile new file mode 100644 index 000000000..463a1f910 --- /dev/null +++ b/test-harness/SpecRun/Default.srprofile @@ -0,0 +1,29 @@ + + + + + + + SpecRun.dll + + + + + + + + diff --git a/test-harness/SpecRun/FailingBackground.feature b/test-harness/SpecRun/FailingBackground.feature new file mode 100644 index 000000000..83a70483a --- /dev/null +++ b/test-harness/SpecRun/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/SpecRun/FailingBackground.feature.cs b/test-harness/SpecRun/FailingBackground.feature.cs new file mode 100644 index 000000000..dacc7da88 --- /dev/null +++ b/test-harness/SpecRun/FailingBackground.feature.cs @@ -0,0 +1,136 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 SpecRun +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Failing Background", Description="This feature has a failing background.", SourceFile="FailingBackground.feature", SourceLine=0)] + public partial class FailingBackgroundFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "FailingBackground.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing Background", "This feature has a failing background.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the background step fails", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 6 + testRunner.And("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + + [TechTalk.SpecRun.ScenarioAttribute("Add two numbers", SourceLine=7)] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", ((string[])(null))); +#line 8 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 9 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 10 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 11 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 12 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 16 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 17 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 18 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Adding several numbers, 60", SourceLine=22)] + public virtual void AddingSeveralNumbers_60() + { + this.AddingSeveralNumbers("60", "70", "130", "260", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("Adding several numbers, 40", SourceLine=23)] + public virtual void AddingSeveralNumbers_40() + { + this.AddingSeveralNumbers("40", "50", "90", "180", ((string[])(null))); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/Minimal Features/Failing.feature b/test-harness/SpecRun/Minimal Features/Failing.feature new file mode 100644 index 000000000..d7c5b7f53 --- /dev/null +++ b/test-harness/SpecRun/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step \ No newline at end of file diff --git a/test-harness/SpecRun/Minimal Features/Failing.feature.cs b/test-harness/SpecRun/Minimal Features/Failing.feature.cs new file mode 100644 index 000000000..917b07d45 --- /dev/null +++ b/test-harness/SpecRun/Minimal Features/Failing.feature.cs @@ -0,0 +1,109 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 SpecRun.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Failing")] + public partial class FailingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Failing.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Failing Feature Passing Scenario")] + public virtual void FailingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Failing Feature Inconclusive Scenario")] + public virtual void FailingFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Failing Feature Failing Scenario")] + public virtual void FailingFeatureFailingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Failing Scenario", ((string[])(null))); +#line 9 +this.ScenarioSetup(scenarioInfo); +#line 10 + testRunner.Then("failing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/Minimal Features/Inconclusive.feature b/test-harness/SpecRun/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..7ce63f2d5 --- /dev/null +++ b/test-harness/SpecRun/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step \ No newline at end of file diff --git a/test-harness/SpecRun/Minimal Features/Inconclusive.feature.cs b/test-harness/SpecRun/Minimal Features/Inconclusive.feature.cs new file mode 100644 index 000000000..17b47e12e --- /dev/null +++ b/test-harness/SpecRun/Minimal Features/Inconclusive.feature.cs @@ -0,0 +1,97 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 SpecRun.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Inconclusive")] + public partial class InconclusiveFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Inconclusive.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Inconclusive", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Inconclusive Feature Passing Scenario")] + public virtual void InconclusiveFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Inconclusive Feature Inconclusive Scenario")] + public virtual void InconclusiveFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/Minimal Features/Passing.feature b/test-harness/SpecRun/Minimal Features/Passing.feature new file mode 100644 index 000000000..14bf35e22 --- /dev/null +++ b/test-harness/SpecRun/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/SpecRun/Minimal Features/Passing.feature.cs b/test-harness/SpecRun/Minimal Features/Passing.feature.cs new file mode 100644 index 000000000..1526b08ba --- /dev/null +++ b/test-harness/SpecRun/Minimal Features/Passing.feature.cs @@ -0,0 +1,85 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 SpecRun.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Passing")] + public partial class PassingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Passing.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Passing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Passing Feature Passing Scenario")] + public virtual void PassingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Passing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/NotAutomatedAtAll.feature b/test-harness/SpecRun/NotAutomatedAtAll.feature new file mode 100644 index 000000000..3bbfcb669 --- /dev/null +++ b/test-harness/SpecRun/NotAutomatedAtAll.feature @@ -0,0 +1,19 @@ +Feature: Not Automated At All + +Background: + Given unimplemented step + +Scenario: Not automated scenario 1 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 2 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 3 + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/SpecRun/NotAutomatedAtAll.feature.cs b/test-harness/SpecRun/NotAutomatedAtAll.feature.cs new file mode 100644 index 000000000..623e4f0e5 --- /dev/null +++ b/test-harness/SpecRun/NotAutomatedAtAll.feature.cs @@ -0,0 +1,135 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 SpecRun +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Not Automated At All")] + public partial class NotAutomatedAtAllFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "NotAutomatedAtAll.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Not Automated At All", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 3 +#line 4 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [TechTalk.SpecRun.ScenarioAttribute("Not automated scenario 1")] + public virtual void NotAutomatedScenario1() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 1", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 7 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 8 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 9 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Not automated scenario 2")] + public virtual void NotAutomatedScenario2() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 2", ((string[])(null))); +#line 11 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 12 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 13 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 14 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Not automated scenario 3")] + public virtual void NotAutomatedScenario3() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 3", ((string[])(null))); +#line 16 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 17 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 18 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/Properties/AssemblyInfo.cs b/test-harness/SpecRun/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..b64ebba26 --- /dev/null +++ b/test-harness/SpecRun/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SpecRun")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AIM Software")] +[assembly: AssemblyProduct("SpecRun")] +[assembly: AssemblyCopyright("Copyright © AIM Software 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ca37f04b-0bfb-452b-aba0-8b183088ac45")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test-harness/SpecRun/ScenarioOutlines.feature b/test-harness/SpecRun/ScenarioOutlines.feature new file mode 100644 index 000000000..a2efda16a --- /dev/null +++ b/test-harness/SpecRun/ScenarioOutlines.feature @@ -0,0 +1,87 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + + Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/SpecRun/ScenarioOutlines.feature.cs b/test-harness/SpecRun/ScenarioOutlines.feature.cs new file mode 100644 index 000000000..15ee1c0b9 --- /dev/null +++ b/test-harness/SpecRun/ScenarioOutlines.feature.cs @@ -0,0 +1,268 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 SpecRun +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Scenario Outlines", Description="Here we demonstrate how we deal with scenario outlines", SourceFile="ScenarioOutlines.feature", SourceLine=0)] + public partial class ScenarioOutlinesFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenarioOutlines.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenario Outlines", "Here we demonstrate how we deal with scenario outlines", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where all scenarios pass", exampleTags); +#line 4 +this.ScenarioSetup(scenarioInfo); +#line 8 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where all scenarios pass, pass_1", Description="\nThis means the entire scenario outline passes.", SourceLine=11)] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass_Pass_1() + { + this.ThisIsAScenarioOutlineWhereAllScenariosPass("pass_1", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where all scenarios pass, pass_2", Description="\nThis means the entire scenario outline passes.", SourceLine=12)] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass_Pass_2() + { + this.ThisIsAScenarioOutlineWhereAllScenariosPass("pass_2", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where all scenarios pass, pass_3", Description="\nThis means the entire scenario outline passes.", SourceLine=13)] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass_Pass_3() + { + this.ThisIsAScenarioOutlineWhereAllScenariosPass("pass_3", ((string[])(null))); + } + + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario is inconclusive", exampleTags); +#line 17 +this.ScenarioSetup(scenarioInfo); +#line 21 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where one scenario is inconclusive, pass_1", Description="\nThis means the entire scenario outline is inconclusive.", SourceLine=24)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Pass_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive("pass_1", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where one scenario is inconclusive, pass_2", Description="\nThis means the entire scenario outline is inconclusive.", SourceLine=25)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Pass_2() + { + this.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive("pass_2", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where one scenario is inconclusive, inconclusive_1", Description="\nThis means the entire scenario outline is inconclusive.", SourceLine=26)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive_Inconclusive_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive("inconclusive_1", ((string[])(null))); + } + + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario fails", exampleTags); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 34 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where one scenario fails, pass_1", Description="\nThis means the entire scenario outline fails.", SourceLine=37)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails_Pass_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioFails("pass_1", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where one scenario fails, pass_2", Description="\nThis means the entire scenario outline fails.", SourceLine=38)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails_Pass_2() + { + this.ThisIsAScenarioOutlineWhereOneScenarioFails("pass_2", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline where one scenario fails, fail_1", Description="\nThis means the entire scenario outline fails.", SourceLine=39)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails_Fail_1() + { + this.ThisIsAScenarioOutlineWhereOneScenarioFails("fail_1", ((string[])(null))); + } + + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections_(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("And we can go totally bonkers with multiple example sections.", exampleTags); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 45 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("And we can go totally bonkers with multiple example sections., Examples 1, pass_1" + + "", SourceLine=48)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet0_Pass_1() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("pass_1", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("And we can go totally bonkers with multiple example sections., Examples 1, pass_2" + + "", SourceLine=49)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet0_Pass_2() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("pass_2", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("And we can go totally bonkers with multiple example sections., Examples 2, inconc" + + "lusive_1", SourceLine=53)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_1() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("inconclusive_1", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("And we can go totally bonkers with multiple example sections., Examples 2, inconc" + + "lusive_2", SourceLine=54)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet1_Inconclusive_2() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("inconclusive_2", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("And we can go totally bonkers with multiple example sections., Examples 3, fail_1" + + "", SourceLine=58)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_1() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("fail_1", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("And we can go totally bonkers with multiple example sections., Examples 3, fail_2" + + "", SourceLine=59)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections__ExampleSet2_Fail_2() + { + this.AndWeCanGoTotallyBonkersWithMultipleExampleSections_("fail_2", ((string[])(null))); + } + + public virtual void DealCorrectlyWithBackslashesInTheExamples(string filePath, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with backslashes in the examples", exampleTags); +#line 63 +this.ScenarioSetup(scenarioInfo); +#line 65 + testRunner.When(string.Format("I have backslashes in the value, for example a \'{0}\'", filePath), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Deal correctly with backslashes in the examples, c:\\Temp\\", SourceLine=68)] + public virtual void DealCorrectlyWithBackslashesInTheExamples_CTemp() + { + this.DealCorrectlyWithBackslashesInTheExamples("c:\\Temp\\", ((string[])(null))); + } + + public virtual void DealCorrectlyWithParenthesisInTheExamples(string overlyDescriptiveField, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with parenthesis in the examples", exampleTags); +#line 72 +this.ScenarioSetup(scenarioInfo); +#line 74 + testRunner.When(string.Format("I have parenthesis in the value, for example an \'{0}\'", overlyDescriptiveField), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Deal correctly with parenthesis in the examples, This is a description (and more)" + + "", SourceLine=77)] + public virtual void DealCorrectlyWithParenthesisInTheExamples_ThisIsADescriptionAndMore() + { + this.DealCorrectlyWithParenthesisInTheExamples("This is a description (and more)", ((string[])(null))); + } + + public virtual void DealCorrectlyWithOverlongExampleValues(string value1, string value2, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with overlong example values", exampleTags); +#line 80 + this.ScenarioSetup(scenarioInfo); +#line 82 + testRunner.When("I have a field with value \'\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 83 + testRunner.Then("the scenario will \'pass_1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("Deal correctly with overlong example values, Please enter a valid two letter coun" + + "try code (e.g. DE)!", SourceLine=86)] + public virtual void DealCorrectlyWithOverlongExampleValues_PleaseEnterAValidTwoLetterCountryCodeE_G_DE() + { + this.DealCorrectlyWithOverlongExampleValues("Please enter a valid two letter country code (e.g. DE)!", "This is just a very very very veery long error message!", ((string[])(null))); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/ScenariosWithSpecialCharacters.feature b/test-harness/SpecRun/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..522ffd274 --- /dev/null +++ b/test-harness/SpecRun/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'PASS' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | \ No newline at end of file diff --git a/test-harness/SpecRun/ScenariosWithSpecialCharacters.feature.cs b/test-harness/SpecRun/ScenariosWithSpecialCharacters.feature.cs new file mode 100644 index 000000000..ceb9ab4f9 --- /dev/null +++ b/test-harness/SpecRun/ScenariosWithSpecialCharacters.feature.cs @@ -0,0 +1,178 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 SpecRun +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [TechTalk.SpecRun.FeatureAttribute("Scenarios With Special Characters", Description="Here we demonstrate usage of special characters in scenario names", SourceFile="ScenariosWithSpecialCharacters.feature", SourceLine=0)] + public partial class ScenariosWithSpecialCharactersFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenariosWithSpecialCharacters.feature" +#line hidden + + [TechTalk.SpecRun.FeatureInitialize()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenarios With Special Characters", "Here we demonstrate usage of special characters in scenario names", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [TechTalk.SpecRun.FeatureCleanup()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + [TechTalk.SpecRun.ScenarioCleanup()] + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)", SourceLine=6)] + public virtual void ThisIsAScenarioWithParenthesesHyphenAndComma10_2030_40() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)", ((string[])(null))); +#line 7 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 8 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 9 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40), pas" + + "s_1", SourceLine=18)] + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40_Pass_1() + { + this.ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40("pass_1", ((string[])(null))); + } + + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters(string regex, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario contains examples with Regex-special characters", exampleTags); +#line 21 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 22 + testRunner.When(string.Format("I have special characters for regexes in the value, for example a \'{0}\'", regex), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 23 + testRunner.Then("the scenario will \'PASS\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [TechTalk.SpecRun.ScenarioAttribute("This scenario contains examples with Regex-special characters, Variant 0", SourceLine=26)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant0() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("**", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This scenario contains examples with Regex-special characters, Variant 1", SourceLine=27)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant1() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("++", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This scenario contains examples with Regex-special characters, Variant 2", SourceLine=28)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant2() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters(".*", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This scenario contains examples with Regex-special characters, Variant 3", SourceLine=29)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant3() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("[]", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This scenario contains examples with Regex-special characters, Variant 4", SourceLine=30)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant4() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("{}", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This scenario contains examples with Regex-special characters, Variant 5", SourceLine=31)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant5() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("()", ((string[])(null))); + } + + [TechTalk.SpecRun.ScenarioAttribute("This scenario contains examples with Regex-special characters, Variant 6", SourceLine=32)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters_Variant6() + { + this.ThisScenarioContainsExamplesWithRegex_SpecialCharacters("^.*(?BAR)\\s[^0-9]{3,4}A+$", ((string[])(null))); + } + + [TechTalk.SpecRun.TestRunCleanup()] + public virtual void TestRunCleanup() + { +TechTalk.SpecFlow.TestRunnerManager.GetTestRunner().OnTestRunEnd(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/SpecRun/SpecRun.csproj b/test-harness/SpecRun/SpecRun.csproj new file mode 100644 index 000000000..35f76b21d --- /dev/null +++ b/test-harness/SpecRun/SpecRun.csproj @@ -0,0 +1,164 @@ + + + + + Debug + AnyCPU + {15DD6AA3-525E-4F4A-BC68-07542ECC4159} + Library + Properties + SpecRun + SpecRun + v4.5 + 512 + + ..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + False + ..\packages\SpecRun.SpecFlow.1.2.0\lib\net35\SpecRun.SpecFlowPlugin.dll + + + + + + + + + + ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll + + + False + ..\packages\SpecRun.SpecFlow.1.2.0\lib\net35\TechTalk.SpecRun.dll + + + + + Addition.feature + True + True + + + FailingBackground.feature + True + True + + + Failing.feature + True + True + + + Inconclusive.feature + True + True + + + Passing.feature + True + True + + + NotAutomatedAtAll.feature + True + True + + + + ScenarioOutlines.feature + True + True + + + True + True + ScenariosWithSpecialCharacters.feature + + + + + SpecFlowSingleFileGenerator + Addition.feature.cs + + + + PreserveNewest + Designer + + + SpecFlowSingleFileGenerator + FailingBackground.feature.cs + + + SpecFlowSingleFileGenerator + Failing.feature.cs + + + SpecFlowSingleFileGenerator + Inconclusive.feature.cs + + + SpecFlowSingleFileGenerator + Passing.feature.cs + + + SpecFlowSingleFileGenerator + NotAutomatedAtAll.feature.cs + + + + PreserveNewest + + + + SpecFlowSingleFileGenerator + ScenarioOutlines.feature.cs + + + SpecFlowSingleFileGenerator + ScenariosWithSpecialCharacters.feature.cs + + + Designer + + + + + {073862de-d599-4941-9716-03206cf1cfa2} + AutomationLayer + + + + + + + + \ No newline at end of file diff --git a/test-harness/SpecRun/SpecRunTestProfile.xsd b/test-harness/SpecRun/SpecRunTestProfile.xsd new file mode 100644 index 000000000..8b4fdb2d4 --- /dev/null +++ b/test-harness/SpecRun/SpecRunTestProfile.xsd @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-harness/SpecRun/packages.config b/test-harness/SpecRun/packages.config new file mode 100644 index 000000000..10cb35333 --- /dev/null +++ b/test-harness/SpecRun/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test-harness/SpecRun/runtests.cmd b/test-harness/SpecRun/runtests.cmd new file mode 100644 index 000000000..716cb0425 --- /dev/null +++ b/test-harness/SpecRun/runtests.cmd @@ -0,0 +1,17 @@ +@pushd %~dp0 + +%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe "SpecRun.csproj" + +@if ERRORLEVEL 1 goto end + +@cd ..\packages\SpecRun.Runner.*\tools + +@set profile=%1 +@if "%profile%" == "" set profile=Default + +SpecRun.exe run %profile%.srprofile "/baseFolder:%~dp0\bin\Debug" /log:specrun.log %2 %3 %4 %5 + +:end + +@popd + diff --git a/test-harness/TestHarness.sln b/test-harness/TestHarness.sln new file mode 100644 index 000000000..e99a84a17 --- /dev/null +++ b/test-harness/TestHarness.sln @@ -0,0 +1,63 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsTest", "MsTest\MsTest.csproj", "{0DBA6FCA-5D66-4187-932D-64B55D67E287}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit", "nunit\nunit.csproj", "{C13BF896-768D-47BC-86A0-99BC53CC54E6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xunit", "xunit\xunit.csproj", "{F4AB7229-9022-4FFC-86EC-570ADF2A682C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutomationLayer", "AutomationLayer\AutomationLayer.csproj", "{073862DE-D599-4941-9716-03206CF1CFA2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpecRun", "SpecRun\SpecRun.csproj", "{15DD6AA3-525E-4F4A-BC68-07542ECC4159}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5249183C-E96B-490B-A2C4-90D003A60CB3}" + ProjectSection(SolutionItems) = preProject + TestSettings.testsettings = TestSettings.testsettings + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit3", "nunit3\nunit3.csproj", "{C5E91AEE-8234-443A-A327-6A6581E49D4B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xunit2", "xunit2\xunit2.csproj", "{E5B28DB5-295E-4E33-A9E3-D84A49265BAF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0DBA6FCA-5D66-4187-932D-64B55D67E287}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0DBA6FCA-5D66-4187-932D-64B55D67E287}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0DBA6FCA-5D66-4187-932D-64B55D67E287}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0DBA6FCA-5D66-4187-932D-64B55D67E287}.Release|Any CPU.Build.0 = Release|Any CPU + {C13BF896-768D-47BC-86A0-99BC53CC54E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C13BF896-768D-47BC-86A0-99BC53CC54E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C13BF896-768D-47BC-86A0-99BC53CC54E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C13BF896-768D-47BC-86A0-99BC53CC54E6}.Release|Any CPU.Build.0 = Release|Any CPU + {F4AB7229-9022-4FFC-86EC-570ADF2A682C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4AB7229-9022-4FFC-86EC-570ADF2A682C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4AB7229-9022-4FFC-86EC-570ADF2A682C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4AB7229-9022-4FFC-86EC-570ADF2A682C}.Release|Any CPU.Build.0 = Release|Any CPU + {073862DE-D599-4941-9716-03206CF1CFA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {073862DE-D599-4941-9716-03206CF1CFA2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {073862DE-D599-4941-9716-03206CF1CFA2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {073862DE-D599-4941-9716-03206CF1CFA2}.Release|Any CPU.Build.0 = Release|Any CPU + {15DD6AA3-525E-4F4A-BC68-07542ECC4159}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15DD6AA3-525E-4F4A-BC68-07542ECC4159}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15DD6AA3-525E-4F4A-BC68-07542ECC4159}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15DD6AA3-525E-4F4A-BC68-07542ECC4159}.Release|Any CPU.Build.0 = Release|Any CPU + {C5E91AEE-8234-443A-A327-6A6581E49D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5E91AEE-8234-443A-A327-6A6581E49D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5E91AEE-8234-443A-A327-6A6581E49D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5E91AEE-8234-443A-A327-6A6581E49D4B}.Release|Any CPU.Build.0 = Release|Any CPU + {E5B28DB5-295E-4E33-A9E3-D84A49265BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5B28DB5-295E-4E33-A9E3-D84A49265BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5B28DB5-295E-4E33-A9E3-D84A49265BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5B28DB5-295E-4E33-A9E3-D84A49265BAF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/test-harness/TestHarness.sln.GhostDoc.xml b/test-harness/TestHarness.sln.GhostDoc.xml new file mode 100644 index 000000000..7380c08f1 --- /dev/null +++ b/test-harness/TestHarness.sln.GhostDoc.xml @@ -0,0 +1,56 @@ + + + *.min.js + jquery*.js + + + + + + + + + + + + .\Help + true + TestHarness + + + + true + false + false + false + + + true + false + false + false + true + true + false + + + + + + true + true + true + + true + + + + + + + + + + + + diff --git a/test-harness/TestSettings.testsettings b/test-harness/TestSettings.testsettings new file mode 100644 index 000000000..1c25c1c1d --- /dev/null +++ b/test-harness/TestSettings.testsettings @@ -0,0 +1,9 @@ + + + These are default test settings for a local test run. + + diff --git a/test-harness/nunit/Addition.feature b/test-harness/nunit/Addition.feature new file mode 100644 index 000000000..238e261e9 --- /dev/null +++ b/test-harness/nunit/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/nunit/Addition.feature.cs b/test-harness/nunit/Addition.feature.cs new file mode 100644 index 000000000..c6f1ae68d --- /dev/null +++ b/test-harness/nunit/Addition.feature.cs @@ -0,0 +1,198 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.nunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Addition")] + public partial class AdditionFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Addition.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to avoid silly mistakes\r\nAs a math idiot\r\nI want to be told the sum of t" + + "wo numbers", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 6 +#line 7 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Adding several numbers")] + [NUnit.Framework.CategoryAttribute("tag2")] + [NUnit.Framework.TestCaseAttribute("60", "70", "130", "260", null)] + [NUnit.Framework.TestCaseAttribute("40", "50", "90", "180", null)] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + string[] @__tags = new string[] { + "tag2"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", @__tags); +#line 10 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 11 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 12 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 15 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Add two numbers")] + [NUnit.Framework.CategoryAttribute("tag1")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] { + "tag1"}); +#line 23 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 24 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 25 + testRunner.And("I have entered 2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 26 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 27 + testRunner.Then("the result should be 3 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Fail to add two numbers")] + [NUnit.Framework.CategoryAttribute("tag1")] + public virtual void FailToAddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fail to add two numbers", new string[] { + "tag1"}); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 31 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 32 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 34 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Ignored adding two numbers")] + [NUnit.Framework.IgnoreAttribute()] + public virtual void IgnoredAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Ignored adding two numbers", new string[] { + "ignore"}); +#line 37 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 38 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 39 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 40 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 41 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Not automated adding two numbers")] + public virtual void NotAutomatedAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated adding two numbers", ((string[])(null))); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 44 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 45 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 46 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/App.config b/test-harness/nunit/App.config new file mode 100644 index 000000000..b2982b130 --- /dev/null +++ b/test-harness/nunit/App.config @@ -0,0 +1,13 @@ + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/test-harness/nunit/FailingBackground.feature b/test-harness/nunit/FailingBackground.feature new file mode 100644 index 000000000..83a70483a --- /dev/null +++ b/test-harness/nunit/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/nunit/FailingBackground.feature.cs b/test-harness/nunit/FailingBackground.feature.cs new file mode 100644 index 000000000..22eccc05b --- /dev/null +++ b/test-harness/nunit/FailingBackground.feature.cs @@ -0,0 +1,125 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Background")] + public partial class FailingBackgroundFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "FailingBackground.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing Background", "This feature has a failing background.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the background step fails", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 6 + testRunner.And("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Add two numbers")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", ((string[])(null))); +#line 8 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 9 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 10 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 11 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 12 + 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("Adding several numbers")] + [NUnit.Framework.TestCaseAttribute("60", "70", "130", "260", null)] + [NUnit.Framework.TestCaseAttribute("40", "50", "90", "180", null)] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 16 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 17 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 18 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/Minimal Features/Failing.feature b/test-harness/nunit/Minimal Features/Failing.feature new file mode 100644 index 000000000..d7c5b7f53 --- /dev/null +++ b/test-harness/nunit/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step \ No newline at end of file diff --git a/test-harness/nunit/Minimal Features/Failing.feature.cs b/test-harness/nunit/Minimal Features/Failing.feature.cs new file mode 100644 index 000000000..f5c84a205 --- /dev/null +++ b/test-harness/nunit/Minimal Features/Failing.feature.cs @@ -0,0 +1,108 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.nunit.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing")] + public partial class FailingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Failing.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Feature Passing Scenario")] + public virtual void FailingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Feature Inconclusive Scenario")] + public virtual void FailingFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Feature Failing Scenario")] + public virtual void FailingFeatureFailingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Failing Scenario", ((string[])(null))); +#line 9 +this.ScenarioSetup(scenarioInfo); +#line 10 + testRunner.Then("failing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/Minimal Features/Inconclusive.feature b/test-harness/nunit/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..40c27b402 --- /dev/null +++ b/test-harness/nunit/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step \ No newline at end of file diff --git a/test-harness/nunit/Minimal Features/Inconclusive.feature.cs b/test-harness/nunit/Minimal Features/Inconclusive.feature.cs new file mode 100644 index 000000000..3bb3d2418 --- /dev/null +++ b/test-harness/nunit/Minimal Features/Inconclusive.feature.cs @@ -0,0 +1,95 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.nunit.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Inconclusive")] + public partial class InconclusiveFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Inconclusive.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Inconclusive", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Inconclusive Feature Passing Scenario")] + public virtual void InconclusiveFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Inconclusive Feature Inconclusive Scenario")] + public virtual void InconclusiveFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/Minimal Features/Passing.feature b/test-harness/nunit/Minimal Features/Passing.feature new file mode 100644 index 000000000..14bf35e22 --- /dev/null +++ b/test-harness/nunit/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/nunit/Minimal Features/Passing.feature.cs b/test-harness/nunit/Minimal Features/Passing.feature.cs new file mode 100644 index 000000000..a7b9a62ca --- /dev/null +++ b/test-harness/nunit/Minimal Features/Passing.feature.cs @@ -0,0 +1,82 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.nunit.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Passing")] + public partial class PassingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Passing.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Passing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Passing Feature Passing Scenario")] + public virtual void PassingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Passing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/NotAutomatedAtAll.feature b/test-harness/nunit/NotAutomatedAtAll.feature new file mode 100644 index 000000000..3bbfcb669 --- /dev/null +++ b/test-harness/nunit/NotAutomatedAtAll.feature @@ -0,0 +1,19 @@ +Feature: Not Automated At All + +Background: + Given unimplemented step + +Scenario: Not automated scenario 1 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 2 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 3 + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/nunit/NotAutomatedAtAll.feature.cs b/test-harness/nunit/NotAutomatedAtAll.feature.cs new file mode 100644 index 000000000..79b27b127 --- /dev/null +++ b/test-harness/nunit/NotAutomatedAtAll.feature.cs @@ -0,0 +1,134 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.nunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Not Automated At All")] + public partial class NotAutomatedAtAllFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "NotAutomatedAtAll.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Not Automated At All", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 3 +#line 4 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Not automated scenario 1")] + public virtual void NotAutomatedScenario1() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 1", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 7 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 8 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 9 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Not automated scenario 2")] + public virtual void NotAutomatedScenario2() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 2", ((string[])(null))); +#line 11 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 12 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 13 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 14 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Not automated scenario 3")] + public virtual void NotAutomatedScenario3() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 3", ((string[])(null))); +#line 16 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 17 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 18 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/Properties/AssemblyInfo.cs b/test-harness/nunit/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..0446e36be --- /dev/null +++ b/test-harness/nunit/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("nunit")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("nunit")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ba66d1f7-68a4-4307-ad63-abf63686ef9d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test-harness/nunit/ScenarioOutlines.feature b/test-harness/nunit/ScenarioOutlines.feature new file mode 100644 index 000000000..00efa6fc5 --- /dev/null +++ b/test-harness/nunit/ScenarioOutlines.feature @@ -0,0 +1,88 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + +Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + And I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/nunit/ScenarioOutlines.feature.cs b/test-harness/nunit/ScenarioOutlines.feature.cs new file mode 100644 index 000000000..781cc3c1d --- /dev/null +++ b/test-harness/nunit/ScenarioOutlines.feature.cs @@ -0,0 +1,182 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Scenario Outlines")] + public partial class ScenarioOutlinesFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenarioOutlines.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenario Outlines", "Here we demonstrate how we deal with scenario outlines", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario outline where all scenarios pass")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("pass_3", null)] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where all scenarios pass", exampleTags); +#line 4 +this.ScenarioSetup(scenarioInfo); +#line 8 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario outline where one scenario is inconclusive")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("inconclusive_1", null)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario is inconclusive", exampleTags); +#line 17 +this.ScenarioSetup(scenarioInfo); +#line 21 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario outline where one scenario fails")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("fail_1", null)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario fails", exampleTags); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 34 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("inconclusive_1", null)] + [NUnit.Framework.TestCaseAttribute("inconclusive_2", null)] + [NUnit.Framework.TestCaseAttribute("fail_1", null)] + [NUnit.Framework.TestCaseAttribute("fail_2", null)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections_(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("And we can go totally bonkers with multiple example sections.", exampleTags); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 45 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Deal correctly with backslashes in the examples")] + [NUnit.Framework.TestCaseAttribute("c:\\Temp\\", null)] + public virtual void DealCorrectlyWithBackslashesInTheExamples(string filePath, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with backslashes in the examples", exampleTags); +#line 63 +this.ScenarioSetup(scenarioInfo); +#line 65 + testRunner.When(string.Format("I have backslashes in the value, for example a \'{0}\'", filePath), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Deal correctly with parenthesis in the examples")] + [NUnit.Framework.TestCaseAttribute("This is a description (and more)", null)] + public virtual void DealCorrectlyWithParenthesisInTheExamples(string overlyDescriptiveField, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with parenthesis in the examples", exampleTags); +#line 72 +this.ScenarioSetup(scenarioInfo); +#line 74 + testRunner.When(string.Format("I have parenthesis in the value, for example an \'{0}\'", overlyDescriptiveField), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Deal correctly with overlong example values")] + [NUnit.Framework.TestCaseAttribute("Please enter a valid two letter country code (e.g. DE)!", "This is just a very very very veery long error message!", null)] + public virtual void DealCorrectlyWithOverlongExampleValues(string value1, string value2, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with overlong example values", exampleTags); +#line 80 +this.ScenarioSetup(scenarioInfo); +#line 82 + testRunner.When(string.Format("I have a field with value \'{0}\'", value1), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 83 + testRunner.And(string.Format("I have a field with value \'{0}\'", value2), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 84 + testRunner.Then("the scenario will \'pass_1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/ScenariosWithSpecialCharacters.feature b/test-harness/nunit/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..522ffd274 --- /dev/null +++ b/test-harness/nunit/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'PASS' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | \ No newline at end of file diff --git a/test-harness/nunit/ScenariosWithSpecialCharacters.feature.cs b/test-harness/nunit/ScenariosWithSpecialCharacters.feature.cs new file mode 100644 index 000000000..7c8caaf96 --- /dev/null +++ b/test-harness/nunit/ScenariosWithSpecialCharacters.feature.cs @@ -0,0 +1,138 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Scenarios With Special Characters")] + public partial class ScenariosWithSpecialCharactersFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenariosWithSpecialCharacters.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenarios With Special Characters", "Here we demonstrate usage of special characters in scenario names", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)")] + public virtual void ThisIsAScenarioWithParenthesesHyphenAndComma10_2030_40() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)", ((string[])(null))); +#line 7 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 8 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 9 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + 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("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [NUnit.Framework.TestCaseAttribute("**", null)] + [NUnit.Framework.TestCaseAttribute("++", null)] + [NUnit.Framework.TestCaseAttribute(".*", null)] + [NUnit.Framework.TestCaseAttribute("[]", null)] + [NUnit.Framework.TestCaseAttribute("{}", null)] + [NUnit.Framework.TestCaseAttribute("()", null)] + [NUnit.Framework.TestCaseAttribute("^.*(?BAR)\\s[^0-9]{3,4}A+$", null)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters(string regex, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario contains examples with Regex-special characters", exampleTags); +#line 21 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 22 + testRunner.When(string.Format("I have special characters for regexes in the value, for example a \'{0}\'", regex), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 23 + testRunner.Then("the scenario will \'PASS\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit/nunit.csproj b/test-harness/nunit/nunit.csproj new file mode 100644 index 000000000..22fa5ab23 --- /dev/null +++ b/test-harness/nunit/nunit.csproj @@ -0,0 +1,146 @@ + + + + + Debug + AnyCPU + {C13BF896-768D-47BC-86A0-99BC53CC54E6} + Library + Properties + Pickles.TestHarness.nunit + nunitHarness + v4.5 + 512 + ..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + + + + + + + + ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll + + + + + True + True + Addition.feature + + + FailingBackground.feature + True + True + + + Failing.feature + True + True + + + Inconclusive.feature + True + True + + + Passing.feature + True + True + + + True + True + NotAutomatedAtAll.feature + + + + ScenarioOutlines.feature + True + True + + + True + True + ScenariosWithSpecialCharacters.feature + + + + + SpecFlowSingleFileGenerator + Addition.feature.cs + + + + SpecFlowSingleFileGenerator + FailingBackground.feature.cs + + + SpecFlowSingleFileGenerator + Failing.feature.cs + + + SpecFlowSingleFileGenerator + Inconclusive.feature.cs + + + SpecFlowSingleFileGenerator + Passing.feature.cs + + + SpecFlowSingleFileGenerator + NotAutomatedAtAll.feature.cs + + + + SpecFlowSingleFileGenerator + ScenarioOutlines.feature.cs + + + SpecFlowSingleFileGenerator + ScenariosWithSpecialCharacters.feature.cs + + + + + {073862de-d599-4941-9716-03206cf1cfa2} + AutomationLayer + + + + + + + + \ No newline at end of file diff --git a/test-harness/nunit/packages.config b/test-harness/nunit/packages.config new file mode 100644 index 000000000..b8534f0c7 --- /dev/null +++ b/test-harness/nunit/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/test-harness/nunit3/Addition.feature b/test-harness/nunit3/Addition.feature new file mode 100644 index 000000000..238e261e9 --- /dev/null +++ b/test-harness/nunit3/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/nunit3/Addition.feature.cs b/test-harness/nunit3/Addition.feature.cs new file mode 100644 index 000000000..225fe90ea --- /dev/null +++ b/test-harness/nunit3/Addition.feature.cs @@ -0,0 +1,198 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Addition")] + public partial class AdditionFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Addition.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to avoid silly mistakes\r\nAs a math idiot\r\nI want to be told the sum of t" + + "wo numbers", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 6 +#line 7 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Adding several numbers")] + [NUnit.Framework.CategoryAttribute("tag2")] + [NUnit.Framework.TestCaseAttribute("60", "70", "130", "260", null)] + [NUnit.Framework.TestCaseAttribute("40", "50", "90", "180", null)] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + string[] @__tags = new string[] { + "tag2"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", @__tags); +#line 10 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 11 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 12 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 15 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Add two numbers")] + [NUnit.Framework.CategoryAttribute("tag1")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] { + "tag1"}); +#line 23 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 24 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 25 + testRunner.And("I have entered 2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 26 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 27 + testRunner.Then("the result should be 3 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Fail to add two numbers")] + [NUnit.Framework.CategoryAttribute("tag1")] + public virtual void FailToAddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fail to add two numbers", new string[] { + "tag1"}); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 31 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 32 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 34 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Ignored adding two numbers")] + [NUnit.Framework.IgnoreAttribute("")] + public virtual void IgnoredAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Ignored adding two numbers", new string[] { + "ignore"}); +#line 37 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 38 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 39 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 40 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 41 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Not automated adding two numbers")] + public virtual void NotAutomatedAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated adding two numbers", ((string[])(null))); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 44 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 45 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 46 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit3/App.config b/test-harness/nunit3/App.config new file mode 100644 index 000000000..6a85a1d39 --- /dev/null +++ b/test-harness/nunit3/App.config @@ -0,0 +1,13 @@ + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/test-harness/nunit3/FailingBackground.feature b/test-harness/nunit3/FailingBackground.feature new file mode 100644 index 000000000..83a70483a --- /dev/null +++ b/test-harness/nunit3/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/nunit3/FailingBackground.feature.cs b/test-harness/nunit3/FailingBackground.feature.cs new file mode 100644 index 000000000..74c03e4c4 --- /dev/null +++ b/test-harness/nunit3/FailingBackground.feature.cs @@ -0,0 +1,125 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Background")] + public partial class FailingBackgroundFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "FailingBackground.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing Background", "This feature has a failing background.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the background step fails", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 6 + testRunner.And("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Add two numbers")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", ((string[])(null))); +#line 8 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 9 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 10 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 11 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 12 + 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("Adding several numbers")] + [NUnit.Framework.TestCaseAttribute("60", "70", "130", "260", null)] + [NUnit.Framework.TestCaseAttribute("40", "50", "90", "180", null)] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 16 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 17 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 18 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit3/Minimal Features/Failing.feature b/test-harness/nunit3/Minimal Features/Failing.feature new file mode 100644 index 000000000..d7c5b7f53 --- /dev/null +++ b/test-harness/nunit3/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step \ No newline at end of file diff --git a/test-harness/nunit3/Minimal Features/Failing.feature.cs b/test-harness/nunit3/Minimal Features/Failing.feature.cs new file mode 100644 index 000000000..197f12476 --- /dev/null +++ b/test-harness/nunit3/Minimal Features/Failing.feature.cs @@ -0,0 +1,108 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing")] + public partial class FailingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Failing.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Feature Passing Scenario")] + public virtual void FailingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Feature Inconclusive Scenario")] + public virtual void FailingFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Failing Feature Failing Scenario")] + public virtual void FailingFeatureFailingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Failing Scenario", ((string[])(null))); +#line 9 +this.ScenarioSetup(scenarioInfo); +#line 10 + testRunner.Then("failing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit3/Minimal Features/Inconclusive.feature b/test-harness/nunit3/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..40c27b402 --- /dev/null +++ b/test-harness/nunit3/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step \ No newline at end of file diff --git a/test-harness/nunit3/Minimal Features/Inconclusive.feature.cs b/test-harness/nunit3/Minimal Features/Inconclusive.feature.cs new file mode 100644 index 000000000..315c63692 --- /dev/null +++ b/test-harness/nunit3/Minimal Features/Inconclusive.feature.cs @@ -0,0 +1,95 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Inconclusive")] + public partial class InconclusiveFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Inconclusive.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Inconclusive", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Inconclusive Feature Passing Scenario")] + public virtual void InconclusiveFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Inconclusive Feature Inconclusive Scenario")] + public virtual void InconclusiveFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit3/Minimal Features/Passing.feature b/test-harness/nunit3/Minimal Features/Passing.feature new file mode 100644 index 000000000..14bf35e22 --- /dev/null +++ b/test-harness/nunit3/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/nunit3/Minimal Features/Passing.feature.cs b/test-harness/nunit3/Minimal Features/Passing.feature.cs new file mode 100644 index 000000000..4618b0150 --- /dev/null +++ b/test-harness/nunit3/Minimal Features/Passing.feature.cs @@ -0,0 +1,82 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Passing")] + public partial class PassingFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Passing.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Passing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Passing Feature Passing Scenario")] + public virtual void PassingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Passing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit3/NotAutomatedAtAll.feature b/test-harness/nunit3/NotAutomatedAtAll.feature new file mode 100644 index 000000000..fe34b832d --- /dev/null +++ b/test-harness/nunit3/NotAutomatedAtAll.feature @@ -0,0 +1,11 @@ +Feature: NotAutomatedAtAll + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +@mytag +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen diff --git a/test-harness/nunit3/NotAutomatedAtAll.feature.cs b/test-harness/nunit3/NotAutomatedAtAll.feature.cs new file mode 100644 index 000000000..e6f2083b3 --- /dev/null +++ b/test-harness/nunit3/NotAutomatedAtAll.feature.cs @@ -0,0 +1,91 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("NotAutomatedAtAll")] + public partial class NotAutomatedAtAllFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "NotAutomatedAtAll.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "NotAutomatedAtAll", "In order to avoid silly mistakes\nAs a math idiot\nI want to be told the sum of two" + + " numbers", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Add two numbers")] + [NUnit.Framework.CategoryAttribute("mytag")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] { + "mytag"}); +#line 7 +this.ScenarioSetup(scenarioInfo); +#line 8 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 9 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + 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-harness/nunit3/Properties/AssemblyInfo.cs b/test-harness/nunit3/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..a1e149f02 --- /dev/null +++ b/test-harness/nunit3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("nunit3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("nunit3")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c5e91aee-8234-443a-a327-6a6581e49d4b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test-harness/nunit3/ScenarioOutlines.feature b/test-harness/nunit3/ScenarioOutlines.feature new file mode 100644 index 000000000..00efa6fc5 --- /dev/null +++ b/test-harness/nunit3/ScenarioOutlines.feature @@ -0,0 +1,88 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + +Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + And I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/nunit3/ScenarioOutlines.feature.cs b/test-harness/nunit3/ScenarioOutlines.feature.cs new file mode 100644 index 000000000..33f0a8a86 --- /dev/null +++ b/test-harness/nunit3/ScenarioOutlines.feature.cs @@ -0,0 +1,182 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Scenario Outlines")] + public partial class ScenarioOutlinesFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenarioOutlines.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenario Outlines", "Here we demonstrate how we deal with scenario outlines", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario outline where all scenarios pass")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("pass_3", null)] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where all scenarios pass", exampleTags); +#line 4 +this.ScenarioSetup(scenarioInfo); +#line 8 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario outline where one scenario is inconclusive")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("inconclusive_1", null)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario is inconclusive", exampleTags); +#line 17 +this.ScenarioSetup(scenarioInfo); +#line 21 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario outline where one scenario fails")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("fail_1", null)] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario fails", exampleTags); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 34 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("And we can go totally bonkers with multiple example sections.")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + [NUnit.Framework.TestCaseAttribute("pass_2", null)] + [NUnit.Framework.TestCaseAttribute("inconclusive_1", null)] + [NUnit.Framework.TestCaseAttribute("inconclusive_2", null)] + [NUnit.Framework.TestCaseAttribute("fail_1", null)] + [NUnit.Framework.TestCaseAttribute("fail_2", null)] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections_(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("And we can go totally bonkers with multiple example sections.", exampleTags); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 45 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Deal correctly with backslashes in the examples")] + [NUnit.Framework.TestCaseAttribute("c:\\Temp\\", null)] + public virtual void DealCorrectlyWithBackslashesInTheExamples(string filePath, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with backslashes in the examples", exampleTags); +#line 63 +this.ScenarioSetup(scenarioInfo); +#line 65 + testRunner.When(string.Format("I have backslashes in the value, for example a \'{0}\'", filePath), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Deal correctly with parenthesis in the examples")] + [NUnit.Framework.TestCaseAttribute("This is a description (and more)", null)] + public virtual void DealCorrectlyWithParenthesisInTheExamples(string overlyDescriptiveField, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with parenthesis in the examples", exampleTags); +#line 72 +this.ScenarioSetup(scenarioInfo); +#line 74 + testRunner.When(string.Format("I have parenthesis in the value, for example an \'{0}\'", overlyDescriptiveField), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Deal correctly with overlong example values")] + [NUnit.Framework.TestCaseAttribute("Please enter a valid two letter country code (e.g. DE)!", "This is just a very very very veery long error message!", null)] + public virtual void DealCorrectlyWithOverlongExampleValues(string value1, string value2, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with overlong example values", exampleTags); +#line 80 +this.ScenarioSetup(scenarioInfo); +#line 82 + testRunner.When(string.Format("I have a field with value \'{0}\'", value1), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 83 + testRunner.And(string.Format("I have a field with value \'{0}\'", value2), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 84 + testRunner.Then("the scenario will \'pass_1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit3/ScenariosWithSpecialCharacters.feature b/test-harness/nunit3/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..522ffd274 --- /dev/null +++ b/test-harness/nunit3/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'PASS' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | \ No newline at end of file diff --git a/test-harness/nunit3/ScenariosWithSpecialCharacters.feature.cs b/test-harness/nunit3/ScenariosWithSpecialCharacters.feature.cs new file mode 100644 index 000000000..233aa443f --- /dev/null +++ b/test-harness/nunit3/ScenariosWithSpecialCharacters.feature.cs @@ -0,0 +1,138 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.nunit3 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Scenarios With Special Characters")] + public partial class ScenariosWithSpecialCharactersFeature + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenariosWithSpecialCharacters.feature" +#line hidden + + [NUnit.Framework.TestFixtureSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenarios With Special Characters", "Here we demonstrate usage of special characters in scenario names", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.TestFixtureTearDownAttribute()] + 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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)")] + public virtual void ThisIsAScenarioWithParenthesesHyphenAndComma10_2030_40() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)", ((string[])(null))); +#line 7 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 8 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 9 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + 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("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)")] + [NUnit.Framework.TestCaseAttribute("pass_1", null)] + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("This scenario contains examples with Regex-special characters")] + [NUnit.Framework.TestCaseAttribute("**", null)] + [NUnit.Framework.TestCaseAttribute("++", null)] + [NUnit.Framework.TestCaseAttribute(".*", null)] + [NUnit.Framework.TestCaseAttribute("[]", null)] + [NUnit.Framework.TestCaseAttribute("{}", null)] + [NUnit.Framework.TestCaseAttribute("()", null)] + [NUnit.Framework.TestCaseAttribute("^.*(?BAR)\\s[^0-9]{3,4}A+$", null)] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters(string regex, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario contains examples with Regex-special characters", exampleTags); +#line 21 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 22 + testRunner.When(string.Format("I have special characters for regexes in the value, for example a \'{0}\'", regex), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 23 + testRunner.Then("the scenario will \'PASS\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/nunit3/nunit3.csproj b/test-harness/nunit3/nunit3.csproj new file mode 100644 index 000000000..0df369388 --- /dev/null +++ b/test-harness/nunit3/nunit3.csproj @@ -0,0 +1,146 @@ + + + + + Debug + AnyCPU + {C5E91AEE-8234-443A-A327-6A6581E49D4B} + Library + Properties + Pickles.TestHarness.nunit3 + nunit3Harness + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\NUnit.3.0.0\lib\net45\nunit.framework.dll + True + + + + + + + + + + + ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll + True + + + + + True + True + Addition.feature + + + FailingBackground.feature + True + True + + + Failing.feature + True + True + + + Inconclusive.feature + True + True + + + Passing.feature + True + True + + + True + True + NotAutomatedAtAll.feature + + + + ScenarioOutlines.feature + True + True + + + True + True + ScenariosWithSpecialCharacters.feature + + + + + SpecFlowSingleFileGenerator + Addition.feature.cs + + + + SpecFlowSingleFileGenerator + FailingBackground.feature.cs + + + SpecFlowSingleFileGenerator + Failing.feature.cs + + + SpecFlowSingleFileGenerator + Inconclusive.feature.cs + + + SpecFlowSingleFileGenerator + Passing.feature.cs + + + SpecFlowSingleFileGenerator + NotAutomatedAtAll.feature.cs + + + + SpecFlowSingleFileGenerator + ScenarioOutlines.feature.cs + + + SpecFlowSingleFileGenerator + ScenariosWithSpecialCharacters.feature.cs + + + + + {073862de-d599-4941-9716-03206cf1cfa2} + AutomationLayer + + + + + + + + \ No newline at end of file diff --git a/test-harness/nunit3/packages.config b/test-harness/nunit3/packages.config new file mode 100644 index 000000000..190bdf578 --- /dev/null +++ b/test-harness/nunit3/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/HTML.xslt b/test-harness/packagesNonNuget/xunit.runner/HTML.xslt new file mode 100644 index 000000000..2a1a4c72a --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/HTML.xslt @@ -0,0 +1,126 @@ + + + + + ]]> + + + + xUnit.net Test Results - <xsl:value-of select="@name"/> + + + + + +

Assemblies Run

+ + +

Summary

+
+ Tests run:   + Failures: , + Skipped: , + Run time: s +
+ +
+

Failed tests

+ +
+ +
+

Failed fixtures

+ +
+ +
+

Skipped tests

+ +
+
+

All tests

+
Click test class name to expand/collapse test details
+ + + +
+ + +
+
+ + +
+ altrow + s + Skipped + + +   + : +
+ +
+
+ +

Output

+
+
+
+
+ + + :
+ Stack Trace:
+
+
+ + +

+ s + + ToggleClass('class') + ToggleClass('class') + + +   +  ( tests) + +
+

+
+ display: none; + class + +
+
+ +
\ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/NUnitXml.xslt b/test-harness/packagesNonNuget/xunit.runner/NUnitXml.xslt new file mode 100644 index 000000000..4d82799f5 --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/NUnitXml.xslt @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + True + + + + + + + + + + + + + + + + + + False + True + + + + + + + + + + + + + + + + + + + + + + + + + False + True + + + + False + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/license.txt b/test-harness/packagesNonNuget/xunit.runner/license.txt new file mode 100644 index 000000000..b9e8a2b5d --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/license.txt @@ -0,0 +1,13 @@ +Copyright 2013 Outercurve Foundation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.exe new file mode 100644 index 000000000..25553d9fc Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.exe.config b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.exe.config new file mode 100644 index 000000000..1aae4c31f --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.exe.config @@ -0,0 +1,21 @@ + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.x86.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.x86.exe new file mode 100644 index 000000000..7b0dc7afd Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.x86.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.x86.exe.config b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.x86.exe.config new file mode 100644 index 000000000..24ca922c9 --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.console.clr4.x86.exe.config @@ -0,0 +1,21 @@ + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.console.exe new file mode 100644 index 000000000..08ede11a1 Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.console.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.exe.config b/test-harness/packagesNonNuget/xunit.runner/xunit.console.exe.config new file mode 100644 index 000000000..a253b460d --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.console.exe.config @@ -0,0 +1,21 @@ + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.x86.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.console.x86.exe new file mode 100644 index 000000000..4976fa087 Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.console.x86.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.console.x86.exe.config b/test-harness/packagesNonNuget/xunit.runner/xunit.console.x86.exe.config new file mode 100644 index 000000000..89e63fa2e --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.console.x86.exe.config @@ -0,0 +1,21 @@ + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.dll b/test-harness/packagesNonNuget/xunit.runner/xunit.dll new file mode 100644 index 000000000..c2534a82a Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.dll differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.dll.tdnet b/test-harness/packagesNonNuget/xunit.runner/xunit.dll.tdnet new file mode 100644 index 000000000..4d8afc8ef --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.dll.tdnet @@ -0,0 +1,5 @@ + + xUnit.net {0}.{1}.{2} build {3} + xunit.runner.tdnet.dll + Xunit.Runner.TdNet.TdNetRunner + \ No newline at end of file diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.extensions.dll b/test-harness/packagesNonNuget/xunit.runner/xunit.extensions.dll new file mode 100644 index 000000000..ea46cb16c Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.extensions.dll differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.extensions.xml b/test-harness/packagesNonNuget/xunit.runner/xunit.extensions.xml new file mode 100644 index 000000000..a0718b1d6 --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.extensions.xml @@ -0,0 +1,811 @@ + + + + xunit.extensions + + + + + A wrapper for Assert which is used by . + + + + + Verifies that a collection contains a given object. + + The type of the object to be verified + The object expected to be in the collection + The collection to be inspected + Thrown when the object is not present in the collection + + + + Verifies that a collection contains a given object, using an equality comparer. + + The type of the object to be verified + The object expected to be in the collection + The collection to be inspected + The comparer used to equate objects in the collection with the expected object + Thrown when the object is not present in the collection + + + + Verifies that a string contains a given sub-string, using the current culture. + + The sub-string expected to be in the string + The string to be inspected + Thrown when the sub-string is not present inside the string + + + + Verifies that a string contains a given sub-string, using the given comparison type. + + The sub-string expected to be in the string + The string to be inspected + The type of string comparison to perform + Thrown when the sub-string is not present inside the string + + + + Verifies that a collection does not contain a given object. + + The type of the object to be compared + The object that is expected not to be in the collection + The collection to be inspected + Thrown when the object is present inside the container + + + + Verifies that a collection does not contain a given object, using an equality comparer. + + The type of the object to be compared + The object that is expected not to be in the collection + The collection to be inspected + The comparer used to equate objects in the collection with the expected object + Thrown when the object is present inside the container + + + + Verifies that a string does not contain a given sub-string, using the current culture. + + The sub-string which is expected not to be in the string + The string to be inspected + Thrown when the sub-string is present inside the string + + + + Verifies that a string does not contain a given sub-string, using the current culture. + + The sub-string which is expected not to be in the string + The string to be inspected + The type of string comparison to perform + Thrown when the sub-string is present inside the given string + + + + Verifies that a block of code does not throw any exceptions. + + A delegate to the code to be tested + + + + Verifies that a collection is empty. + + The collection to be inspected + Thrown when the collection is null + Thrown when the collection is not empty + + + + Verifies that two objects are equal, using a default comparer. + + The type of the objects to be compared + The expected value + The value to be compared against + Thrown when the objects are not equal + + + + Verifies that two objects are equal, using a custom equatable comparer. + + The type of the objects to be compared + The expected value + The value to be compared against + The comparer used to compare the two objects + Thrown when the objects are not equal + + + + Verifies that two values are equal, within the number of decimal + places given by . + + The expected value + The value to be compared against + The number of decimal places (valid values: 0-15) + Thrown when the values are not equal + + + + Verifies that two values are equal, within the number of decimal + places given by . + + The expected value + The value to be compared against + The number of decimal places (valid values: 0-15) + Thrown when the values are not equal + + + + Verifies that the condition is false. + + The condition to be tested + Thrown if the condition is not false + + + + Verifies that the condition is false. + + The condition to be tested + The message to show when the condition is not false + Thrown if the condition is not false + + + + Verifies that a value is within a given range. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + Thrown when the value is not in the given range + + + + Verifies that a value is within a given range, using a comparer. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + The comparer used to evaluate the value's range + Thrown when the value is not in the given range + + + + Verifies that an object is of the given type or a derived type. + + The type the object should be + The object to be evaluated + The object, casted to type T when successful + Thrown when the object is not the given type + + + + Verifies that an object is of the given type or a derived type. + + The type the object should be + The object to be evaluated + Thrown when the object is not the given type + + + + Verifies that an object is not exactly the given type. + + The type the object should not be + The object to be evaluated + Thrown when the object is the given type + + + + Verifies that an object is not exactly the given type. + + The type the object should not be + The object to be evaluated + Thrown when the object is the given type + + + + Verifies that an object is exactly the given type (and not a derived type). + + The type the object should be + The object to be evaluated + The object, casted to type T when successful + Thrown when the object is not the given type + + + + Verifies that an object is exactly the given type (and not a derived type). + + The type the object should be + The object to be evaluated + Thrown when the object is not the given type + + + + Verifies that a collection is not empty. + + The collection to be inspected + Thrown when a null collection is passed + Thrown when the collection is empty + + + + Verifies that two objects are not equal, using a default comparer. + + The type of the objects to be compared + The expected object + The actual object + Thrown when the objects are equal + + + + Verifies that two objects are not equal, using a custom equality comparer. + + The type of the objects to be compared + The expected object + The actual object + The comparer used to examine the objects + Thrown when the objects are equal + + + + Verifies that a value is not within a given range, using the default comparer. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + Thrown when the value is in the given range + + + + Verifies that a value is not within a given range, using a comparer. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + The comparer used to evaluate the value's range + Thrown when the value is in the given range + + + + Verifies that an object reference is not null. + + The object to be validated + Thrown when the object is not null + + + + Verifies that two objects are not the same instance. + + The expected object instance + The actual object instance + Thrown when the objects are the same instance + + + + Verifies that an object reference is null. + + The object to be inspected + Thrown when the object reference is not null + + + + Verifies that two objects are the same instance. + + The expected object instance + The actual object instance + Thrown when the objects are not the same instance + + + + Verifies that the given collection contains only a single + element of the given type. + + The collection. + The single item in the collection. + Thrown when the collection does not contain + exactly one element. + + + + Verifies that the given collection contains only a single + element of the given type. + + The collection type. + The collection. + The single item in the collection. + Thrown when the collection does not contain + exactly one element. + + + + Verifies that the exact exception is thrown (and not a derived exception type). + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that the exact exception is thrown (and not a derived exception type). + Generally used to test property accessors. + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that the exact exception is thrown (and not a derived exception type). + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that the exact exception is thrown (and not a derived exception type). + Generally used to test property accessors. + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that an expression is true. + + The condition to be inspected + Thrown when the condition is false + + + + Verifies that an expression is true. + + The condition to be inspected + The message to be shown when the condition is false + Thrown when the condition is false + + + + A class which can be derived from for test classes, which bring an overridable version + of Assert (using the class. + + + + + Gets a class which provides assertions. + + + + + Apply this attribute to your test method to replace the + with another role. + + + + + Replaces the identity of the current thread with . + + The role's name + + + + Restores the original . + + The method under test + + + + Stores the current and replaces it with + a new role identified in constructor. + + The method under test + + + + Gets the name. + + + + + Apply this attribute to your test method to automatically create a + that is rolled back when the test is + finished. + + + + + Rolls back the transaction. + + + + + Creates the transaction. + + + + + Gets or sets the isolation level of the transaction. + Default value is .Unspecified. + + + + + Gets or sets the scope option for the transaction. + Default value is .Required. + + + + + Gets or sets the timeout of the transaction, in milliseconds. + By default, the transaction will not timeout. + + + + + Provides a data source for a data theory, with the data coming from a class + which must implement IEnumerable<object[]>. + + + + + Abstract attribute which represents a data source for a data theory. + Data source providers derive from this attribute and implement GetData + to return the data for the theory. + + + + + Returns the data to be used to test the theory. + + + The parameter is provided so that the + test data can be converted to the destination parameter type when necessary. + Generally, data should NOT be automatically converted, UNLESS the source data + format does not have rich types (for example, all numbers in Excel spreadsheets + are returned as even if they are integers). Derivers of + this class should NOT throw exceptions for mismatched types or mismatched number + of parameters; the test framework will throw these exceptions at the correct + time. + + The method that is being tested + The types of the parameters for the test method + The theory data + + + + + + + Initializes a new instance of the class. + + The class that provides the data. + + + + + + + Gets the type of the class that provides the data. + + + + + Represents an implementation of which uses an + instance of to get the data for a + decorated test method. + + + + + + + + Converts a parameter to its destination parameter type, if necessary. + + The parameter value + The destination parameter type (null if not known) + The converted parameter value + + + + Gets the data adapter to be used to retrieve the test data. + + + + + Provides a data source for a data theory, with the data coming from inline values. + + + + + Initializes a new instance of the class. + + The data values to pass to the theory + + + + Returns the data to be used to test the theory. + + The method that is being tested + The types of the parameters for the test method + The theory data, in table form + + + + Gets the data values. + + + + + Provides a data source for a data theory, with the data coming from an OLEDB connection. + + + + + Creates a new instance of . + + The OLEDB connection string to the data + The SELECT statement used to return the data for the theory + + + + Gets the connection string. + + + + + Gets the select statement. + + + + + + + + Provides a data source for a data theory, with the data coming from a public static property on the test class. + The property must return IEnumerable<object[]> with the test data. + + + + + Creates a new instance of / + + The name of the public static property on the test class that will provide the test data + + + + Returns the data to be used to test the theory. + + The method that is being tested + The types of the parameters for the test method + The theory data, in table form + + + + Gets the property name. + + + + + Gets or sets the type to retrieve the property data from. If not set, then the property will be + retrieved from the unit test class. + + + + + Provides a data source for a data theory, with the data coming a Microsoft SQL Server. + + + + + Creates a new instance of , using a trusted connection. + + The server name of the Microsoft SQL Server + The database name + The SQL SELECT statement to return the data for the data theory + + + + Creates a new instance of , using the provided username and password. + + The server name of the Microsoft SQL Server + The database name + The username for the server + The password for the server + The SQL SELECT statement to return the data for the data theory + + + + Provides a data source for a data theory, with the data coming a Microsoft Excel (.xls) spreadsheet. + + + + + Creates a new instance of . + + The filename of the XLS spreadsheet file; if the filename provided + is relative, then it is relative to the location of xunit.extensions.dll. + The SELECT statement that returns the data for the theory + + + + + + + A wrapper around the static operations on which allows time + to be frozen using the . The clock begins in the + thawed state; that is, calls to , , and + return current (non-frozen) values. + + + + + Freezes the clock with the current time. + Until is called, all calls to , , and + will return the exact same values. + + + + + Freezes the clock with the given date and time, considered to be local time. + Until is called, all calls to , , and + will return the exact same values. + + The local date and time to freeze to + + + + Freezes the clock with the given date and time, considered to be Coordinated Universal Time (UTC). + Until is called, all calls to , , and + will return the exact same values. + + The UTC date and time to freeze to + + + + Thaws the clock so that , , and + return normal values. + + + + + Gets a object that is set to the current date and time on this computer, + expressed as the local time. + + + + + Gets the current date. + + + + + Gets a object that is set to the current date and time on this computer, + expressed as the Coordinated Universal Time (UTC). + + + + + Apply this attribute to your test method to freeze the time represented by the + class. + + + + + Freeze the clock with the current date and time. + + + + + Freeze the clock with the given date, considered to be local time. + + The frozen year + The frozen month + The frozen day + + + + Freeze the clock with the given date and time, considered to be in local time. + + The frozen year + The frozen month + The frozen day + The frozen hour + The frozen minute + The frozen second + + + + Freeze the clock with the given date and time, with the given kind of time. + + The frozen year + The frozen month + The frozen day + The frozen hour + The frozen minute + The frozen second + The frozen time kind + + + + Thaws the clock. + + The method under test + + + + Freezes the clock. + + The method under test + + + + Marks a test method as being a data theory. Data theories are tests which are fed + various bits of data from a data source, mapping to parameters on the test method. + If the data source contains multiple rows, then the test method is executed + multiple times (once with each data row). + + + + + Creates instances of which represent individual intended + invocations of the test method, one per data row in the data source. + + The method under test + An enumerator through the desired test method invocations + + + + Represents a single invocation of a data theory test method. + + + + + Creates a new instance of . + + The method under test + The parameters to be passed to the test method + + + + Creates a new instance of based on a generic theory. + + The method under test + The parameters to be passed to the test method + The generic types that were used to resolved the generic method. + + + + + + + Gets the parameter values that are passed to the test method. + + + + + Apply to a test method to trace the method begin and end. + + + + + This method is called before the test method is executed. + + The method under test + + + + This method is called after the test method is executed. + + The method under test + + + diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.gui.clr4.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.clr4.exe new file mode 100644 index 000000000..e2ab1b197 Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.clr4.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.gui.clr4.x86.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.clr4.x86.exe new file mode 100644 index 000000000..22465a7df Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.clr4.x86.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.gui.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.exe new file mode 100644 index 000000000..212499861 Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.gui.x86.exe b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.x86.exe new file mode 100644 index 000000000..7f73bb2fb Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.gui.x86.exe differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.runner.msbuild.dll b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.msbuild.dll new file mode 100644 index 000000000..020857f9c Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.msbuild.dll differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.runner.tdnet.dll b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.tdnet.dll new file mode 100644 index 000000000..2c5b1b38e Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.tdnet.dll differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.runner.utility.dll b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.utility.dll new file mode 100644 index 000000000..c22d73336 Binary files /dev/null and b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.utility.dll differ diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.runner.utility.xml b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.utility.xml new file mode 100644 index 000000000..0b2e37bd2 --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.runner.utility.xml @@ -0,0 +1,1212 @@ + + + + xunit.runner.utility + + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + + Wraps calls to the Executor. Used by runners to perform version-resilient test + enumeration and execution. + + + + + Wraps calls to the Executor. Used by runners to perform version-resilient test + enumeration and execution. + + + + + Enumerates the tests in an assembly. + + The fully-formed assembly node of the XML + + + + Gets a count of the tests in the assembly. + + Returns the number of tests, if known; returns -1 if not known. May not represent + an exact count, but should be a best effort guess by the framework. + + + + Runs all the tests in an assembly. + + The callback which is called as each test/class/assembly is + finished, providing XML nodes that are part of the xUnit.net XML output format. + Test runs can be cancelled by returning false to the callback. If null, there are + no status callbacks (and cancellation isn't possible). + Returns the fully-formed assembly node for the assembly that was just run. + + + + Runs all the tests in the given class. + + The type. + The callback which is called as each test/class is + finished, providing XML nodes that are part of the xUnit.net XML output format. + Test runs can be cancelled by returning false to the callback. If null, there are + no status callbacks (and cancellation isn't possible). + Returns the fully-formed class node for the class that was just run. + + + + Runs a single test in a class. + + The type to run. + The method to run. + The callback which is called as each test/class is + finished, providing XML nodes that are part of the xUnit.net XML output format. + Test runs can be cancelled by returning false to the callback. If null, there are + no status callbacks (and cancellation isn't possible). + Returns the fully-formed class node for the class of the test that was just run. + + + + Runs several tests in a single class. + + The type. + The methods to run. + The callback which is called as each test/class is + finished, providing XML nodes that are part of the xUnit.net XML output format. + Test runs can be cancelled by returning false to the callback. If null, there are + no status callbacks (and cancellation isn't possible). + Returns the fully-formed class node for the class of the tests that were just run. + + + + Gets the full pathname to the assembly under test. + + + + + Gets the full pathname to the configuration file. + + + + + Gets the version of xunit.dll used by the test assembly. + + + + + Initializes the class. + + + + + Initializes a new instance of the class. + + The assembly filename. + The config filename. If null, the default config filename will be used. + Set to true to enable shadow copying; false, otherwise. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + THIS CLASS IS FOR INTERNAL USE ONLY. + + + + + + + + + + + THIS CLASS IS FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + THIS CLASS IS FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + THIS CLASS IS FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + + + + + + + + + + THIS CLASS IS FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + + + + THIS CLASS IS FOR INTERNAL USE ONLY. + + + + + + + + + + + + + + THIS CLASS IS FOR INTERNAL USE ONLY. + + + + + + + + + + + The callback object which receives real-time status notifications from the + test runner. + + + + + Called when the assembly has finished running. + + The test assembly. + The total number of tests run. + The number of failed tests. + The number of skipped tests. + The time taken to run, in seconds. + + + + Called when the assembly has started running. + + The test assembly. + + + + Called when a class failure is encountered (i.e., when a fixture from + IUseFixture throws an exception during construction or . + + The test class. + The full type name of the exception. + The exception message. + The exception stack trace. + + + + + Called when an exception is thrown (i.e., a catastrophic failure of the testing system). + + The test assembly. + The exception that was thrown. + + + + Called when a test has finished running, regardless of what the result was. + + The test method. + Return true to continue running tests; return false to stop the test run. + + + + Called when a test has started running. + + The test method. + Return true to continue running tests; return false to stop the test run. + + + + Represents the ability to load and unload test assemblies, as well as enumerate + the test assemblies, the test methods, and run tests. + + + + + Represents the ability to enumerate and filter test methods. + + + + + Enumerates all test methods. + + + + + Enumerates test methods which pass the given filter. + + The test method filter. + + + + The test assemblies loaded into the environment. + + + + + + + + Enumerates the test assemblies in the environment. + + + + + + + + + + + Enumerates the traits across all the loaded assemblies. + + + + + Loads the specified assembly, using the default configuration file. + + The assembly filename. + The which represents the newly + loaded test assembly. + + + + Loads the specified assembly using the specified configuration file. + + The assembly filename. + The config filename. + The which represents the newly + loaded test assembly. + + + + Loads the specified assembly using the specified configuration file. + + The assembly filename. + The config filename. + Whether the DLLs should be shadow copied. + The which represents the newly + loaded test assembly. + + + + Adds the assembly loaded into the given + into the environment. + + The executor wrapper. + The which represents the newly + loaded test assembly. + + + + Runs the specified test methods. + + The test methods to run. + The run status information callback. + Returns the result as XML. + + + + Unloads the specified assembly. + + The assembly to unload. + + + + Represents a failed test run in the object model. + + + + + Base class for all test results in the object model. + + + + + Initializes a new instance of the class. + + The duration the test took to run. For skipped tests, should be 0.0. + The display name of the test result. + + + + Gets the display name of the test result. + + + + + Gets the duration the test took to run. + + + + + Initializes a new instance of the class. + + The duration the test took to run. + The display name of the test result. + The output that was captured during the test run. + Type of the exception. + The exception message. + The exception stack trace. + + + + Gets the output that was captured during the test run. + + + + + Gets the type of the exception. + + + + + Gets the exception message. + + + + + Gets the exception stack trace. + + + + + Represents a skipped test run in the object model. + + + + + Initializes a new instance of the class. + + The display name of the test result. + The skip reason. + + + + Gets the skip reason. + + + + + Acts as an and adapts the callback messages + into calls to an instance of . + + + + + Represents a logger used by and . + + + + + Called when the assembly has finished running. + + The assembly filename. + The total number of tests run. + The number of failed tests. + The number of skipped tests. + The time taken to run, in seconds. + + + + Called when the assembly has started running. + + The assembly filename. + The configuration filename, if given; null, otherwise. + The version of xunit.dll. + + + + Called when a class failure is encountered (i.e., when a fixture from + IUseFixture throws an exception during construction or . + + The full type name of the class. + The full type name of the exception. + The exception message. + The exception stack trace. + + + + + Called when an exception is thrown (i.e., a catastrophic failure of the testing system). + + The assembly filename. + The exception that was thrown. + + + + Called when a test fails. + + The description name of the test. + The full type name of the test class. + The name of the method. + The time spent running the test, in seconds. + The output of the test during its run. + The full type name of the exception. + The exception message. + The exception stack trace. + + + + Called when a test has finished running, regardless of what the result was. + + The description name of the test. + The full type name of the test class. + The name of the method. + Return true to continue running tests; return false to stop the test run. + + + + Called when a test has passed. + + The description name of the test. + The full type name of the test class. + The name of the method. + The time spent running the test, in seconds. + The output of the test during its run. + + + + Called when a test was finished. + + The description name of the test. + The full type name of the test class. + The name of the method. + The skip reason. + + + + Called when a test has started running. + + The description name of the test. + The full type name of the test class. + The name of the method. + Return true to continue running tests; return false to stop the test run. + + + + Initializes a new instance of the class. + + The test class. + The run status information callback. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents a passed test run in the object model. + + + + + Initializes a new instance of the class. + + The duration the test took to run. + The display name of the test result. + The output that was captured during the test run. + + + + Gets the output that was captured during the test run. + + + + + Indicates the composite test method status + + + + + The method has not been run + + + + + All test results for the last run passed + + + + + At least one test result for the last run failed + + + + + At least one test result for the last run was skipped, and none failed + + + + + Represents a set of filters for an . + + + + + Initializes a new instance of the class. + + + + + Filters the given method using the defined filter values. + + The methods to filter. + Returns true if the method passed the filter; return false otherwise. + + + + Gets the set of trait filters for tests to exclude. + + + + + Gets the set of trait filters for tests to include. + + + + + Represents an xUnit Test Project file (.xunit file) + + + + + Initializes a new instance of the class. + + + + + Adds an assembly to the project + + The assembly to be added + + + + Loads an xUnit.net Test Project file from disk. + + The test project filename + + + + Removes assembly from the assembly list + + The assembly to be removed + + + + Saves the xUnit.net Test Project file to disk using the project's filename. + + + + + Saves the xUnit.net Test Project file to disk using the provided filename. + The projects filename is updated to match this new name. + + The test project filename + + + + Gets or sets the assemblies in the project. + + + + + Gets or set the filename of the project. + + + + + Gets the filters applied to this project. + + + + + Gets or sets a flag which indicates if this project has been modified since + the last time it was loaded or saved. + + + + + Represents an assembly in an . + + + + + Initializes a new instance of the class. + + + + + Gets or sets the assembly filename. + + + + + Gets or sets the config filename. + + + + + Gets or sets a value indicating whether to shadow copy the assembly + when running the tests. + + + The xUnit.net GUI runner does not support this field. + + + + + Gets or sets the output filenames. The dictionary key is the type + of the file to be output; the dictionary value is the filename to + write the output to. + + + The xUnit.net GUI runner does not support this field. The MSBuild + runner only supports output of type 'xml', 'html', and 'nunit'. + + + + + Interface which represents a high level test runner. + + + + + Executes the tests in the assembly. + + Returns true if there were no failures; return false otherwise. + + + + Executes the tests in the assembly, and then executes the transforms with the + resulting assembly XML. + + The transforms to execute. + Returns true if there were no failures; return false otherwise. + + + + Runs the class. + + The type. + + + + + Runs a single test in a test class. + + The full name of the class. + The name of the method. + + + + Runs the list of tests in a test class. + + The full name of the class. + The names of the methods to run. + + + + Represents a single test assembly with test classes. + + + + + Initializes a new instance of the class. + + The executor wrapper. + The test classes. + + + + + + + Enumerates the test classes in the assembly. + + + + + + + + + + + Runs the specified test methods. + + The test methods to run. + The run status information callback. + Returns the result as XML. + + + + Gets the assembly filename. + + + + + Gets the config filename. + + + + + Gets the executor wrapper. + + + + + Gets the version of xunit.dll that the tests are linked against. + + + + + Represents a single class with test methods. + + + + + Initializes a new instance of the class. + + The namespace-qualified type name that + this class represents. + The test methods inside this test class. + + + + + + + + + + Runs the specified test methods. + + The test methods to run. + The run status information callback. + Returns the result as XML. + + + + Runs the specified tests in the given type, calling the callback as appropriate. + This override point exists primarily for unit testing purposes. + + The test methods to run + The run status information callback. + + + + Gets the test assembly that this class belongs to. + + + + + Gets the namespace-qualified type name of this class. + + + + + Represents a single test method. + + + + + Initializes a new instance of the class. + + The method name. + The method's display name. + The method's traits. + + + + Gets the method's display name. + + + + + Gets the method's name. + + + + + Gets the run results for the last run. + + + + + Gets the composite run status for all the results of the last run. + + + + + Gets the test class this test method belongs to. + + + + + Gets the method's traits. + + + + + The result of a test run via . + + + + + All tests passed, with no class-level failures + + + + + At least one test failed, or there was a class-level failure + + + + + There were no tests to run + + + + + Represents a transformation of the resulting assembly XML into some output format. + + + + + Transforms the given assembly XML into the destination format. + + The assembly XML. + + + + Gets the output filename, if known; returns null if the output isn't done to file. + + + + + Runs tests in an assembly, and transforms the XML results into calls to + the provided . + + + + + Initializes a new instance of the class. + + The executor wrapper. + The logger. + + + + + + + + + + + + + + + + + + + An implementation of which writes the + XML to a file without any transformation applied. + + + + + Initializes a new instance of the class. + + The output filename. + + + + + + + + + + An implementation of which writes the + XML to a file after applying the XSL stylesheet in the given stream. + + + + + Initializes a new instance of the class. + + The XSL filename. + The output filename. + + + + Initializes a new instance of the class. + + The stream with the XSL stylesheet. + The output filename. + + + + + + + + + + Gets or sets the XSL filename. + + + + + Gets or sets the XSL stream. + + + + + A dictionary which contains multiple unique values for each key. + + The type of the key. + The type of the value. + + + + Adds the value for the given key. If the key does not exist in the + dictionary yet, it will add it. + + The key. + The value. + + + + Removes all keys and values from the dictionary. + + + + + Determines whether the dictionary contains to specified key and value. + + The key. + The value. + + + + Calls the delegate once for each key/value pair in the dictionary. + + + + + Removes the given key and all of its values. + + + + + Removes the given value from the given key. If this was the + last value for the key, then the key is removed as well. + + The key. + The value. + + + + Gets the values for the given key. + + + + + Gets the count of the keys in the dictionary. + + + + + Gets the keys. + + + + + + + + Responsible for building instances. Uses an instance + of to interrogate the list of available tests + and create the entire object model tree. + + + + + Creates a which is a complete object model over + the tests inside of instance of . + + The executor wrapper + The fully populated object model + + + + Parses the XML nodes from the version resilient runner facility and converts + them into calls against the provided . + + + + + Logs a result XML node. Maybe be any kind of XML node. + + The node to be logged. + The logger. + Returns true if the user wishes to continue running tests; returns false otherwise. + + + + Logs the assembly node by calling . + + The assembly node. + The logger. + + + + Logs the class node by calling (if the class failed). + The exception type was added in xUnit.net 1.1, so when the test assembly is linked against + xUnit.net versions prior to 1.1, the exception type will be null. + + The class node. + The logger. + Returns true if the user wishes to continue running tests; returns false otherwise. + + + + Logs the start node by calling . The start node was added + in xUnit.net 1.1, so it will only be present when the test assembly is linked against xunit.dll + version 1.1 or later. + + The start node. + The logger. + Returns true if the user wishes to continue running tests; returns false otherwise. + + + + Logs the test node by calling . It will also call + , , or + as appropriate. + + The test node. + The logger. + Returns true if the user wishes to continue running tests; returns false otherwise. + + + diff --git a/test-harness/packagesNonNuget/xunit.runner/xunit.xml b/test-harness/packagesNonNuget/xunit.runner/xunit.xml new file mode 100644 index 000000000..d8b316f50 --- /dev/null +++ b/test-harness/packagesNonNuget/xunit.runner/xunit.xml @@ -0,0 +1,2611 @@ + + + + xunit + + + + + Contains various static methods that are used to verify that conditions are met during the + process of running tests. + + + + + Initializes a new instance of the class. + + + + + Verifies that a collection contains a given object. + + The type of the object to be verified + The object expected to be in the collection + The collection to be inspected + Thrown when the object is not present in the collection + + + + Verifies that a collection contains a given object, using an equality comparer. + + The type of the object to be verified + The object expected to be in the collection + The collection to be inspected + The comparer used to equate objects in the collection with the expected object + Thrown when the object is not present in the collection + + + + Verifies that a string contains a given sub-string, using the current culture. + + The sub-string expected to be in the string + The string to be inspected + Thrown when the sub-string is not present inside the string + + + + Verifies that a string contains a given sub-string, using the given comparison type. + + The sub-string expected to be in the string + The string to be inspected + The type of string comparison to perform + Thrown when the sub-string is not present inside the string + + + + Verifies that a collection does not contain a given object. + + The type of the object to be compared + The object that is expected not to be in the collection + The collection to be inspected + Thrown when the object is present inside the container + + + + Verifies that a collection does not contain a given object, using an equality comparer. + + The type of the object to be compared + The object that is expected not to be in the collection + The collection to be inspected + The comparer used to equate objects in the collection with the expected object + Thrown when the object is present inside the container + + + + Verifies that a string does not contain a given sub-string, using the current culture. + + The sub-string which is expected not to be in the string + The string to be inspected + Thrown when the sub-string is present inside the string + + + + Verifies that a string does not contain a given sub-string, using the current culture. + + The sub-string which is expected not to be in the string + The string to be inspected + The type of string comparison to perform + Thrown when the sub-string is present inside the given string + + + + Verifies that a block of code does not throw any exceptions. + + A delegate to the code to be tested + + + + Verifies that a collection is empty. + + The collection to be inspected + Thrown when the collection is null + Thrown when the collection is not empty + + + + Verifies that two objects are equal, using a default comparer. + + The type of the objects to be compared + The expected value + The value to be compared against + Thrown when the objects are not equal + + + + Verifies that two objects are equal, using a custom equatable comparer. + + The type of the objects to be compared + The expected value + The value to be compared against + The comparer used to compare the two objects + Thrown when the objects are not equal + + + + Verifies that two values are equal, within the number of decimal + places given by . + + The expected value + The value to be compared against + The number of decimal places (valid values: 0-15) + Thrown when the values are not equal + + + + Verifies that two values are equal, within the number of decimal + places given by . + + The expected value + The value to be compared against + The number of decimal places (valid values: 0-15) + Thrown when the values are not equal + + + + Verifies that two sequences are equivalent, using a default comparer. + + The type of the objects to be compared + The expected value + The value to be compared against + Thrown when the objects are not equal + + + + Verifies that two sequences are equivalent, using a custom equatable comparer. + + The type of the objects to be compared + The expected value + The value to be compared against + The comparer used to compare the two objects + Thrown when the objects are not equal + + + Do not call this method. + + + + Verifies that the condition is false. + + The condition to be tested + Thrown if the condition is not false + + + + Verifies that the condition is false. + + The condition to be tested + The message to show when the condition is not false + Thrown if the condition is not false + + + + Verifies that a value is within a given range. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + Thrown when the value is not in the given range + + + + Verifies that a value is within a given range, using a comparer. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + The comparer used to evaluate the value's range + Thrown when the value is not in the given range + + + + Verifies that an object is of the given type or a derived type. + + The type the object should be + The object to be evaluated + The object, casted to type T when successful + Thrown when the object is not the given type + + + + Verifies that an object is of the given type or a derived type. + + The type the object should be + The object to be evaluated + Thrown when the object is not the given type + + + + Verifies that an object is not exactly the given type. + + The type the object should not be + The object to be evaluated + Thrown when the object is the given type + + + + Verifies that an object is not exactly the given type. + + The type the object should not be + The object to be evaluated + Thrown when the object is the given type + + + + Verifies that an object is exactly the given type (and not a derived type). + + The type the object should be + The object to be evaluated + The object, casted to type T when successful + Thrown when the object is not the given type + + + + Verifies that an object is exactly the given type (and not a derived type). + + The type the object should be + The object to be evaluated + Thrown when the object is not the given type + + + + Verifies that a collection is not empty. + + The collection to be inspected + Thrown when a null collection is passed + Thrown when the collection is empty + + + + Verifies that two objects are not equal, using a default comparer. + + The type of the objects to be compared + The expected object + The actual object + Thrown when the objects are equal + + + + Verifies that two objects are not equal, using a custom equality comparer. + + The type of the objects to be compared + The expected object + The actual object + The comparer used to examine the objects + Thrown when the objects are equal + + + + Verifies that two sequences are not equivalent, using a default comparer. + + The type of the objects to be compared + The expected object + The actual object + Thrown when the objects are equal + + + + Verifies that two sequences are not equivalent, using a custom equality comparer. + + The type of the objects to be compared + The expected object + The actual object + The comparer used to compare the two objects + Thrown when the objects are equal + + + + Verifies that a value is not within a given range, using the default comparer. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + Thrown when the value is in the given range + + + + Verifies that a value is not within a given range, using a comparer. + + The type of the value to be compared + The actual value to be evaluated + The (inclusive) low value of the range + The (inclusive) high value of the range + The comparer used to evaluate the value's range + Thrown when the value is in the given range + + + + Verifies that an object reference is not null. + + The object to be validated + Thrown when the object is not null + + + + Verifies that two objects are not the same instance. + + The expected object instance + The actual object instance + Thrown when the objects are the same instance + + + + Verifies that an object reference is null. + + The object to be inspected + Thrown when the object reference is not null + + + + Verifies that the provided object raised INotifyPropertyChanged.PropertyChanged + as a result of executing the given test code. + + The object which should raise the notification + The property name for which the notification should be raised + The test code which should cause the notification to be raised + Thrown when the notification is not raised + + + + Verifies that two objects are the same instance. + + The expected object instance + The actual object instance + Thrown when the objects are not the same instance + + + + Verifies that the given collection contains only a single + element of the given type. + + The collection. + The single item in the collection. + Thrown when the collection does not contain + exactly one element. + + + + Verifies that the given collection contains only a single + element of the given value. The collection may or may not + contain other values. + + The collection. + The value to find in the collection. + The single item in the collection. + Thrown when the collection does not contain + exactly one element. + + + + Verifies that the given collection contains only a single + element of the given type. + + The collection type. + The collection. + The single item in the collection. + Thrown when the collection does not contain + exactly one element. + + + + Verifies that the given collection contains only a single + element of the given type which matches the given predicate. The + collection may or may not contain other values which do not + match the given predicate. + + The collection type. + The collection. + The item matching predicate. + The single item in the filtered collection. + Thrown when the filtered collection does + not contain exactly one element. + + + + Verifies that the exact exception is thrown (and not a derived exception type). + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that the exact exception is thrown (and not a derived exception type). + Generally used to test property accessors. + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that the exact exception is thrown (and not a derived exception type). + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that the exact exception is thrown (and not a derived exception type). + Generally used to test property accessors. + + The type of the exception expected to be thrown + A delegate to the code to be tested + The exception that was thrown, when successful + Thrown when an exception was not thrown, or when an exception of the incorrect type is thrown + + + + Verifies that an expression is true. + + The condition to be inspected + Thrown when the condition is false + + + + Verifies that an expression is true. + + The condition to be inspected + The message to be shown when the condition is false + Thrown when the condition is false + + + + Used by the PropertyChanged. + + + + + Used by the Throws and DoesNotThrow methods. + + + + + Used by the Throws and DoesNotThrow methods. + + + + + This command sets up the necessary trace listeners and standard + output/error listeners to capture Assert/Debug.Trace failures, + output to stdout/stderr, and Assert/Debug.Write text. It also + captures any exceptions that are thrown and packages them as + FailedResults, including the possibility that the configuration + file is messed up (which is exposed when we attempt to manipulate + the trace listener list). + + + + + Base class used by commands which delegate to inner commands. + + + + + Interface which represents the ability to invoke of a test method. + + + + + Executes the test method. + + The instance of the test class + Returns information about the test run + + + + Creates the start XML to be sent to the callback when the test is about to start + running. + + Return the of the start node, or null if the test + is known that it will not be running. + + + + Gets the display name of the test method. + + + + + Determines if the test runner infrastructure should create a new instance of the + test class before running the test. + + + + + Determines if the test should be limited to running a specific amount of time + before automatically failing. + + The timeout value, in milliseconds; if zero, the test will not have + a timeout. + + + + Creates a new instance of the class. + + The inner command to delegate to. + + + + + + + + + + + + + + + + + + + + + + Initializes a new instance of the + class. + + The command that will be wrapped. + The test method. + + + + + + + Represents an implementation of to be used with + tests which are decorated with the . + + + + + Represents an xUnit.net test command. + + + + + The method under test. + + + + + Initializes a new instance of the class. + + The method under test. + The display name of the test. + The timeout, in milliseconds. + + + + + + + + + + + + + Gets the name of the method under test. + + + + + + + + + + + Gets the name of the type under test. + + + + + Initializes a new instance of the class. + + The test method. + + + + + + + Base class for exceptions that have actual and expected values + + + + + The base assert exception class + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The user message to be displayed + + + + Initializes a new instance of the class. + + The user message to be displayed + The inner exception + + + + Initializes a new instance of the class. + + The user message to be displayed + The stack trace to be displayed + + + + + + + Determines whether to exclude a line from the stack frame. By default, this method + removes all stack frames from methods beginning with Xunit.Assert or Xunit.Sdk. + + The stack frame to be filtered. + Return true to exclude the line from the stack frame; false, otherwise. + + + + Filters the stack trace to remove all lines that occur within the testing framework. + + The original stack trace + The filtered stack trace + + + + + + + Gets a string representation of the frames on the call stack at the time the current exception was thrown. + + A string that describes the contents of the call stack, with the most recent method call appearing first. + + + + Gets the user message + + + + + Creates a new instance of the class. + + The expected value + The actual value + The user message to be shown + + + + Creates a new instance of the class. + + The expected value + The actual value + The user message to be shown + Set to true to skip the check for difference position + + + + + + + + + + Gets the actual value. + + + + + Gets the expected value. + + + + + Gets a message that describes the current exception. Includes the expected and actual values. + + The error message that explains the reason for the exception, or an empty string(""). + 1 + + + + Exception thrown when a collection unexpectedly does not contain the expected value. + + + + + Creates a new instance of the class. + + The expected object value + + + + Creates a new instance of the class. + + The expected object value + The actual value + + + + + + + Exception to be thrown from when the number of + parameter values does not the test method signature. + + + + + + + + + + + Exception thrown when code unexpectedly fails change a property. + + + + + Creates a new instance of the class. Call this constructor + when no exception was thrown. + + The name of the property that was expected to be changed. + + + + + + + Exception thrown when the collection did not contain exactly one element. + + + + + Initializes a new instance of the class. + + The numbers of items in the collection. + + + + Initializes a new instance of the class. + + The numbers of items in the collection. + The object expected to be in the collection. + + + + + + + Internal class used for version-resilient test runners. DO NOT CALL DIRECTLY. + Version-resilient runners should link against xunit.runner.utility.dll and use + ExecutorWrapper instead. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Exception thrown when the value is unexpectedly not of the given type or a derived type. + + + + + Creates a new instance of the class. + + The expected type + The actual object value + + + + + + + Allows the user to record actions for a test. + + + + + Records any exception which is thrown by the given code. + + The code which may thrown an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + Records any exception which is thrown by the given code that has + a return value. Generally used for testing property accessors. + + The code which may thrown an exception. + Returns the exception that was thrown by the code; null, otherwise. + + + + Exception that is thrown when one or more exceptions are thrown from + the After method of a . + + + + + Initializes a new instance of the class. + + The exceptions. + + + + Initializes a new instance of the class. + + The exceptions. + + + + + + + + + + Gets the list of exceptions thrown in the After method. + + + + + Gets a message that describes the current exception. + + + + + Gets a string representation of the frames on the call stack at the time the current exception was thrown. + + + + + Implementation of which executes the + instances attached to a test method. + + + + + Initializes a new instance of the class. + + The inner command. + The method. + + + + Executes the test method. + + The instance of the test class + Returns information about the test run + + + + This class supports the xUnit.net infrastructure and is not intended to be used + directly from your code. + + + + + This API supports the xUnit.net infrastructure and is not intended to be used + directly from your code. + + + + + This API supports the xUnit.net infrastructure and is not intended to be used + directly from your code. + + + + + This API supports the xUnit.net infrastructure and is not intended to be used + directly from your code. + + + + + Guard class, used for guard clauses and argument validation + + + + + + + + + + + + + + Base class which contains XML manipulation helper methods + + + + + Interface that represents a single test result. + + + + + Converts the test result into XML that is consumed by the test runners. + + The parent node. + The newly created XML node. + + + + The amount of time spent in execution + + + + + Adds the test execution time to the XML node. + + The XML node. + + + + + + + + + + Utility methods for dealing with exceptions. + + + + + Gets the message for the exception, including any inner exception messages. + + The exception + The formatted message + + + + Gets the stack trace for the exception, including any inner exceptions. + + The exception + The formatted stack trace + + + + Rethrows an exception object without losing the existing stack trace information + + The exception to re-throw. + + For more information on this technique, see + http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/03/03/8353.aspx + + + + + A dictionary which contains multiple unique values for each key. + + The type of the key. + The type of the value. + + + + Adds the value for the given key. If the key does not exist in the + dictionary yet, it will add it. + + The key. + The value. + + + + Removes all keys and values from the dictionary. + + + + + Determines whether the dictionary contains to specified key and value. + + The key. + The value. + + + + Calls the delegate once for each key/value pair in the dictionary. + + + + + Removes the given key and all of its values. + + + + + Removes the given value from the given key. If this was the + last value for the key, then the key is removed as well. + + The key. + The value. + + + + Gets the values for the given key. + + + + + Gets the count of the keys in the dictionary. + + + + + Gets the keys. + + + + + + + + XML utility methods + + + + + Adds an attribute to an XML node. + + The XML node. + The attribute name. + The attribute value. + + + + Adds a child element to an XML node. + + The parent XML node. + The child element name. + The new child XML element. + + + + Sets the inner text of the XML node, properly escaping it as necessary. + + The element whose inner text will be set. + The inner text to be escaped and then set. + + + + Exception that is thrown when a call to Debug.Assert() fails. + + + + + Creates a new instance of the class. + + The original assert message + + + + Creates a new instance of the class. + + The original assert message + The original assert detailed message + + + + + + + + + + Gets the original assert detailed message. + + + + + Gets the original assert message. + + + + + Gets a message that describes the current exception. + + + + + Exception thrown when a collection unexpectedly contains the expected value. + + + + + Creates a new instance of the class. + + The expected object value + + + + + + + Exception thrown when code unexpectedly throws an exception. + + + + + Creates a new instance of the class. + + Actual exception + + + + THIS CONSTRUCTOR IS FOR UNIT TESTING PURPOSES ONLY. + + + + + + + + + + + Gets a string representation of the frames on the call stack at the time the current exception was thrown. + + A string that describes the contents of the call stack, with the most recent method call appearing first. + + + + Exception thrown when a collection is unexpectedly not empty. + + + + + Creates a new instance of the class. + + + + + + + + Exception thrown when two values are unexpectedly not equal. + + + + + Creates a new instance of the class. + + The expected object value + The actual object value + + + + Creates a new instance of the class. + + The expected object value + The actual object value + Set to true to skip the check for difference position + + + + + + + Exception thrown when a value is unexpectedly true. + + + + + Creates a new instance of the class. + + The user message to be display, or null for the default message + + + + + + + Exception thrown when a value is unexpectedly not in the given range. + + + + + Creates a new instance of the class. + + The actual object value + The low value of the range + The high value of the range + + + + + + + + + + Gets the actual object value + + + + + Gets the high value of the range + + + + + Gets the low value of the range + + + + + Gets a message that describes the current exception. + + The error message that explains the reason for the exception, or an empty string(""). + + + + Exception thrown when the value is unexpectedly of the exact given type. + + + + + Creates a new instance of the class. + + The expected type + The actual object value + + + + + + + Exception thrown when the value is unexpectedly not of the exact given type. + + + + + Creates a new instance of the class. + + The expected type + The actual object value + + + + + + + Used to decorate xUnit.net test classes that utilize fixture classes. + An instance of the fixture data is initialized just before the first + test in the class is run, and if it implements IDisposable, is disposed + after the last test in the class is run. + + The type of the fixture + + + + Called on the test class just before each test method is run, + passing the fixture data so that it can be used for the test. + All test runs share the same instance of fixture data. + + The fixture data + + + + Exception thrown when a value is unexpectedly in the given range. + + + + + Creates a new instance of the class. + + The actual object value + The low value of the range + The high value of the range + + + + + + + + + + Gets the actual object value + + + + + Gets the high value of the range + + + + + Gets the low value of the range + + + + + Gets a message that describes the current exception. + + The error message that explains the reason for the exception, or an empty string(""). + + + + Base attribute which indicates a test method interception (allows code to be run before and + after the test is run). + + + + + This method is called after the test method is executed. + + The method under test + + + + This method is called before the test method is executed. + + The method under test + + + + + + + Exception thrown when a collection is unexpectedly empty. + + + + + Creates a new instance of the class. + + + + + + + + Exception thrown when two values are unexpectedly equal. + + + + + Creates a new instance of the class. + + + + + + + + Exception thrown when an object is unexpectedly null. + + + + + Creates a new instance of the class. + + + + + + + + Exception thrown when two values are unexpected the same instance. + + + + + Creates a new instance of the class. + + + + + + + + Exception thrown when an object reference is unexpectedly not null. + + + + + Creates a new instance of the class. + + + + + + + + + Command that automatically creates the instance of the test class + and disposes it (if it implements ). + + + + + Creates a new instance of the object. + + The command that is bring wrapped + The method under test + + + + Executes the test method. Creates a new instance of the class + under tests and passes it to the inner command. Also catches + any exceptions and converts them into s. + + The instance of the test class + Returns information about the test run + + + + Command used to wrap a which has associated + fixture data. + + + + + Creates a new instance of the class. + + The inner command + The fixtures to be set on the test class + + + + Sets the fixtures on the test class by calling SetFixture, then + calls the inner command. + + The instance of the test class + Returns information about the test run + + + + A timer class used to figure out how long tests take to run. On most .NET implementations + this will use the class because it's a high + resolution timer; however, on Silverlight/CoreCLR, it will use + (which will provide lower resolution results). + + + + + Creates a new instance of the class. + + + + + Starts timing. + + + + + Stops timing. + + + + + Gets how long the timer ran, in milliseconds. In order for this to be valid, + both and must have been called. + + + + + Attribute used to decorate a test method with arbitrary name/value pairs ("traits"). + + + + + Creates a new instance of the class. + + The trait name + The trait value + + + + Gets the trait name. + + + + + + + + Gets the trait value. + + + + + Runner that executes an synchronously. + + + + + Execute the . + + The test class command to execute + The methods to execute; if null or empty, all methods will be executed + The start run callback + The end run result callback + A with the results of the test run + + + + Factory for objects, based on the type under test. + + + + + Creates the test class command, which implements , for a given type. + + The type under test + The test class command, if the class is a test class; null, otherwise + + + + Creates the test class command, which implements , for a given type. + + The type under test + The test class command, if the class is a test class; null, otherwise + + + + Represents an xUnit.net test class + + + + + Interface which describes the ability to executes all the tests in a test class. + + + + + Allows the test class command to choose the next test to be run from the list of + tests that have not yet been run, thereby allowing it to choose the run order. + + The tests remaining to be run + The index of the test that should be run + + + + Execute actions to be run after all the test methods of this test class are run. + + Returns the thrown during execution, if any; null, otherwise + + + + Execute actions to be run before any of the test methods of this test class are run. + + Returns the thrown during execution, if any; null, otherwise + + + + Enumerates the test commands for a given test method in this test class. + + The method under test + The test commands for the given test method + + + + Enumerates the methods which are test methods in this test class. + + The test methods + + + + Determines if a given refers to a test method. + + The test method to validate + True if the method is a test method; false, otherwise + + + + Gets the object instance that is under test. May return null if you wish + the test framework to create a new object instance for each test method. + + + + + Gets or sets the type that is being tested + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The type under test + + + + Creates a new instance of the class. + + The type under test + + + + Chooses the next test to run, randomly, using the . + + The tests remaining to be run + The index of the test that should be run + + + + Execute actions to be run after all the test methods of this test class are run. + + Returns the thrown during execution, if any; null, otherwise + + + + Execute actions to be run before any of the test methods of this test class are run. + + Returns the thrown during execution, if any; null, otherwise + + + + Enumerates the test commands for a given test method in this test class. + + The method under test + The test commands for the given test method + + + + Enumerates the methods which are test methods in this test class. + + The test methods + + + + Determines if a given refers to a test method. + + The test method to validate + True if the method is a test method; false, otherwise + + + + Gets the object instance that is under test. May return null if you wish + the test framework to create a new object instance for each test method. + + + + + Gets or sets the randomizer used to determine the order in which tests are run. + + + + + Sets the type that is being tested + + + + + Implementation of that represents a skipped test. + + + + + Creates a new instance of the class. + + The method that is being skipped + The display name for the test. If null, the fully qualified + type name is used. + The reason the test was skipped. + + + + + + + + + + Gets the skip reason. + + + + + + + + Factory for creating objects. + + + + + Make instances of objects for the given class and method. + + The class command + The method under test + The set of objects + + + + A command wrapper which times the running of a command. + + + + + Creates a new instance of the class. + + The command that will be timed. + + + + Executes the inner test method, gathering the amount of time it takes to run. + + Returns information about the test run + + + + Wraps a command which should fail if it runs longer than the given timeout value. + + + + + Creates a new instance of the class. + + The command to be run + The timout, in milliseconds + The method under test + + + + Executes the test method, failing if it takes too long. + + Returns information about the test run + + + + + + + Attributes used to decorate a test fixture that is run with an alternate test runner. + The test runner must implement the interface. + + + + + Creates a new instance of the class. + + The class which implements ITestClassCommand and acts as the runner + for the test fixture. + + + + Gets the test class command. + + + + + Exception thrown when two object references are unexpectedly not the same instance. + + + + + Creates a new instance of the class. + + The expected object reference + The actual object reference + + + + + + + Contains the test results from an assembly. + + + + + Contains multiple test results, representing them as a composite test result. + + + + + Adds a test result to the composite test result list. + + + + + + Gets the test results. + + + + + Creates a new instance of the class. + + The filename of the assembly + + + + Creates a new instance of the class. + + The filename of the assembly + The configuration filename + + + + Converts the test result into XML that is consumed by the test runners. + + The parent node. + The newly created XML node. + + + + Gets the fully qualified filename of the configuration file. + + + + + Gets the directory where the assembly resides. + + + + + Gets the number of failed results. + + + + + Gets the fully qualified filename of the assembly. + + + + + Gets the number of passed results. + + + + + Gets the number of skipped results. + + + + + Contains the test results from a test class. + + + + + Creates a new instance of the class. + + The type under test + + + + Creates a new instance of the class. + + The simple name of the type under test + The fully qualified name of the type under test + The namespace of the type under test + + + + Sets the exception thrown by the test fixture. + + The thrown exception + + + + Converts the test result into XML that is consumed by the test runners. + + The parent node. + The newly created XML node. + + + + Gets the fully qualified test fixture exception type, when an exception has occurred. + + + + + Gets the number of tests which failed. + + + + + Gets the fully qualified name of the type under test. + + + + + Gets the test fixture exception message, when an exception has occurred. + + + + + Gets the simple name of the type under test. + + + + + Gets the namespace of the type under test. + + + + + Gets the number of tests which passed. + + + + + Gets the number of tests which were skipped. + + + + + Gets the test fixture exception stack trace, when an exception has occurred. + + + + + Represents a failed test result. + + + + + Represents the results from running a test method + + + + + Initializes a new instance of the class. The traits for + the test method are discovered using reflection. + + The method under test. + The display name for the test. If null, the fully qualified + type name is used. + + + + Initializes a new instance of the class. + + The name of the method under test. + The type of the method under test. + The display name for the test. If null, the fully qualified + type name is used. + The traits. + + + + Converts the test result into XML that is consumed by the test runners. + + The parent node. + The newly created XML node. + + + + Gets or sets the display name of the method under test. This is the value that's shown + during failures and in the resulting output XML. + + + + + Gets the name of the method under test. + + + + + Gets or sets the standard output/standard error from the test that was captured + while the test was running. + + + + + Gets the traits attached to the test method. + + + + + Gets the name of the type under test. + + + + + Creates a new instance of the class. + + The method under test + The exception throw by the test + The display name for the test. If null, the fully qualified + type name is used. + + + + Creates a new instance of the class. + + The name of the method under test + The name of the type under test + The display name of the test + The custom properties attached to the test method + The full type name of the exception throw + The exception message + The exception stack trace + + + + Converts the test result into XML that is consumed by the test runners. + + The parent node. + The newly created XML node. + + + + Gets the exception type thrown by the test method. + + + + + Gets the exception message thrown by the test method. + + + + + Gets the stack trace of the exception thrown by the test method. + + + + + Represents a passing test result. + + + + + Create a new instance of the class. + + The method under test + The display name for the test. If null, the fully qualified + type name is used. + + + + Create a new instance of the class. + + The name of the method under test + The name of the type under test + The display name for the test. If null, the fully qualified + type name is used. + The custom properties attached to the test method + + + + Converts the test result into XML that is consumed by the test runners. + + The parent node. + The newly created XML node. + + + + Represents a skipped test result. + + + + + Creates a new instance of the class. Uses reflection to discover + the skip reason. + + The method under test + The display name for the test. If null, the fully qualified + type name is used. + The reason the test was skipped. + + + + Creates a new instance of the class. + + The name of the method under test + The name of the type under test + The display name for the test. If null, the fully qualified + type name is used. + The traits attached to the method under test + The skip reason + + + + Converts the test result into XML that is consumed by the test runners. + + The parent node. + The newly created XML node. + + + + Gets the skip reason. + + + + + Represents information about an attribute. + + + + + Gets the instance of the attribute, if available. + + The type of the attribute + The instance of the attribute, if available. + + + + Gets an initialized property value of the attribute. + + The type of the property + The name of the property + The property value + + + + Represents information about a method. + + + + + Creates an instance of the type where this test method was found. If using + reflection, this should be the ReflectedType. + + A new instance of the type. + + + + Gets all the custom attributes for the method that are of the given type. + + The type of the attribute + The matching attributes that decorate the method + + + + Determines if the method has at least one instance of the given attribute type. + + The type of the attribute + True if the method has at least one instance of the given attribute type; false, otherwise + + + + Invokes the test on the given class, with the given parameters. + + The instance of the test class (may be null if + the test method is static). + The parameters to be passed to the test method. + + + + Gets a value which represents the class that this method was + reflected from (i.e., equivalent to MethodInfo.ReflectedType) + + + + + Gets a value indicating whether the method is abstract. + + + + + Gets a value indicating whether the method is static. + + + + + Gets the underlying for the method, if available. + + + + + Gets the name of the method. + + + + + Gets the fully qualified type name of the return type. + + + + + Gets the fully qualified type name of the type that this method belongs to. If + using reflection, this should be the ReflectedType. + + + + + Represents information about a type. + + + + + Gets all the custom attributes for the type that are of the given attribute type. + + The type of the attribute + The matching attributes that decorate the type + + + + Gets a test method by name. + + The name of the method + The method, if it exists; null, otherwise. + + + + Gets all the methods + + + + + + Determines if the type has at least one instance of the given attribute type. + + The type of the attribute + True if the type has at least one instance of the given attribute type; false, otherwise + + + + Determines if the type implements the given interface. + + The type of the interface + True if the type implements the given interface; false, otherwise + + + + Gets a value indicating whether the type is abstract. + + + + + Gets a value indicating whether the type is sealed. + + + + + Gets the underlying object, if available. + + + + + Utility class which inspects methods for test information + + + + + Gets the display name. + + The method to be inspected + The display name + + + + Gets the skip reason from a test method. + + The method to be inspected + The skip reason + + + + Gets the test commands for a test method. + + The method to be inspected + The objects for the test method + + + + Gets the timeout value for a test method. + + The method to be inspected + The timeout, in milliseconds + + + + Gets the traits on a test method. + + The method to be inspected + A dictionary of the traits + + + + Determines whether a test method has a timeout. + + The method to be inspected + True if the method has a timeout; false, otherwise + + + + Determines whether a test method has traits. + + The method to be inspected + True if the method has traits; false, otherwise + + + + Determines whether a test method should be skipped. + + The method to be inspected + True if the method should be skipped; false, otherwise + + + + Determines whether a method is a test method. A test method must be decorated + with the (or derived class) and must not be abstract. + + The method to be inspected + True if the method is a test method; false, otherwise + + + + Wrapper to implement and using reflection. + + + + + Converts an into an using reflection. + + + + + + + Converts a into an using reflection. + + The method to wrap + The wrapper + + + + Converts a into an using reflection. + + The type to wrap + The wrapper + + + + Utility class which inspects types for test information + + + + + Determines if a type contains any test methods + + The type to be inspected + True if the class contains any test methods; false, otherwise + + + + Retrieves the type to run the test class with from the , if present. + + The type to be inspected + The type of the test class runner, if present; null, otherwise + + + + Retrieves a list of the test methods from the test class. + + The type to be inspected + The test methods + + + + Determines if the test class has a applied to it. + + The type to be inspected + True if the test class has a run with attribute; false, otherwise + + + + Determines if the type implements . + + The type to be inspected + True if the type implements ; false, otherwise + + + + Determines whether the specified type is abstract. + + The type. + + true if the specified type is abstract; otherwise, false. + + + + + Determines whether the specified type is static. + + The type. + + true if the specified type is static; otherwise, false. + + + + + Determines if a class is a test class. + + The type to be inspected + True if the type is a test class; false, otherwise + + + + Attribute that is applied to a method to indicate that it is a fact that should be run + by the test runner. It can also be extended to support a customized definition of a + test method. + + + + + Creates instances of which represent individual intended + invocations of the test method. + + The method under test + An enumerator through the desired test method invocations + + + + Enumerates the test commands represented by this test method. Derived classes should + override this method to return instances of , one per execution + of a test method. + + The test method + The test commands which will execute the test runs for the given method + + + + Gets the name of the test to be used when the test is skipped. Defaults to + null, which will cause the fully qualified test name to be used. + + + + + Obsolete. Please use the property instead. + + + + + Marks the test so that it will not be run, and gets or sets the skip reason + + + + + Marks the test as failing if it does not finish running within the given time + period, in milliseconds; set to 0 or less to indicate the method has no timeout + + + + + Exception thrown when code unexpectedly fails to throw an exception. + + + + + Creates a new instance of the class. Call this constructor + when no exception was thrown. + + The type of the exception that was expected + + + + Creates a new instance of the class. Call this constructor + when an exception of the wrong type was thrown. + + The type of the exception that was expected + The actual exception that was thrown + + + + + + + THIS CONSTRUCTOR IS FOR UNIT TESTING PURPOSES ONLY. + + + + + + + + Gets a string representation of the frames on the call stack at the time the current exception was thrown. + + A string that describes the contents of the call stack, with the most recent method call appearing first. + + + + Exception thrown when a test method exceeds the given timeout value + + + + + Creates a new instance of the class. + + The timeout value, in milliseconds + + + + + + + Exception thrown when a value is unexpectedly false. + + + + + Creates a new instance of the class. + + The user message to be displayed, or null for the default message + + + + + + diff --git a/test-harness/xunit/Addition.feature b/test-harness/xunit/Addition.feature new file mode 100644 index 000000000..238e261e9 --- /dev/null +++ b/test-harness/xunit/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/xunit/Addition.feature.cs b/test-harness/xunit/Addition.feature.cs new file mode 100644 index 000000000..ed9315a5a --- /dev/null +++ b/test-harness/xunit/Addition.feature.cs @@ -0,0 +1,223 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.xunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class AdditionFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Addition.feature" +#line hidden + + public AdditionFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to avoid silly mistakes\r\nAs a math idiot\r\nI want to be told the sum of t" + + "wo numbers", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 6 +#line 7 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void SetFixture(AdditionFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Adding several numbers")] + [Xunit.Extensions.InlineDataAttribute("60", "70", "130", "260", new string[0])] + [Xunit.Extensions.InlineDataAttribute("40", "50", "90", "180", new string[0])] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + string[] @__tags = new string[] { + "tag2"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", @__tags); +#line 10 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 11 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 12 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 15 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Add two numbers")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] { + "tag1"}); +#line 23 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 24 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 25 + testRunner.And("I have entered 2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 26 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 27 + testRunner.Then("the result should be 3 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Fail to add two numbers")] + public virtual void FailToAddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fail to add two numbers", new string[] { + "tag1"}); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 31 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 32 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 34 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute(Skip="Ignored")] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Ignored adding two numbers")] + public virtual void IgnoredAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Ignored adding two numbers", new string[] { + "ignore"}); +#line 37 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 38 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 39 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 40 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 41 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Not automated adding two numbers")] + public virtual void NotAutomatedAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated adding two numbers", ((string[])(null))); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 44 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 45 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 46 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + AdditionFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + AdditionFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/App.config b/test-harness/xunit/App.config new file mode 100644 index 000000000..555737021 --- /dev/null +++ b/test-harness/xunit/App.config @@ -0,0 +1,13 @@ + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/test-harness/xunit/FailingBackground.feature b/test-harness/xunit/FailingBackground.feature new file mode 100644 index 000000000..83a70483a --- /dev/null +++ b/test-harness/xunit/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/xunit/FailingBackground.feature.cs b/test-harness/xunit/FailingBackground.feature.cs new file mode 100644 index 000000000..0d8fd5a39 --- /dev/null +++ b/test-harness/xunit/FailingBackground.feature.cs @@ -0,0 +1,151 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class FailingBackgroundFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "FailingBackground.feature" +#line hidden + + public FailingBackgroundFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing Background", "This feature has a failing background.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the background step fails", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 6 + testRunner.And("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + + public virtual void SetFixture(FailingBackgroundFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing Background")] + [Xunit.TraitAttribute("Description", "Add two numbers")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", ((string[])(null))); +#line 8 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 9 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 10 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 11 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 12 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing Background")] + [Xunit.TraitAttribute("Description", "Adding several numbers")] + [Xunit.Extensions.InlineDataAttribute("60", "70", "130", "260", new string[0])] + [Xunit.Extensions.InlineDataAttribute("40", "50", "90", "180", new string[0])] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 16 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 17 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 18 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + FailingBackgroundFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + FailingBackgroundFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/Minimal Features/Failing.feature b/test-harness/xunit/Minimal Features/Failing.feature new file mode 100644 index 000000000..d7c5b7f53 --- /dev/null +++ b/test-harness/xunit/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step \ No newline at end of file diff --git a/test-harness/xunit/Minimal Features/Failing.feature.cs b/test-harness/xunit/Minimal Features/Failing.feature.cs new file mode 100644 index 000000000..924d7b518 --- /dev/null +++ b/test-harness/xunit/Minimal Features/Failing.feature.cs @@ -0,0 +1,135 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 Pickles.TestHarness.xunit.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class FailingFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Failing.feature" +#line hidden + + public FailingFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(FailingFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing")] + [Xunit.TraitAttribute("Description", "Failing Feature Passing Scenario")] + public virtual void FailingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing")] + [Xunit.TraitAttribute("Description", "Failing Feature Inconclusive Scenario")] + public virtual void FailingFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing")] + [Xunit.TraitAttribute("Description", "Failing Feature Failing Scenario")] + public virtual void FailingFeatureFailingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Failing Scenario", ((string[])(null))); +#line 9 +this.ScenarioSetup(scenarioInfo); +#line 10 + testRunner.Then("failing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + FailingFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + FailingFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/Minimal Features/Inconclusive.feature b/test-harness/xunit/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..7ce63f2d5 --- /dev/null +++ b/test-harness/xunit/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step \ No newline at end of file diff --git a/test-harness/xunit/Minimal Features/Inconclusive.feature.cs b/test-harness/xunit/Minimal Features/Inconclusive.feature.cs new file mode 100644 index 000000000..ce7634a66 --- /dev/null +++ b/test-harness/xunit/Minimal Features/Inconclusive.feature.cs @@ -0,0 +1,121 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 Pickles.TestHarness.xunit.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class InconclusiveFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Inconclusive.feature" +#line hidden + + public InconclusiveFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Inconclusive", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(InconclusiveFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Inconclusive")] + [Xunit.TraitAttribute("Description", "Inconclusive Feature Passing Scenario")] + public virtual void InconclusiveFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Inconclusive")] + [Xunit.TraitAttribute("Description", "Inconclusive Feature Inconclusive Scenario")] + public virtual void InconclusiveFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + InconclusiveFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + InconclusiveFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/Minimal Features/Passing.feature b/test-harness/xunit/Minimal Features/Passing.feature new file mode 100644 index 000000000..14bf35e22 --- /dev/null +++ b/test-harness/xunit/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/xunit/Minimal Features/Passing.feature.cs b/test-harness/xunit/Minimal Features/Passing.feature.cs new file mode 100644 index 000000000..27feb9851 --- /dev/null +++ b/test-harness/xunit/Minimal Features/Passing.feature.cs @@ -0,0 +1,107 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18052 +// +// 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 Pickles.TestHarness.xunit.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class PassingFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Passing.feature" +#line hidden + + public PassingFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Passing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(PassingFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Passing")] + [Xunit.TraitAttribute("Description", "Passing Feature Passing Scenario")] + public virtual void PassingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Passing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + PassingFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + PassingFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/NotAutomatedAtAll.feature b/test-harness/xunit/NotAutomatedAtAll.feature new file mode 100644 index 000000000..3bbfcb669 --- /dev/null +++ b/test-harness/xunit/NotAutomatedAtAll.feature @@ -0,0 +1,19 @@ +Feature: Not Automated At All + +Background: + Given unimplemented step + +Scenario: Not automated scenario 1 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 2 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 3 + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/xunit/NotAutomatedAtAll.feature.cs b/test-harness/xunit/NotAutomatedAtAll.feature.cs new file mode 100644 index 000000000..e9d208066 --- /dev/null +++ b/test-harness/xunit/NotAutomatedAtAll.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.18051 +// +// 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 Pickles.TestHarness.xunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class NotAutomatedAtAllFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "NotAutomatedAtAll.feature" +#line hidden + + public NotAutomatedAtAllFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Not Automated At All", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 3 +#line 4 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void SetFixture(NotAutomatedAtAllFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Not Automated At All")] + [Xunit.TraitAttribute("Description", "Not automated scenario 1")] + public virtual void NotAutomatedScenario1() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 1", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 7 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 8 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 9 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Not Automated At All")] + [Xunit.TraitAttribute("Description", "Not automated scenario 2")] + public virtual void NotAutomatedScenario2() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 2", ((string[])(null))); +#line 11 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 12 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 13 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 14 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Not Automated At All")] + [Xunit.TraitAttribute("Description", "Not automated scenario 3")] + public virtual void NotAutomatedScenario3() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 3", ((string[])(null))); +#line 16 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 17 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 18 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + NotAutomatedAtAllFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + NotAutomatedAtAllFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/Properties/AssemblyInfo.cs b/test-harness/xunit/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..1d6f58aea --- /dev/null +++ b/test-harness/xunit/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("xunit")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("xunit")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("51211987-b886-4465-bbbd-081d7a7dd9d1")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test-harness/xunit/ScenarioOutlines.feature b/test-harness/xunit/ScenarioOutlines.feature new file mode 100644 index 000000000..00efa6fc5 --- /dev/null +++ b/test-harness/xunit/ScenarioOutlines.feature @@ -0,0 +1,88 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + +Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + And I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/xunit/ScenarioOutlines.feature.cs b/test-harness/xunit/ScenarioOutlines.feature.cs new file mode 100644 index 000000000..a07eb4ee3 --- /dev/null +++ b/test-harness/xunit/ScenarioOutlines.feature.cs @@ -0,0 +1,213 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class ScenarioOutlinesFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenarioOutlines.feature" +#line hidden + + public ScenarioOutlinesFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenario Outlines", "Here we demonstrate how we deal with scenario outlines", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(ScenarioOutlinesFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "This is a scenario outline where all scenarios pass")] + [Xunit.Extensions.InlineDataAttribute("pass_1", new string[0])] + [Xunit.Extensions.InlineDataAttribute("pass_2", new string[0])] + [Xunit.Extensions.InlineDataAttribute("pass_3", new string[0])] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where all scenarios pass", exampleTags); +#line 4 +this.ScenarioSetup(scenarioInfo); +#line 8 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "This is a scenario outline where one scenario is inconclusive")] + [Xunit.Extensions.InlineDataAttribute("pass_1", new string[0])] + [Xunit.Extensions.InlineDataAttribute("pass_2", new string[0])] + [Xunit.Extensions.InlineDataAttribute("inconclusive_1", new string[0])] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario is inconclusive", exampleTags); +#line 17 +this.ScenarioSetup(scenarioInfo); +#line 21 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "This is a scenario outline where one scenario fails")] + [Xunit.Extensions.InlineDataAttribute("pass_1", new string[0])] + [Xunit.Extensions.InlineDataAttribute("pass_2", new string[0])] + [Xunit.Extensions.InlineDataAttribute("fail_1", new string[0])] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario fails", exampleTags); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 34 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "And we can go totally bonkers with multiple example sections.")] + [Xunit.Extensions.InlineDataAttribute("pass_1", new string[0])] + [Xunit.Extensions.InlineDataAttribute("pass_2", new string[0])] + [Xunit.Extensions.InlineDataAttribute("inconclusive_1", new string[0])] + [Xunit.Extensions.InlineDataAttribute("inconclusive_2", new string[0])] + [Xunit.Extensions.InlineDataAttribute("fail_1", new string[0])] + [Xunit.Extensions.InlineDataAttribute("fail_2", new string[0])] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections_(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("And we can go totally bonkers with multiple example sections.", exampleTags); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 45 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "Deal correctly with backslashes in the examples")] + [Xunit.Extensions.InlineDataAttribute("c:\\Temp\\", new string[0])] + public virtual void DealCorrectlyWithBackslashesInTheExamples(string filePath, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with backslashes in the examples", exampleTags); +#line 63 +this.ScenarioSetup(scenarioInfo); +#line 65 + testRunner.When(string.Format("I have backslashes in the value, for example a \'{0}\'", filePath), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "Deal correctly with parenthesis in the examples")] + [Xunit.Extensions.InlineDataAttribute("This is a description (and more)", new string[0])] + public virtual void DealCorrectlyWithParenthesisInTheExamples(string overlyDescriptiveField, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with parenthesis in the examples", exampleTags); +#line 72 +this.ScenarioSetup(scenarioInfo); +#line 74 + testRunner.When(string.Format("I have parenthesis in the value, for example an \'{0}\'", overlyDescriptiveField), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "Deal correctly with overlong example values")] + [Xunit.Extensions.InlineDataAttribute("Please enter a valid two letter country code (e.g. DE)!", "This is just a very very very veery long error message!", new string[0])] + public virtual void DealCorrectlyWithOverlongExampleValues(string value1, string value2, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with overlong example values", exampleTags); +#line 80 +this.ScenarioSetup(scenarioInfo); +#line 82 + testRunner.When(string.Format("I have a field with value \'{0}\'", value1), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 83 + testRunner.And(string.Format("I have a field with value \'{0}\'", value2), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 84 + testRunner.Then("the scenario will \'pass_1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + ScenarioOutlinesFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + ScenarioOutlinesFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/ScenariosWithSpecialCharacters.feature b/test-harness/xunit/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..15e291a18 --- /dev/null +++ b/test-harness/xunit/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'PASS' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | diff --git a/test-harness/xunit/ScenariosWithSpecialCharacters.feature.cs b/test-harness/xunit/ScenariosWithSpecialCharacters.feature.cs new file mode 100644 index 000000000..15dd7704c --- /dev/null +++ b/test-harness/xunit/ScenariosWithSpecialCharacters.feature.cs @@ -0,0 +1,165 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class ScenariosWithSpecialCharactersFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenariosWithSpecialCharacters.feature" +#line hidden + + public ScenariosWithSpecialCharactersFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenarios With Special Characters", "Here we demonstrate usage of special characters in scenario names", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void SetFixture(ScenariosWithSpecialCharactersFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Xunit.TraitAttribute("Description", "This is a scenario with parentheses, hyphen and comma (10-20, 30-40)")] + public virtual void ThisIsAScenarioWithParenthesesHyphenAndComma10_2030_40() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)", ((string[])(null))); +#line 7 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 8 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 9 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Xunit.TraitAttribute("Description", "This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)")] + [Xunit.Extensions.InlineDataAttribute("pass_1", new string[0])] + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.Extensions.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Xunit.TraitAttribute("Description", "This scenario contains examples with Regex-special characters")] + [Xunit.Extensions.InlineDataAttribute("**", new string[0])] + [Xunit.Extensions.InlineDataAttribute("++", new string[0])] + [Xunit.Extensions.InlineDataAttribute(".*", new string[0])] + [Xunit.Extensions.InlineDataAttribute("[]", new string[0])] + [Xunit.Extensions.InlineDataAttribute("{}", new string[0])] + [Xunit.Extensions.InlineDataAttribute("()", new string[0])] + [Xunit.Extensions.InlineDataAttribute("^.*(?BAR)\\s[^0-9]{3,4}A+$", new string[0])] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters(string regex, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario contains examples with Regex-special characters", exampleTags); +#line 21 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 22 + testRunner.When(string.Format("I have special characters for regexes in the value, for example a \'{0}\'", regex), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 23 + testRunner.Then("the scenario will \'PASS\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + ScenariosWithSpecialCharactersFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + ScenariosWithSpecialCharactersFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit/packages.config b/test-harness/xunit/packages.config new file mode 100644 index 000000000..2975804e6 --- /dev/null +++ b/test-harness/xunit/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/test-harness/xunit/xunit.csproj b/test-harness/xunit/xunit.csproj new file mode 100644 index 000000000..0f372726f --- /dev/null +++ b/test-harness/xunit/xunit.csproj @@ -0,0 +1,150 @@ + + + + + Debug + AnyCPU + {F4AB7229-9022-4FFC-86EC-570ADF2A682C} + Library + Properties + Pickles.TestHarness.xunit + xunitHarness + v4.5 + 512 + ..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll + + + False + ..\packages\xunit.1.9.2\lib\net20\xunit.dll + + + False + ..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll + + + + + Addition.feature + True + True + + + FailingBackground.feature + True + True + + + Failing.feature + True + True + + + Inconclusive.feature + True + True + + + Passing.feature + True + True + + + NotAutomatedAtAll.feature + True + True + + + + True + True + ScenarioOutlines.feature + + + True + True + ScenariosWithSpecialCharacters.feature + + + + + SpecFlowSingleFileGenerator + Addition.feature.cs + + + + SpecFlowSingleFileGenerator + FailingBackground.feature.cs + + + SpecFlowSingleFileGenerator + Failing.feature.cs + + + SpecFlowSingleFileGenerator + Inconclusive.feature.cs + + + SpecFlowSingleFileGenerator + Passing.feature.cs + + + SpecFlowSingleFileGenerator + NotAutomatedAtAll.feature.cs + + + + SpecFlowSingleFileGenerator + ScenarioOutlines.feature.cs + + + SpecFlowSingleFileGenerator + ScenariosWithSpecialCharacters.feature.cs + + + + + {073862de-d599-4941-9716-03206cf1cfa2} + AutomationLayer + + + + + + + + \ No newline at end of file diff --git a/test-harness/xunit2/Addition.feature b/test-harness/xunit2/Addition.feature new file mode 100644 index 000000000..238e261e9 --- /dev/null +++ b/test-harness/xunit2/Addition.feature @@ -0,0 +1,46 @@ +Feature: Addition + In order to avoid silly mistakes + As a math idiot + I want to be told the sum of two numbers + +Background: + Given the calculator has clean memory + +@tag2 +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | + +@tag1 +Scenario: Add two numbers + Given I have entered 1 into the calculator + And I have entered 2 into the calculator + When I press add + Then the result should be 3 on the screen + +@tag1 +Scenario: Fail to add two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +@ignore +Scenario: Ignored adding two numbers + Given I have entered 1 into the calculator + And I have entered 2.2 into the calculator + When I press add + Then the result should be 3.2 on the screen + +Scenario: Not automated adding two numbers + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/xunit2/Addition.feature.cs b/test-harness/xunit2/Addition.feature.cs new file mode 100644 index 000000000..13865cf68 --- /dev/null +++ b/test-harness/xunit2/Addition.feature.cs @@ -0,0 +1,223 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class AdditionFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Addition.feature" +#line hidden + + public AdditionFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Addition", "In order to avoid silly mistakes\r\nAs a math idiot\r\nI want to be told the sum of t" + + "wo numbers", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 6 +#line 7 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void SetFixture(AdditionFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Adding several numbers")] + [Xunit.InlineDataAttribute("60", "70", "130", "260", new string[0])] + [Xunit.InlineDataAttribute("40", "50", "90", "180", new string[0])] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + string[] @__tags = new string[] { + "tag2"}; + if ((exampleTags != null)) + { + @__tags = System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Concat(@__tags, exampleTags)); + } + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", @__tags); +#line 10 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 11 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 12 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 15 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Add two numbers")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] { + "tag1"}); +#line 23 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 24 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 25 + testRunner.And("I have entered 2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 26 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 27 + testRunner.Then("the result should be 3 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Fail to add two numbers")] + public virtual void FailToAddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Fail to add two numbers", new string[] { + "tag1"}); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 31 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 32 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 34 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute(Skip="Ignored")] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Ignored adding two numbers")] + public virtual void IgnoredAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Ignored adding two numbers", new string[] { + "ignore"}); +#line 37 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 38 + testRunner.Given("I have entered 1 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 39 + testRunner.And("I have entered 2.2 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 40 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 41 + testRunner.Then("the result should be 3.2 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Addition")] + [Xunit.TraitAttribute("Description", "Not automated adding two numbers")] + public virtual void NotAutomatedAddingTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated adding two numbers", ((string[])(null))); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 6 +this.FeatureBackground(); +#line 44 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 45 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 46 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + AdditionFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + AdditionFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/FailingBackground.feature b/test-harness/xunit2/FailingBackground.feature new file mode 100644 index 000000000..83a70483a --- /dev/null +++ b/test-harness/xunit2/FailingBackground.feature @@ -0,0 +1,24 @@ +Feature: Failing Background +This feature has a failing background. + +Background: + Given the background step fails + And the calculator has clean memory + +Scenario: Add two numbers + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + +Scenario Outline: Adding several numbers + Given I have entered into the calculator + And I have entered into the calculator + And I have entered into the calculator + When I press add + Then the result should be on the screen + +Examples: + | first number | second number | third number | result | + | 60 | 70 | 130 | 260 | + | 40 | 50 | 90 | 180 | diff --git a/test-harness/xunit2/FailingBackground.feature.cs b/test-harness/xunit2/FailingBackground.feature.cs new file mode 100644 index 000000000..dd8ea94ff --- /dev/null +++ b/test-harness/xunit2/FailingBackground.feature.cs @@ -0,0 +1,151 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class FailingBackgroundFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "FailingBackground.feature" +#line hidden + + public FailingBackgroundFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing Background", "This feature has a failing background.", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the background step fails", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 6 + testRunner.And("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + + public virtual void SetFixture(FailingBackgroundFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing Background")] + [Xunit.TraitAttribute("Description", "Add two numbers")] + public virtual void AddTwoNumbers() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", ((string[])(null))); +#line 8 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 9 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 10 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 11 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 12 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing Background")] + [Xunit.TraitAttribute("Description", "Adding several numbers")] + [Xunit.InlineDataAttribute("60", "70", "130", "260", new string[0])] + [Xunit.InlineDataAttribute("40", "50", "90", "180", new string[0])] + public virtual void AddingSeveralNumbers(string firstNumber, string secondNumber, string thirdNumber, string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Adding several numbers", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Given(string.Format("I have entered {0} into the calculator", firstNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 16 + testRunner.And(string.Format("I have entered {0} into the calculator", secondNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 17 + testRunner.And(string.Format("I have entered {0} into the calculator", thirdNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 18 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then(string.Format("the result should be {0} on the screen", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + FailingBackgroundFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + FailingBackgroundFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/Minimal Features/Failing.feature b/test-harness/xunit2/Minimal Features/Failing.feature new file mode 100644 index 000000000..d7c5b7f53 --- /dev/null +++ b/test-harness/xunit2/Minimal Features/Failing.feature @@ -0,0 +1,10 @@ +Feature: Failing + +Scenario: Failing Feature Passing Scenario + Then passing step + +Scenario: Failing Feature Inconclusive Scenario + Then inconclusive step + +Scenario: Failing Feature Failing Scenario + Then failing step \ No newline at end of file diff --git a/test-harness/xunit2/Minimal Features/Failing.feature.cs b/test-harness/xunit2/Minimal Features/Failing.feature.cs new file mode 100644 index 000000000..7e3b307c2 --- /dev/null +++ b/test-harness/xunit2/Minimal Features/Failing.feature.cs @@ -0,0 +1,135 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class FailingFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Failing.feature" +#line hidden + + public FailingFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Failing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(FailingFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing")] + [Xunit.TraitAttribute("Description", "Failing Feature Passing Scenario")] + public virtual void FailingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing")] + [Xunit.TraitAttribute("Description", "Failing Feature Inconclusive Scenario")] + public virtual void FailingFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Failing")] + [Xunit.TraitAttribute("Description", "Failing Feature Failing Scenario")] + public virtual void FailingFeatureFailingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing Feature Failing Scenario", ((string[])(null))); +#line 9 +this.ScenarioSetup(scenarioInfo); +#line 10 + testRunner.Then("failing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + FailingFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + FailingFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/Minimal Features/Inconclusive.feature b/test-harness/xunit2/Minimal Features/Inconclusive.feature new file mode 100644 index 000000000..7ce63f2d5 --- /dev/null +++ b/test-harness/xunit2/Minimal Features/Inconclusive.feature @@ -0,0 +1,7 @@ +Feature: Inconclusive + +Scenario: Inconclusive Feature Passing Scenario + Then passing step + +Scenario: Inconclusive Feature Inconclusive Scenario + Then inconclusive step \ No newline at end of file diff --git a/test-harness/xunit2/Minimal Features/Inconclusive.feature.cs b/test-harness/xunit2/Minimal Features/Inconclusive.feature.cs new file mode 100644 index 000000000..5949fe978 --- /dev/null +++ b/test-harness/xunit2/Minimal Features/Inconclusive.feature.cs @@ -0,0 +1,121 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class InconclusiveFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Inconclusive.feature" +#line hidden + + public InconclusiveFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Inconclusive", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(InconclusiveFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Inconclusive")] + [Xunit.TraitAttribute("Description", "Inconclusive Feature Passing Scenario")] + public virtual void InconclusiveFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Inconclusive")] + [Xunit.TraitAttribute("Description", "Inconclusive Feature Inconclusive Scenario")] + public virtual void InconclusiveFeatureInconclusiveScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Inconclusive Feature Inconclusive Scenario", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 7 + testRunner.Then("inconclusive step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + InconclusiveFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + InconclusiveFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/Minimal Features/Passing.feature b/test-harness/xunit2/Minimal Features/Passing.feature new file mode 100644 index 000000000..14bf35e22 --- /dev/null +++ b/test-harness/xunit2/Minimal Features/Passing.feature @@ -0,0 +1,4 @@ +Feature: Passing + +Scenario: Passing Feature Passing Scenario + Then passing step diff --git a/test-harness/xunit2/Minimal Features/Passing.feature.cs b/test-harness/xunit2/Minimal Features/Passing.feature.cs new file mode 100644 index 000000000..e04c3c079 --- /dev/null +++ b/test-harness/xunit2/Minimal Features/Passing.feature.cs @@ -0,0 +1,107 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2.MinimalFeatures +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class PassingFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "Passing.feature" +#line hidden + + public PassingFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Passing", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(PassingFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Passing")] + [Xunit.TraitAttribute("Description", "Passing Feature Passing Scenario")] + public virtual void PassingFeaturePassingScenario() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Passing Feature Passing Scenario", ((string[])(null))); +#line 3 +this.ScenarioSetup(scenarioInfo); +#line 4 + testRunner.Then("passing step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + PassingFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + PassingFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/NotAutomatedAtAll.feature b/test-harness/xunit2/NotAutomatedAtAll.feature new file mode 100644 index 000000000..3bbfcb669 --- /dev/null +++ b/test-harness/xunit2/NotAutomatedAtAll.feature @@ -0,0 +1,19 @@ +Feature: Not Automated At All + +Background: + Given unimplemented step + +Scenario: Not automated scenario 1 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 2 + Given unimplemented step + When unimplemented step + Then unimplemented step + +Scenario: Not automated scenario 3 + Given unimplemented step + When unimplemented step + Then unimplemented step diff --git a/test-harness/xunit2/NotAutomatedAtAll.feature.cs b/test-harness/xunit2/NotAutomatedAtAll.feature.cs new file mode 100644 index 000000000..378699640 --- /dev/null +++ b/test-harness/xunit2/NotAutomatedAtAll.feature.cs @@ -0,0 +1,161 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class NotAutomatedAtAllFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "NotAutomatedAtAll.feature" +#line hidden + + public NotAutomatedAtAllFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Not Automated At All", "", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 3 +#line 4 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void SetFixture(NotAutomatedAtAllFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Not Automated At All")] + [Xunit.TraitAttribute("Description", "Not automated scenario 1")] + public virtual void NotAutomatedScenario1() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 1", ((string[])(null))); +#line 6 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 7 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 8 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 9 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Not Automated At All")] + [Xunit.TraitAttribute("Description", "Not automated scenario 2")] + public virtual void NotAutomatedScenario2() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 2", ((string[])(null))); +#line 11 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 12 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 13 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 14 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Not Automated At All")] + [Xunit.TraitAttribute("Description", "Not automated scenario 3")] + public virtual void NotAutomatedScenario3() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Not automated scenario 3", ((string[])(null))); +#line 16 +this.ScenarioSetup(scenarioInfo); +#line 3 +this.FeatureBackground(); +#line 17 + testRunner.Given("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 18 + testRunner.When("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 19 + testRunner.Then("unimplemented step", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + NotAutomatedAtAllFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + NotAutomatedAtAllFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/Properties/AssemblyInfo.cs b/test-harness/xunit2/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..9f27651f8 --- /dev/null +++ b/test-harness/xunit2/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("xunit2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("xunit2")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e5b28db5-295e-4e33-a9e3-d84a49265baf")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test-harness/xunit2/ScenarioOutlines.feature b/test-harness/xunit2/ScenarioOutlines.feature new file mode 100644 index 000000000..025cb168f --- /dev/null +++ b/test-harness/xunit2/ScenarioOutlines.feature @@ -0,0 +1,88 @@ +Feature: Scenario Outlines + Here we demonstrate how we deal with scenario outlines + +Scenario Outline: This is a scenario outline where all scenarios pass + + This means the entire scenario outline passes. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | pass_3 | + + +Scenario Outline: This is a scenario outline where one scenario is inconclusive + + This means the entire scenario outline is inconclusive. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | inconclusive_1 | + + +Scenario Outline: This is a scenario outline where one scenario fails + + This means the entire scenario outline fails. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + | fail_1 | + + +Scenario Outline: And we can go totally bonkers with multiple example sections. + + Then the scenario will '' + + Examples: + | result | + | pass_1 | + | pass_2 | + + Examples: + | result | + | inconclusive_1 | + | inconclusive_2 | + + Examples: + | result | + | fail_1 | + | fail_2 | + + +Scenario Outline: Deal correctly with backslashes in the examples + + When I have backslashes in the value, for example a '' + + Examples: + | file path | + | c:\Temp\ | + + +Scenario Outline: Deal correctly with parenthesis in the examples + + When I have parenthesis in the value, for example an '' + + Examples: + | overly descriptive field | + | This is a description (and more) | + +Scenario Outline: Deal correctly with overlong example values + + When I have a field with value '' + And I have a field with value '' + Then the scenario will 'pass_1' + + Examples: + | value1 | value2 | + | Please enter a valid two letter country code (e.g. DE)! | This is just a very very very veery long error message! | \ No newline at end of file diff --git a/test-harness/xunit2/ScenarioOutlines.feature.cs b/test-harness/xunit2/ScenarioOutlines.feature.cs new file mode 100644 index 000000000..492e5d03b --- /dev/null +++ b/test-harness/xunit2/ScenarioOutlines.feature.cs @@ -0,0 +1,213 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class ScenarioOutlinesFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenarioOutlines.feature" +#line hidden + + public ScenarioOutlinesFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenario Outlines", "Here we demonstrate how we deal with scenario outlines", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void SetFixture(ScenarioOutlinesFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "This is a scenario outline where all scenarios pass")] + [Xunit.InlineDataAttribute("pass_1", new string[0])] + [Xunit.InlineDataAttribute("pass_2", new string[0])] + [Xunit.InlineDataAttribute("pass_3", new string[0])] + public virtual void ThisIsAScenarioOutlineWhereAllScenariosPass(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where all scenarios pass", exampleTags); +#line 4 +this.ScenarioSetup(scenarioInfo); +#line 8 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "This is a scenario outline where one scenario is inconclusive")] + [Xunit.InlineDataAttribute("pass_1", new string[0])] + [Xunit.InlineDataAttribute("pass_2", new string[0])] + [Xunit.InlineDataAttribute("inconclusive_1", new string[0])] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioIsInconclusive(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario is inconclusive", exampleTags); +#line 17 +this.ScenarioSetup(scenarioInfo); +#line 21 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "This is a scenario outline where one scenario fails")] + [Xunit.InlineDataAttribute("pass_1", new string[0])] + [Xunit.InlineDataAttribute("pass_2", new string[0])] + [Xunit.InlineDataAttribute("fail_1", new string[0])] + public virtual void ThisIsAScenarioOutlineWhereOneScenarioFails(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline where one scenario fails", exampleTags); +#line 30 +this.ScenarioSetup(scenarioInfo); +#line 34 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "And we can go totally bonkers with multiple example sections.")] + [Xunit.InlineDataAttribute("pass_1", new string[0])] + [Xunit.InlineDataAttribute("pass_2", new string[0])] + [Xunit.InlineDataAttribute("inconclusive_1", new string[0])] + [Xunit.InlineDataAttribute("inconclusive_2", new string[0])] + [Xunit.InlineDataAttribute("fail_1", new string[0])] + [Xunit.InlineDataAttribute("fail_2", new string[0])] + public virtual void AndWeCanGoTotallyBonkersWithMultipleExampleSections_(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("And we can go totally bonkers with multiple example sections.", exampleTags); +#line 43 +this.ScenarioSetup(scenarioInfo); +#line 45 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "Deal correctly with backslashes in the examples")] + [Xunit.InlineDataAttribute("c:\\Temp\\", new string[0])] + public virtual void DealCorrectlyWithBackslashesInTheExamples(string filePath, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with backslashes in the examples", exampleTags); +#line 63 +this.ScenarioSetup(scenarioInfo); +#line 65 + testRunner.When(string.Format("I have backslashes in the value, for example a \'{0}\'", filePath), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "Deal correctly with parenthesis in the examples")] + [Xunit.InlineDataAttribute("This is a description (and more)", new string[0])] + public virtual void DealCorrectlyWithParenthesisInTheExamples(string description, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with parenthesis in the examples", exampleTags); +#line 63 + this.ScenarioSetup(scenarioInfo); +#line 65 + testRunner.When(string.Format("I have parenthesis in the value, for example an \'{0}\'", description), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenario Outlines")] + [Xunit.TraitAttribute("Description", "Deal correctly with overlong example values")] + [Xunit.InlineDataAttribute("Please enter a valid two letter country code (e.g. DE)!", "This is just a very very very veery long error message!", new string[0])] + public virtual void DealCorrectlyWithOverlongExampleValues(string value1, string value2, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Deal correctly with overlong example values", exampleTags); +#line 80 +this.ScenarioSetup(scenarioInfo); +#line 82 + testRunner.When(string.Format("I have a field with value \'{0}\'", value1), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 83 + testRunner.And(string.Format("I have a field with value \'{0}\'", value2), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 84 + testRunner.Then("the scenario will \'pass_1\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + ScenarioOutlinesFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + ScenarioOutlinesFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/ScenariosWithSpecialCharacters.feature b/test-harness/xunit2/ScenariosWithSpecialCharacters.feature new file mode 100644 index 000000000..15e291a18 --- /dev/null +++ b/test-harness/xunit2/ScenariosWithSpecialCharacters.feature @@ -0,0 +1,33 @@ +Feature: Scenarios With Special Characters + Here we demonstrate usage of special characters in scenario names + +Background: + Given the calculator has clean memory + +Scenario: This is a scenario with parentheses, hyphen and comma (10-20, 30-40) + Given I have entered 50 into the calculator + And I have entered 70 into the calculator + When I press add + Then the result should be 120 on the screen + + +Scenario Outline: This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40) + Then the scenario will '' + + Examples: + | result | + | pass_1 | + +Scenario Outline: This scenario contains examples with Regex-special characters + When I have special characters for regexes in the value, for example a '' + Then the scenario will 'PASS' + + Examples: + | regex | + | ** | + | ++ | + | .* | + | [] | + | {} | + | () | + | ^.*(?BAR)\s[^0-9]{3,4}A+$ | diff --git a/test-harness/xunit2/ScenariosWithSpecialCharacters.feature.cs b/test-harness/xunit2/ScenariosWithSpecialCharacters.feature.cs new file mode 100644 index 000000000..7b1b05968 --- /dev/null +++ b/test-harness/xunit2/ScenariosWithSpecialCharacters.feature.cs @@ -0,0 +1,165 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (http://www.specflow.org/). +// SpecFlow Version:1.9.0.77 +// SpecFlow Generator Version:1.9.0.0 +// Runtime Version:4.0.30319.42000 +// +// 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 Pickles.TestHarness.xunit2 +{ + using TechTalk.SpecFlow; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class ScenariosWithSpecialCharactersFeature : Xunit.IUseFixture, System.IDisposable + { + + private static TechTalk.SpecFlow.ITestRunner testRunner; + +#line 1 "ScenariosWithSpecialCharacters.feature" +#line hidden + + public ScenariosWithSpecialCharactersFeature() + { + this.TestInitialize(); + } + + public static void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Scenarios With Special Characters", "Here we demonstrate usage of special characters in scenario names", ProgrammingLanguage.CSharp, ((string[])(null))); + testRunner.OnFeatureStart(featureInfo); + } + + public static void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + public virtual void TestInitialize() + { + } + + public virtual void ScenarioTearDown() + { + testRunner.OnScenarioEnd(); + } + + public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioStart(scenarioInfo); + } + + public virtual void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + public virtual void FeatureBackground() + { +#line 4 +#line 5 + testRunner.Given("the calculator has clean memory", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden + } + + public virtual void SetFixture(ScenariosWithSpecialCharactersFeature.FixtureData fixtureData) + { + } + + void System.IDisposable.Dispose() + { + this.ScenarioTearDown(); + } + + [Xunit.FactAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Xunit.TraitAttribute("Description", "This is a scenario with parentheses, hyphen and comma (10-20, 30-40)")] + public virtual void ThisIsAScenarioWithParenthesesHyphenAndComma10_2030_40() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario with parentheses, hyphen and comma (10-20, 30-40)", ((string[])(null))); +#line 7 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 8 + testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 9 + testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 10 + testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Xunit.TraitAttribute("Description", "This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)")] + [Xunit.InlineDataAttribute("pass_1", new string[0])] + public virtual void ThisIsAScenarioOutlineWithParenthesesHyphenAndComma10_2030_40(string result, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This is a scenario outline with parentheses, hyphen and comma (10-20, 30-40)", exampleTags); +#line 14 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 15 + testRunner.Then(string.Format("the scenario will \'{0}\'", result), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [Xunit.TheoryAttribute()] + [Xunit.TraitAttribute("FeatureTitle", "Scenarios With Special Characters")] + [Xunit.TraitAttribute("Description", "This scenario contains examples with Regex-special characters")] + [Xunit.InlineDataAttribute("**", new string[0])] + [Xunit.InlineDataAttribute("++", new string[0])] + [Xunit.InlineDataAttribute(".*", new string[0])] + [Xunit.InlineDataAttribute("[]", new string[0])] + [Xunit.InlineDataAttribute("{}", new string[0])] + [Xunit.InlineDataAttribute("()", new string[0])] + [Xunit.InlineDataAttribute("^.*(?BAR)\\s[^0-9]{3,4}A+$", new string[0])] + public virtual void ThisScenarioContainsExamplesWithRegex_SpecialCharacters(string regex, string[] exampleTags) + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("This scenario contains examples with Regex-special characters", exampleTags); +#line 21 +this.ScenarioSetup(scenarioInfo); +#line 4 +this.FeatureBackground(); +#line 22 + testRunner.When(string.Format("I have special characters for regexes in the value, for example a \'{0}\'", regex), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 23 + testRunner.Then("the scenario will \'PASS\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden + this.ScenarioCleanup(); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.9.0.77")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class FixtureData : System.IDisposable + { + + public FixtureData() + { + ScenariosWithSpecialCharactersFeature.FeatureSetup(); + } + + void System.IDisposable.Dispose() + { + ScenariosWithSpecialCharactersFeature.FeatureTearDown(); + } + } + } +} +#pragma warning restore +#endregion diff --git a/test-harness/xunit2/XunitCompatibility.cs b/test-harness/xunit2/XunitCompatibility.cs new file mode 100644 index 000000000..ff239f63b --- /dev/null +++ b/test-harness/xunit2/XunitCompatibility.cs @@ -0,0 +1,32 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright 2011 Jeffrey Cameron +// Copyright 2012-present PicklesDoc team and community contributors +// +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// -------------------------------------------------------------------------------------------------------------------- +namespace Xunit +{ + /// + /// XUnit backwards compatibility for feature generator + /// + /// + /// Delete this when generator no longer uses this class - 5/25/15 + /// + /// + public interface IUseFixture : Xunit.IClassFixture where T : class, new() + { + } +} \ No newline at end of file diff --git a/test-harness/xunit2/app.config b/test-harness/xunit2/app.config new file mode 100644 index 000000000..f62dc8400 --- /dev/null +++ b/test-harness/xunit2/app.config @@ -0,0 +1,13 @@ + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/test-harness/xunit2/packages.config b/test-harness/xunit2/packages.config new file mode 100644 index 000000000..d10ecc028 --- /dev/null +++ b/test-harness/xunit2/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/test-harness/xunit2/xunit2.csproj b/test-harness/xunit2/xunit2.csproj new file mode 100644 index 000000000..72ad55b87 --- /dev/null +++ b/test-harness/xunit2/xunit2.csproj @@ -0,0 +1,168 @@ + + + + + + Debug + AnyCPU + {E5B28DB5-295E-4E33-A9E3-D84A49265BAF} + Library + Properties + Pickles.TestHarness.xunit2 + xunit2Harness + v4.5 + 512 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + ..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll + True + + + ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + True + + + ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll + True + + + ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + True + + + ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + True + + + + + Addition.feature + True + True + + + FailingBackground.feature + True + True + + + Failing.feature + True + True + + + Inconclusive.feature + True + True + + + Passing.feature + True + True + + + NotAutomatedAtAll.feature + True + True + + + + ScenarioOutlines.feature + True + True + + + True + True + ScenariosWithSpecialCharacters.feature + + + + + + {073862de-d599-4941-9716-03206cf1cfa2} + AutomationLayer + + + + + SpecFlowSingleFileGenerator + Addition.feature.cs + + + + SpecFlowSingleFileGenerator + FailingBackground.feature.cs + + + SpecFlowSingleFileGenerator + Failing.feature.cs + + + SpecFlowSingleFileGenerator + Inconclusive.feature.cs + + + SpecFlowSingleFileGenerator + Passing.feature.cs + + + SpecFlowSingleFileGenerator + NotAutomatedAtAll.feature.cs + + + + SpecFlowSingleFileGenerator + ScenarioOutlines.feature.cs + + + SpecFlowSingleFileGenerator + ScenariosWithSpecialCharacters.feature.cs + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/test.fsx b/test.fsx index a6f36e697..c91033623 100644 --- a/test.fsx +++ b/test.fsx @@ -1,6 +1,7 @@ // include Fake lib #r @"packages\FAKE\tools\FakeLib.dll" open Fake +open Fake.Testing // Properties @@ -8,18 +9,20 @@ let testDir = "./test/" Target "Test" (fun _ -> !! (testDir + "PicklesDoc.Pickles.Test.dll") - |> NUnit (fun p -> + |> NUnit3 (fun p -> {p with - DisableShadowCopy = true; - OutputFile = testDir + "TestResults.xml" }) + ShadowCopy = false; + OutputDir = testDir + "PicklesDoc.Pickles.Test.TestResults.xml"; + ToolPath = "packages/NUnit.ConsoleRunner/tools/nunit3-console.exe" }) ) Target "Test.TestFrameworks" (fun _ -> - !! (testDir + "PicklesDoc.Pickles.TestFrameworks.UnitTests") - |> NUnit (fun p -> + !! (testDir + "PicklesDoc.Pickles.TestFrameworks.UnitTests.dll") + |> NUnit3 (fun p -> {p with - DisableShadowCopy = true; - OutputFile = testDir + "TestFrameworks.TestResults.xml" }) + ShadowCopy = false; + OutputDir = testDir + "PicklesDoc.Pickles.TestFrameworks.UnitTests.TestResults.xml"; + ToolPath = "packages/NUnit.ConsoleRunner/tools/nunit3-console.exe" }) ) "Test" ==> "Test.TestFrameworks"