Skip to content

Commit

Permalink
Merge branch 'release-2.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Rombauts committed May 11, 2016
2 parents 9ddbeb9 + 6f2ea80 commit 53305e4
Show file tree
Hide file tree
Showing 226 changed files with 17,960 additions and 1,150 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 31 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 41 additions & 0 deletions CreateTestresults.cmd
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down
5 changes: 4 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -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%

Expand Down
3 changes: 2 additions & 1 deletion src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,11 @@ public WhenParsingCucumberJsonFromJSResultsFileWithIndividualResults()
{
base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed();
}

[Test]
public new void ThenCanReadExamplesWithLongExampleValues()
{
base.ThenCanReadExamplesWithLongExampleValues();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,11 @@ public WhenParsingCucumberJsonFromRubyResultsFileWithIndividualResults()
{
base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed();
}

[Test]
public new void ThenCanReadExamplesWithLongExampleValues()
{
base.ThenCanReadExamplesWithLongExampleValues();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,11 @@ public WhenParsingMsTestResultsFileWithIndividualResults()
{
base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed();
}

[Test]
public new void ThenCanReadExamplesWithLongExampleValues()
{
base.ThenCanReadExamplesWithLongExampleValues();
}
}
}
Loading

0 comments on commit 53305e4

Please sign in to comment.