Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: General handling of special characters in scenario outline inputs, and XUnit failed, if multiple TestResults.xml were used #336

Merged
merged 13 commits into from
May 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ Target "BuildTest" (fun _ ->
|> Log "AppBuild-Output: "
)

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

let createZip (packageType : string) =
!! (buildDir + "/" + packageType + "/*.*") -- "*.zip"
|> Zip (buildDir + packageType) (deployDir + "Pickles-" + packageType + "-" + version + ".zip")
Expand All @@ -87,6 +93,7 @@ Target "Default" (fun _ ->
==> "BuildPowerShell"
==> "BuildGui"
==> "BuildTest"
==> "BuildTest.TestFrameworks"
==> "Zip"
==> "Default"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

using System;

using NUnit.Framework;

Expand Down Expand Up @@ -57,5 +56,11 @@ public WhenParsingCucumberJsonFromJSResultsFileWithIndividualResults()
{
base.ThenCanReadIndividualResultsFromScenarioOutline_MultipleExampleSections_ShouldBeTestResultFailed();
}

[Test]
public new void ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed()
{
base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

using System;

using NUnit.Framework;

Expand Down Expand Up @@ -57,5 +56,11 @@ public WhenParsingCucumberJsonFromRubyResultsFileWithIndividualResults()
{
base.ThenCanReadIndividualResultsFromScenarioOutline_MultipleExampleSections_ShouldBeTestResultFailed();
}

[Test]
public new void ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed()
{
base.ThenCanReadExamplesWithRegexValuesFromScenarioOutline_ShouldBeTestResultPassed();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,328 @@
}
}
]
},
{
"name": "This scenario contains examples with Regex-special characters",
"id": "Scenarios-With-Special-Characters;this-scenario-contains-examples-with-regex-special-characters",
"line": 27,
"keyword": "Scenario",
"description": "",
"type": "scenario",
"steps": [
{
"name": "the calculator has clean memory",
"line": 5,
"keyword": "Given ",
"result": {
"status": "passed",
"duration": 79258
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\AdditionSteps.js:10"
}
},
{
"name": "I have special characters for regexes in the value, for example a '**'",
"line": 22,
"keyword": "When ",
"result": {
"status": "passed",
"duration": 80969
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:32"
}
},
{
"name": "the scenario will 'pass_1'",
"line": 23,
"keyword": "Then ",
"result": {
"status": "passed",
"duration": 56450
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7"
}
}
]
},
{
"name": "This scenario contains examples with Regex-special characters",
"id": "Scenarios-With-Special-Characters;this-scenario-contains-examples-with-regex-special-characters",
"line": 28,
"keyword": "Scenario",
"description": "",
"type": "scenario",
"steps": [
{
"name": "the calculator has clean memory",
"line": 5,
"keyword": "Given ",
"result": {
"status": "passed",
"duration": 197574
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\AdditionSteps.js:10"
}
},
{
"name": "I have special characters for regexes in the value, for example a '++'",
"line": 22,
"keyword": "When ",
"result": {
"status": "passed",
"duration": 62436
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:32"
}
},
{
"name": "the scenario will 'pass_1'",
"line": 23,
"keyword": "Then ",
"result": {
"status": "passed",
"duration": 55595
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7"
}
}
]
},
{
"name": "This scenario contains examples with Regex-special characters",
"id": "Scenarios-With-Special-Characters;this-scenario-contains-examples-with-regex-special-characters",
"line": 29,
"keyword": "Scenario",
"description": "",
"type": "scenario",
"steps": [
{
"name": "the calculator has clean memory",
"line": 5,
"keyword": "Given ",
"result": {
"status": "passed",
"duration": 84674
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\AdditionSteps.js:10"
}
},
{
"name": "I have special characters for regexes in the value, for example a '.*'",
"line": 22,
"keyword": "When ",
"result": {
"status": "passed",
"duration": 61011
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:32"
}
},
{
"name": "the scenario will 'pass_1'",
"line": 23,
"keyword": "Then ",
"result": {
"status": "passed",
"duration": 66713
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7"
}
}
]
},
{
"name": "This scenario contains examples with Regex-special characters",
"id": "Scenarios-With-Special-Characters;this-scenario-contains-examples-with-regex-special-characters",
"line": 30,
"keyword": "Scenario",
"description": "",
"type": "scenario",
"steps": [
{
"name": "the calculator has clean memory",
"line": 5,
"keyword": "Given ",
"result": {
"status": "passed",
"duration": 69849
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\AdditionSteps.js:10"
}
},
{
"name": "I have special characters for regexes in the value, for example a '[]'",
"line": 22,
"keyword": "When ",
"result": {
"status": "passed",
"duration": 51318
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:32"
}
},
{
"name": "the scenario will 'pass_1'",
"line": 23,
"keyword": "Then ",
"result": {
"status": "passed",
"duration": 65573
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7"
}
}
]
},
{
"name": "This scenario contains examples with Regex-special characters",
"id": "Scenarios-With-Special-Characters;this-scenario-contains-examples-with-regex-special-characters",
"line": 31,
"keyword": "Scenario",
"description": "",
"type": "scenario",
"steps": [
{
"name": "the calculator has clean memory",
"line": 5,
"keyword": "Given ",
"result": {
"status": "passed",
"duration": 66429
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\AdditionSteps.js:10"
}
},
{
"name": "I have special characters for regexes in the value, for example a '{}'",
"line": 22,
"keyword": "When ",
"result": {
"status": "passed",
"duration": 51888
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:32"
}
},
{
"name": "the scenario will 'pass_1'",
"line": 23,
"keyword": "Then ",
"result": {
"status": "passed",
"duration": 75266
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7"
}
}
]
},
{
"name": "This scenario contains examples with Regex-special characters",
"id": "Scenarios-With-Special-Characters;this-scenario-contains-examples-with-regex-special-characters",
"line": 32,
"keyword": "Scenario",
"description": "",
"type": "scenario",
"steps": [
{
"name": "the calculator has clean memory",
"line": 5,
"keyword": "Given ",
"result": {
"status": "passed",
"duration": 65003
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\AdditionSteps.js:10"
}
},
{
"name": "I have special characters for regexes in the value, for example a '()'",
"line": 22,
"keyword": "When ",
"result": {
"status": "passed",
"duration": 139414
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:32"
}
},
{
"name": "the scenario will 'pass_1'",
"line": 23,
"keyword": "Then ",
"result": {
"status": "passed",
"duration": 213540
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7"
}
}
]
},
{
"name": "This scenario contains examples with Regex-special characters",
"id": "Scenarios-With-Special-Characters;this-scenario-contains-examples-with-regex-special-characters",
"line": 33,
"keyword": "Scenario",
"description": "",
"type": "scenario",
"steps": [
{
"name": "the calculator has clean memory",
"line": 5,
"keyword": "Given ",
"result": {
"status": "passed",
"duration": 310474
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\AdditionSteps.js:10"
}
},
{
"name": "I have special characters for regexes in the value, for example a '^.*(?<foo>BAR)\\s[^0-9]{3,4}A+$'",
"line": 22,
"keyword": "When ",
"result": {
"status": "passed",
"duration": 74982
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:32"
}
},
{
"name": "the scenario will 'pass_1'",
"line": 23,
"keyword": "Then ",
"result": {
"status": "passed",
"duration": 56165
},
"match": {
"location": "D:\\Work\\pickles-testresults\\TestHarness\\CucumberJS\\features\\stepdefinitions\\ScenarioOutlineSteps.js:7"
}
}
]
}
]
}
Expand Down
Loading