From 1175bf4b38f893fa41bcbbb1459fb8323c2abfe8 Mon Sep 17 00:00:00 2001 From: Amanda Adams Date: Fri, 16 Dec 2016 15:03:53 -0600 Subject: [PATCH 1/5] Allowing a directory to be passed for test result files instead of a delimited list of files --- src/Pickles/.vs/config/applicationhost.config | 2 +- .../Pickles/CommandLineArgumentParser.cs | 12 ++++++++++++ src/Pickles/Pickles/ConfigurationReporter.cs | 18 +++++++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/Pickles/.vs/config/applicationhost.config b/src/Pickles/.vs/config/applicationhost.config index 0427627b0..75b823f8c 100644 --- a/src/Pickles/.vs/config/applicationhost.config +++ b/src/Pickles/.vs/config/applicationhost.config @@ -163,7 +163,7 @@ - + diff --git a/src/Pickles/Pickles/CommandLineArgumentParser.cs b/src/Pickles/Pickles/CommandLineArgumentParser.cs index b4ffde1a6..70a5ebaf4 100644 --- a/src/Pickles/Pickles/CommandLineArgumentParser.cs +++ b/src/Pickles/Pickles/CommandLineArgumentParser.cs @@ -43,6 +43,9 @@ public class CommandLineArgumentParser public const string HelpTestResultsFile = "the path to the linked test results file (can be a semicolon-separated list of files)"; + public const string HelpTestResultsDir = + "directory to start scanning recursively for results files"; + private readonly IFileSystem fileSystem; private readonly OptionSet options; @@ -54,6 +57,7 @@ public class CommandLineArgumentParser private string systemUnderTestName; private string systemUnderTestVersion; private string testResultsFile; + private string testResultsDirectory; private string testResultsFormat; private bool versionRequested; private bool includeExperimentalFeatures; @@ -68,6 +72,7 @@ public CommandLineArgumentParser(IFileSystem fileSystem) { "o|output-directory=", HelpOutputDir, v => this.outputDirectory = v }, { "trfmt|test-results-format=", HelpTestResultsFormat, v => this.testResultsFormat = v }, { "lr|link-results-file=", HelpTestResultsFile, v => this.testResultsFile = v }, + { "ld|link-results-directory=", HelpTestResultsDir, v => this.testResultsDirectory = v }, { "sn|system-under-test-name=", HelpSutName, v => this.systemUnderTestName = v }, { "sv|system-under-test-version=", HelpSutVersion, v => this.systemUnderTestVersion = v }, { "l|language=", HelpLanguageFeatureFiles, v => this.language = v }, @@ -122,6 +127,13 @@ public bool Parse(string[] args, IConfiguration configuration, TextWriter stdout configuration.AddTestResultFiles(files.Select(f => this.fileSystem.FileInfo.FromFileName(f))); } + if (!string.IsNullOrEmpty(this.testResultsDirectory)) + { + configuration.AddTestResultFiles( + this.fileSystem.DirectoryInfo.FromDirectoryName( + this.testResultsDirectory).EnumerateFiles("*.json", System.IO.SearchOption.AllDirectories)); + } + if (!string.IsNullOrEmpty(this.systemUnderTestName)) { configuration.SystemUnderTestName = this.systemUnderTestName; diff --git a/src/Pickles/Pickles/ConfigurationReporter.cs b/src/Pickles/Pickles/ConfigurationReporter.cs index 50d44cf46..22c2a8846 100644 --- a/src/Pickles/Pickles/ConfigurationReporter.cs +++ b/src/Pickles/Pickles/ConfigurationReporter.cs @@ -39,7 +39,23 @@ public void ReportOn(IConfiguration configuration, Action writeToLog) if (configuration.HasTestResults) { writeToLog($"Test Result Format : {configuration.TestResultsFormat}"); - writeToLog($"Test Result File : {configuration.TestResultsFile.FullName}"); + int result = 0; + string fileList = ""; + using (var enumerator = configuration.TestResultsFiles.GetEnumerator()) + { + while (enumerator.MoveNext()) + { + fileList += enumerator.Current.FullName + "; "; + result++; + } + } + if (result == 1) { + writeToLog($"Test Result File : {configuration.TestResultsFile.FullName}"); + } + else + { + writeToLog($"Test Result Files : {fileList.Substring(0, fileList.Length - 2)}"); + } } } } From 456dfa69dc8b643abe5b950d87fad6eee6e99a64 Mon Sep 17 00:00:00 2001 From: Amanda Adams Date: Fri, 16 Dec 2016 15:40:19 -0600 Subject: [PATCH 2/5] Fixing an unintended commit --- src/Pickles/.vs/config/applicationhost.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pickles/.vs/config/applicationhost.config b/src/Pickles/.vs/config/applicationhost.config index 75b823f8c..0427627b0 100644 --- a/src/Pickles/.vs/config/applicationhost.config +++ b/src/Pickles/.vs/config/applicationhost.config @@ -163,7 +163,7 @@ - + From 0bbe5f3d8e55eebd9cfd8d56522365a5f1314398 Mon Sep 17 00:00:00 2001 From: Amanda Adams Date: Fri, 16 Dec 2016 16:09:07 -0600 Subject: [PATCH 3/5] Fixing tests --- src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs b/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs index 82530823a..dd64331db 100644 --- a/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs +++ b/src/Pickles/Pickles.Test/WhenParsingCommandLineArguments.cs @@ -46,6 +46,9 @@ public class WhenParsingCommandLineArguments : BaseFixture " --lr, --link-results-file=VALUE" + "{0}" + " the path to the linked test results file (can be " + "{0}" + " a semicolon-separated list of files)" + "{0}" + + " --ld, --link-results-directory=VALUE" + "{0}" + + " directory to start scanning recursively for " + "{0}" + + " results files" + "{0}" + " --sn, --system-under-test-name=VALUE" + "{0}" + " the name of the system under test" + "{0}" + " --sv, --system-under-test-version=VALUE" + "{0}" + From d389d70f66c280184f6d337004407c971112cf2e Mon Sep 17 00:00:00 2001 From: Amanda Adams Date: Wed, 22 Feb 2017 22:07:17 -0600 Subject: [PATCH 4/5] Adding skip on error when matching results to feature and more verbose error messaging --- src/Pickles/.vs/config/applicationhost.config | 2 +- .../Pickles.CommandLine.csproj | 41 ++++++++++++++++++ .../Pickles.CommandLine_TemporaryKey.pfx | Bin 0 -> 1633 bytes src/Pickles/Pickles.CommandLine/Program.cs | 1 + .../HtmlImageResultFormatter.cs | 8 +++- .../CucumberJsonSingleResultLoader.cs | 9 +++- src/Pickles/Pickles/Runner.cs | 31 +++++++++---- 7 files changed, 81 insertions(+), 11 deletions(-) create mode 100644 src/Pickles/Pickles.CommandLine/Pickles.CommandLine_TemporaryKey.pfx diff --git a/src/Pickles/.vs/config/applicationhost.config b/src/Pickles/.vs/config/applicationhost.config index 984e93ccf..92bc9d04d 100644 --- a/src/Pickles/.vs/config/applicationhost.config +++ b/src/Pickles/.vs/config/applicationhost.config @@ -163,7 +163,7 @@ - + diff --git a/src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj b/src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj index 3bdfb6938..f2e877bc3 100644 --- a/src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj +++ b/src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj @@ -16,6 +16,22 @@ + C:\Users\aadams\Documents\ADP\published_files\pickles\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + true AnyCPU @@ -41,6 +57,18 @@ PicklesDoc.Pickles.CommandLine.Program + + 58C81F2E680EB86FABDBEE60F94068CFF0846BAC + + + Pickles.CommandLine_TemporaryKey.pfx + + + true + + + true + ..\packages\Autofac.4.3.0\lib\net45\Autofac.dll @@ -92,8 +120,21 @@ Designer + + + + False + Microsoft .NET Framework 4.5 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + +