Skip to content

Commit

Permalink
Version 2.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkrombauts committed Oct 9, 2018
1 parent b072d7a commit 42d3909
Show file tree
Hide file tree
Showing 103 changed files with 2,401 additions and 526 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt

### Security

## [2.20.0] - 2018-10-09

### Added

- Pickles GUI: Generate equivalent PowerShell or Windows Console command line ([90](https://github.com/picklesdoc/pickles/issues/90)) (by [@magicmonty](https://github.com/magicmonty))

### Fixed

- Inconclusive marker shown when generating doc without test results ([545](https://github.com/picklesdoc/pickles/issues/545)) (by [@dirkrombauts](https://github.com/dirkrombauts))
- Remove requirement for hardcoded 'Index.html' in featureSearch.js ([541](https://github.com/picklesdoc/pickles/pull/541)) (by [@szaliszali](https://github.com/szaliszali))
- Exception in XUnit2ScenarioOutlineExampleMatcher ([548](https://github.com/picklesdoc/pickles/issues/548)) (by [@magicmonty](https://github.com/magicmonty))

## [2.19.0] - 2018-07-20

### Added
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you find a bug in a Test Result Provider and want to contribute towards fixin

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. Please remember to build the `TestHarness.sln` solution first!
Use the `CreateTestResults.ps1` 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`.

Expand All @@ -30,7 +30,7 @@ the `test-harness` directory contains the scenarios from which test results are

##### .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.
The .NET code is found in `./TestHarness/TestHarness.sln` solution. You will need [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/) in order to open the solution; the free Community version is fine. Remember to restore the NuGet packages before you compile.

##### Cucumber/Ruby Code

Expand Down
82 changes: 82 additions & 0 deletions CreateTestResults.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Write-Host "Remember to build the solution first!"

# NUnit2
Start-Process -FilePath "$PSScriptRoot\test-harness\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe" -ArgumentList "$PSScriptRoot\test-harness\nunit\bin\Debug\nunitHarness.dll", "/result=$PSScriptRoot\results-example-nunit.xml" -NoNewWindow -Wait

# NUnit 2 with NUnit3 runner
Start-Process -FilePath "$PSScriptRoot\test-harness\packages\NUnit.ConsoleRunner.3.6.0\tools\nunit3-console.exe" -ArgumentList "$PSScriptRoot\test-harness\nunit\bin\Debug\nunitHarness.dll", "/result=$PSScriptRoot\results-example-nunit2-with-nunit3-runner.xml" -NoNewWindow -Wait

# NUnit 3
Start-Process -FilePath "$PSScriptRoot\test-harness\packages\NUnit.ConsoleRunner.3.6.0\tools\nunit3-console.exe" -ArgumentList "$PSScriptRoot\test-harness\nunit3\bin\Debug\nunit3Harness.dll", "/result=$PSScriptRoot\results-example-nunit3.xml" -NoNewWindow -Wait

# SpecRun
Start-Process -FilePath "$PSScriptRoot\test-harness\packages\SpecRun.Runner.1.2.0\tools\specrun.exe" -ArgumentList "run default.srprofile", "/baseFolder:$PSScriptRoot\test-harness\SpecRun\bin\Debug", "/log:specrun.log", "/report:$PSScriptRoot\results-example-specrun.html" -NoNewWindow -Wait

# XUnit 1
Start-Process -FilePath "$PSScriptRoot\test-harness\packagesNonNuget\xunit.runner\xunit.console.clr4.exe" -ArgumentList "$PSScriptRoot\test-harness\xunit\bin\Debug\xunitHarness.dll", "/xml $PSScriptRoot\results-example-xunit.xml" -NoNewWindow -Wait

# XUnit 2
Start-Process -FilePath "$PSScriptRoot\test-harness\packages\xunit.runner.console.2.1.0\tools\xunit.console.exe" -ArgumentList "$PSScriptRoot\test-harness\xunit2\bin\Debug\xunit2Harness.dll", "-xml $PSScriptRoot\results-example-xunit2.xml", "-parallel none" -NoNewWindow -Wait

# MSTest
$MSTest = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017" -Recurse | Where-Object { $_.Name -eq "MSTest.exe" } | Select-Object -First 1
$MsTestResultFilePath = "$PSScriptRoot\results-example-mstest.trx"
if (Test-Path $MsTestResultFilePath) {
Remove-Item $MsTestResultFilePath
}

Start-Process -FilePath $MSTest.FullName -ArgumentList "/testcontainer:$PSScriptRoot\test-harness\mstest\bin\Debug\mstestHarness.dll", "/resultsfile:$MsTestResultFilePath", "/testsettings:$PSScriptRoot\test-harness\TestSettings.testsettings" -NoNewWindow -Wait

# Cucumber
Set-Location -Path "$PSScriptRoot\test-harness\Cucumber"
& "cucumber" --format json_pretty --out "$PSScriptRoot\results-example-json.json" --tags ~@ignore
Set-Location $PSScriptRoot

# CucumberJS
Set-Location -Path "$PSScriptRoot\test-harness\CucumberJS"
& "$PSScriptRoot\node_modules\.bin\cucumber-js" --format json:"$PSScriptRoot\results-example-cucumberjs-json.json"
Set-Location $PSScriptRoot

# VSTest
## Get VSTest console runner location
$VSTest = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017" -Recurse | Where-Object { $_.Name -eq "vstest.console.exe" } | Select-Object -First 1

## Remove any previous .trx files
Get-ChildItem -Path "$PSScriptRoot\TestResults" | Where-Object { $_.Extension -eq ".trx" } | Remove-Item

Start-Process -FilePath $VSTest.FullName -ArgumentList "$PSScriptRoot\test-harness\mstest\bin\Debug\mstestHarness.dll", "/logger:trx" -NoNewWindow -Wait

## Get the .trx file
$VsTestResultFile = Get-ChildItem -Path "$PSScriptRoot\TestResults" | Where-Object {$_.Extension -eq ".trx" } | Sort-Object CreationTime -Descending | Select-Object -First 1

# Moving result files to corresponding unit test projects
Write-Host "Moving NUnit 2 results"
Move-Item -Path "$PSScriptRoot\results-example-nunit.xml" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\NUnit\NUnit2\" -Force

Write-Host "Moving NUnit 2 with NUnit3 runner results"
Move-Item -Path "$PSScriptRoot\results-example-nunit2-with-nunit3-runner.xml" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\NUnit\NUnit3\" -Force

Write-Host "Moving NUnit 3 results"
Move-Item -Path "$PSScriptRoot\results-example-nunit3.xml" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\NUnit\NUnit3\" -Force

Write-Host "Moving XUnit 1 results"
Move-Item -Path "$PSScriptRoot\results-example-xunit.xml" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\XUnit\XUnit1\" -Force

Write-Host "Moving XUnit 2 results"
Move-Item -Path "$PSScriptRoot\results-example-xunit2.xml" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\XUnit\XUnit2\" -Force

Write-Host "Moving SpecRun results"
Move-Item -Path "$PSScriptRoot\results-example-specrun.html" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\SpecRun\" -Force

Write-Host "Moving Cucumber JSON results"
Move-Item -Path "$PSScriptRoot\results-example-json.json" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\CucumberJSON\" -Force

Write-Host "Moving MSTest results"
Move-Item -Path "$PSScriptRoot\results-example-mstest.trx" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\MsTest\" -Force

Write-Host "Moving CucumberJS JSON results"
Write-Host "The tags do not seem to work - remember to manually remove the ignored scenarios from the result"
Move-Item -Path "$PSScriptRoot\results-example-cucumberjs-json.json" -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\CucumberJSON\" -Force

Write-Host "Moving VSTest results"
Move-Item -Path $VsTestResultFile.FullName -Destination "$PSScriptRoot\src\Pickles\Pickles.TestFrameworks.UnitTests\VsTest\results-example-vstest.trx" -Force
55 changes: 0 additions & 55 deletions CreateTestresults.cmd

This file was deleted.

2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set "picklesVersion=2.19.0"
set "picklesVersion=2.20.0"

cls

Expand Down
7 changes: 7 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ Target "BuildTest.Runners.CommandLine" (fun _ ->
|> Log "AppBuild-Output: "
)

Target "BuildTest.Runners.UI" (fun _ ->
!! "src/Pickles/Pickles.UserInterface.UnitTests/Pickles.UserInterface.UnitTests.csproj"
|> MSBuildRelease testDir "Build"
|> Log "AppBuild-Output: "
)

let createZip (packageType : string) =
!! (buildDir + "/" + packageType + "/*.*") -- "*.zip"
|> Zip (buildDir + packageType) (deployDir + "Pickles-" + packageType + "-" + version + ".zip")
Expand Down Expand Up @@ -151,6 +157,7 @@ Target "Default" (fun _ ->
==> "BuildTest.DocumentationBuilders.Json"
==> "BuildTest.DocumentationBuilders.Word"
==> "BuildTest.Runners.CommandLine"
==> "BuildTest.Runners.UI"
==> "Zip"
==> "Default"

Expand Down
4 changes: 2 additions & 2 deletions docs/Output/Dhtml/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
</script>

<script type="text/html" id="testResults-template">
<div style="float: right" data-bind="if: WasExecuted">
<div style="float: right" data-bind="if: (WasExecuted && WasProvided)">
<div data-bind="if: WasSuccessful"><span class="badge badge-success"><i class="icon-ok passed" title="Passed"></i></span></div>
<div data-bind="if: !WasSuccessful"><span class="badge badge-important"><i class="icon-minus-sign failed" title="Failed"></i></span></div>
</div>
<div style="float: right" data-bind="if: !WasExecuted">
<div style="float: right" data-bind="if: (!WasExecuted && WasExecuted)">
<span class="badge badge-warning"><i class="icon-warning-sign inconclusive" title="Inconclusive"></i></span>
</div>
</script>
Expand Down
Loading

0 comments on commit 42d3909

Please sign in to comment.