Skip to content

Commit

Permalink
Merge remote branch 'smwhit/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jbandi committed Apr 29, 2010
2 parents f0af490 + 0641546 commit 13c936d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 26 deletions.
11 changes: 6 additions & 5 deletions Reporting/Common/Common.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,18 @@
<xsl:with-param name="text-key" select="'Hide'" />
</xsl:call-template>]";
<![CDATA[
function toggle(sdid){
e=window.event.srcElement;
function toggle(sdid, event){
var link = event.target || event.srcElement;
toToggle=document.getElementById(sdid);
if (e.innerText==showButtonText)
if (link.innerHTML==showButtonText)
{
e.innerText=hideButtonText;
link.innerHTML=hideButtonText;
toToggle.style.display="block";
}
else
{
e.innerText=showButtonText;
link.innerHTML=showButtonText;
toToggle.style.display="none";
}
}
Expand Down
2 changes: 1 addition & 1 deletion Reporting/StepDefinitionReport/StepDefinitionReport.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<xsl:value-of select="count(./sfr:Instances/sfr:Instance)"/>
<xsl:if test="sfr:Instances">
<xsl:text> </xsl:text>
<a href="#" onclick="toggle('{$stepdef-id}'); return false;" class="button">[<xsl:call-template name="get-common-tool-text">
<a href="#" onclick="toggle('{$stepdef-id}', event); return false;" class="button">[<xsl:call-template name="get-common-tool-text">
<xsl:with-param name="text-key" select="'Show'" />
</xsl:call-template>]</a>
</xsl:if>
Expand Down
34 changes: 14 additions & 20 deletions Tools/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,47 @@

namespace TechTalk.SpecFlow.Tools
{
class Program
internal class Program
{
static void Main(string[] args)
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] string projectFile,
[Required(Description = "Visual Studio Project File containing features")] string projectFile,
[Optional(false, "force", "f")] bool forceGeneration,
[Optional(false, "verbose", "v")] bool verboseOutput
)
[Optional(false, "verbose", "v")] bool verboseOutput)
{
SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(projectFile);

BatchGenerator batchGenerator = new BatchGenerator(Console.Out, verboseOutput);
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] string projectFile,
[Optional("bin\\Debug")] string binFolder,
[Optional("StepDefinitionReport.html", "out")] string outputFile
)
[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);
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] string projectFile,
[Optional("TestResult.xml")] string xmlTestResult,
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")] string outputFile
)
[Optional("TestResult.html", "out", Description = "Generated Output File. Defaults to TestResult.html")] string outputFile)
{
NUnitExecutionReportGenerator generator = new NUnitExecutionReportGenerator(
projectFile,
Path.GetFullPath(xmlTestResult),
var generator = new NUnitExecutionReportGenerator(projectFile, Path.GetFullPath(xmlTestResult),
Path.GetFullPath(labeledTestOutput));

generator.GenerateReport();
generator.TransformReport(Path.GetFullPath(outputFile));
}
Expand Down

0 comments on commit 13c936d

Please sign in to comment.