From a3570876881e1b028200f69873b2756e022bd9ed Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 24 Apr 2010 21:41:30 +0100 Subject: [PATCH 1/3] modded help file with more info --- Tools/Program.cs | 139 +++++++++++++++++++++++++++++------------------ 1 file changed, 86 insertions(+), 53 deletions(-) diff --git a/Tools/Program.cs b/Tools/Program.cs index f7f98fe0d..af7cc3ae7 100644 --- a/Tools/Program.cs +++ b/Tools/Program.cs @@ -8,57 +8,90 @@ namespace TechTalk.SpecFlow.Tools { - class Program - { - static void Main(string[] args) - { - Consolery.Run(typeof(Program), args); - return; - } - - [Action("Generate tests from all feature files in a project")] - public static void GenerateAll( - [Required] string projectFile, - [Optional(false, "force", "f")] bool forceGeneration, - [Optional(false, "verbose", "v")] bool verboseOutput - ) - { - SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(projectFile); - - BatchGenerator batchGenerator = new BatchGenerator(Console.Out, verboseOutput); - batchGenerator.ProcessProject(specFlowProject, forceGeneration); - } - - #region Reports - - [Action("Generates a report about usage and binding of steps")] - public static void StepDefinitionReport( - [Required] string projectFile, - [Optional("bin\\Debug")] string binFolder, - [Optional("StepDefinitionReport.html", "out")] string outputFile - ) - { - StepDefinitionReportGenerator generator = new StepDefinitionReportGenerator(projectFile, binFolder, true); - generator.GenerateReport(); - generator.TransformReport(Path.GetFullPath(outputFile)); - } - - [Action("Formats an NUnit execution report to SpecFlow style")] - public static void NUnitExecutionReport( - [Required] string projectFile, - [Optional("TestResult.xml")] string xmlTestResult, - [Optional("TestResult.txt", "testOutput")] string labeledTestOutput, - [Optional("TestResult.html", "out")] string outputFile - ) - { - NUnitExecutionReportGenerator generator = new NUnitExecutionReportGenerator( - projectFile, - Path.GetFullPath(xmlTestResult), - Path.GetFullPath(labeledTestOutput)); - generator.GenerateReport(); - generator.TransformReport(Path.GetFullPath(outputFile)); - } - - #endregion - } + class Program + { + static void Main(string[] args) + { + Consolery.Run(typeof(Program), args); + return; + } + + [Action("Generate tests from all feature files in a project")] + public static void GenerateAll([Required(Description = "Visual Studio Project File containing features")] string projectFile, + [Optional(false, "force", "f")] bool forceGeneration, + [Optional(false, "verbose", "v")] bool verboseOutput) + { + SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(projectFile); + BatchGenerator batchGenerator = new BatchGenerator(Console.Out, verboseOutput); + batchGenerator.ProcessProject(specFlowProject, forceGeneration); + } + +#region Reports +[ +Action("Generates a report about usage and binding of steps")] + +public static void StepDefinitionReport( + +[ +Required(Description = "Visual Studio Project File containing specs")] string projectFile, + +[ +Optional("bin\\Debug", Description = @"Path for Spec dll e.g. Company.Specs.dll. Defaults to bin\Debug ")] string binFolder, + +[ +Optional("StepDefinitionReport.html", "out", Description = "Generated Output File. Defaults to StepDefinitionReport.html")] string outputFile + +) + +{ + +StepDefinitionReportGenerator generator = new StepDefinitionReportGenerator(projectFile, binFolder, true); + +generator.GenerateReport(); + +generator.TransformReport( +Path.GetFullPath(outputFile)); + +} + +[ +Action("Formats an NUnit execution report to SpecFlow style")] + +public static void NUnitExecutionReport( + +[ +Required(Description = "Visual Studio Project File containing specs")] string projectFile, + +[ +Optional("TestResult.xml", Description = "Xml Test Result file generated by NUnit. Defaults to TestResult.xml")] string xmlTestResult, + +[ +Optional("TestResult.txt", "testOutput")] string labeledTestOutput, + +[ +Optional("TestResult.html", "out", Description = "Generated Output File. Defaults to TestResult.html")] string outputFile + +) + +{ + +NUnitExecutionReportGenerator generator = new NUnitExecutionReportGenerator( + +projectFile, + +Path.GetFullPath(xmlTestResult), + +Path.GetFullPath(labeledTestOutput)); + +generator.GenerateReport(); + +generator.TransformReport( +Path.GetFullPath(outputFile)); + +} + +#endregion + +} + } \ No newline at end of file From 65a386507b096273ed0fa160fda4a17b3c247179 Mon Sep 17 00:00:00 2001 From: Simon Whittemore Date: Tue, 27 Apr 2010 11:20:11 +0100 Subject: [PATCH 2/3] formatting --- Tools/Program.cs | 133 +++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 86 deletions(-) diff --git a/Tools/Program.cs b/Tools/Program.cs index af7cc3ae7..eab82b21b 100644 --- a/Tools/Program.cs +++ b/Tools/Program.cs @@ -8,90 +8,51 @@ namespace TechTalk.SpecFlow.Tools { - class Program - { - static void Main(string[] args) - { - Consolery.Run(typeof(Program), args); - return; - } - - [Action("Generate tests from all feature files in a project")] - public static void GenerateAll([Required(Description = "Visual Studio Project File containing features")] string projectFile, - [Optional(false, "force", "f")] bool forceGeneration, - [Optional(false, "verbose", "v")] bool verboseOutput) - { - SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(projectFile); - BatchGenerator batchGenerator = new BatchGenerator(Console.Out, verboseOutput); - batchGenerator.ProcessProject(specFlowProject, forceGeneration); - } - -#region Reports -[ -Action("Generates a report about usage and binding of steps")] - -public static void StepDefinitionReport( - -[ -Required(Description = "Visual Studio Project File containing specs")] string projectFile, - -[ -Optional("bin\\Debug", Description = @"Path for Spec dll e.g. Company.Specs.dll. Defaults to bin\Debug ")] string binFolder, - -[ -Optional("StepDefinitionReport.html", "out", Description = "Generated Output File. Defaults to StepDefinitionReport.html")] string outputFile - -) - -{ - -StepDefinitionReportGenerator generator = new StepDefinitionReportGenerator(projectFile, binFolder, true); - -generator.GenerateReport(); - -generator.TransformReport( -Path.GetFullPath(outputFile)); - -} - -[ -Action("Formats an NUnit execution report to SpecFlow style")] - -public static void NUnitExecutionReport( - -[ -Required(Description = "Visual Studio Project File containing specs")] string projectFile, - -[ -Optional("TestResult.xml", Description = "Xml Test Result file generated by NUnit. Defaults to TestResult.xml")] string xmlTestResult, - -[ -Optional("TestResult.txt", "testOutput")] string labeledTestOutput, - -[ -Optional("TestResult.html", "out", Description = "Generated Output File. Defaults to TestResult.html")] string outputFile - -) - -{ - -NUnitExecutionReportGenerator generator = new NUnitExecutionReportGenerator( - -projectFile, - -Path.GetFullPath(xmlTestResult), - -Path.GetFullPath(labeledTestOutput)); - -generator.GenerateReport(); - -generator.TransformReport( -Path.GetFullPath(outputFile)); - -} - -#endregion - -} - + internal class Program + { + private static void Main(string[] args) + { + Consolery.Run(typeof(Program), args); + return; + } + + [Action("Generate tests from all feature files in a project")] + public static void GenerateAll( + [Required(Description = "Visual Studio Project File containing features")] string projectFile, + [Optional(false, "force", "f")] bool forceGeneration, + [Optional(false, "verbose", "v")] bool verboseOutput) + { + SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(projectFile); + var batchGenerator = new BatchGenerator(Console.Out, verboseOutput); + batchGenerator.ProcessProject(specFlowProject, forceGeneration); + } + + #region Reports + + [Action("Generates a report about usage and binding of steps")] + public static void StepDefinitionReport( + [Required(Description = "Visual Studio Project File containing specs")] string projectFile, + [Optional("bin\\Debug", Description = @"Path for Spec dll e.g. Company.Specs.dll. Defaults to bin\Debug ")] string binFolder, + [Optional("StepDefinitionReport.html", "out", Description = "Generated Output File. Defaults to StepDefinitionReport.html")] string outputFile) + { + var generator = new StepDefinitionReportGenerator(projectFile, binFolder, true); + generator.GenerateReport(); + generator.TransformReport(Path.GetFullPath(outputFile)); + } + + [Action("Formats an NUnit execution report to SpecFlow style")] + public static void NUnitExecutionReport([Required(Description = "Visual Studio Project File containing specs")] string projectFile, + [Optional("TestResult.xml", Description = "Xml Test Result file generated by NUnit. Defaults to TestResult.xml")] string xmlTestResult, + [Optional("TestResult.txt", "testOutput")] string labeledTestOutput, + [Optional("TestResult.html", "out", Description = "Generated Output File. Defaults to TestResult.html")] string outputFile) + { + var generator = new NUnitExecutionReportGenerator(projectFile, Path.GetFullPath(xmlTestResult), + Path.GetFullPath(labeledTestOutput)); + + generator.GenerateReport(); + generator.TransformReport(Path.GetFullPath(outputFile)); + } + + #endregion + } } \ No newline at end of file From 064154647b944288a317118f74edb8bc4344f5d0 Mon Sep 17 00:00:00 2001 From: Simon Whittemore Date: Thu, 29 Apr 2010 18:38:43 +0100 Subject: [PATCH 3/3] Fixing cross browser compatability issues on the stepdefinition report --- Reporting/Common/Common.xslt | 11 ++++++----- .../StepDefinitionReport/StepDefinitionReport.xslt | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Reporting/Common/Common.xslt b/Reporting/Common/Common.xslt index 94aebda2f..cd7323fde 100644 --- a/Reporting/Common/Common.xslt +++ b/Reporting/Common/Common.xslt @@ -201,17 +201,18 @@ ]"; - [ + [ ]