Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into MonoIntegration

Conflicts:
	Parser/TechTalk.SpecFlow.Parser.csproj
	Tests/ParserTests/ParserTests.csproj
	Tests/ReportingTest.SampleProject/ReportingTest.SampleProject.csproj
	Tools/TechTalk.SpecFlow.Tools.csproj
  • Loading branch information...
commit da7abf1d27887d4548be926ea60ad5ecb584f9a3 2 parents 8aad449 + 442b4bc
@gasparnagy gasparnagy authored
Showing with 550 additions and 104 deletions.
  1. BIN  Documentation/SpecFlow Guide.docx
  2. +1 −1  Generator/TechTalk.SpecFlow.Generator.csproj
  3. +1 −1  Installer/ImportGherkinParser/ImportGherkinParser.csproj
  4. +2 −2 Installer/SpecFlowInstaller/Product.wxs
  5. +3 −3 Installer/SpecFlowInstaller/SpecFlowInstaller.wixproj
  6. +2 −2 Parser/TechTalk.SpecFlow.Parser.csproj
  7. +1 −1  Reporting/NUnitExecutionReport/NUnitExecutionReportParameters.cs
  8. +1 −1  Reporting/TechTalk.SpecFlow.Reporting.csproj
  9. +0 −12 Runtime.Silverlight/Properties/AssemblyInfo.cs
  10. +18 −3 Runtime.Silverlight/TechTalk.SpecFlow.Silverlight.csproj
  11. +1 −1  Runtime/TechTalk.SpecFlow.csproj
  12. +12 −11 TechTalk.SpecFlow.sln
  13. +1 −1  Tests/FeatureTests/ExternalSteps/ExternalStepsCS/ExternalStepsCS.csproj
  14. +6 −39 Tests/FeatureTests/FeatureTests.csproj
  15. +2 −2 Tests/ParserTests/ParserTests.csproj
  16. +159 −0 Tests/ReportingTest.SampleProject/MsTestResult/TestResult.trx
  17. +3 −2 Tests/ReportingTest.SampleProject/ReportingTest.SampleProject.csproj
  18. +79 −0 Tests/ReportingTests/NUnitExecutionReport.feature
  19. +190 −0 Tests/ReportingTests/NUnitExecutionReport.feature.cs
  20. +10 −1 Tests/ReportingTests/ReportingTests.csproj
  21. +43 −3 Tests/ReportingTests/StepDefinitions/StepDefinitions.cs
  22. +1 −1  Tests/RuntimeTests/RuntimeTests.csproj
  23. +2 −2 Tools/TechTalk.SpecFlow.Tools.csproj
  24. +2 −2 VersionInfo.cs
  25. +8 −12 VsIntegration/TechTalk.SpecFlow.VsIntegration.csproj
  26. +2 −1  changelog.txt
View
BIN  Documentation/SpecFlow Guide.docx
Binary file not shown
View
2  Generator/TechTalk.SpecFlow.Generator.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
2  Installer/ImportGherkinParser/ImportGherkinParser.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
4 Installer/SpecFlowInstaller/Product.wxs
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?define ProductShortName = "SpecFlow" ?>
-<?define ProductVersion = "1.3.1" ?>
-<?define ProductVersionText = "1.3.1" ?>
+<?define ProductVersion = "1.3.2" ?>
+<?define ProductVersionText = "1.3.2" ?>
<?define ProductUrl = "http://www.specflow.org" ?>
<?define Manufacturer = "TechTalk" ?>
<?define UpgradeCode = "A72428B6-8ADB-4EDF-BC23-4BE4E19F01A0" ?>
View
6 Installer/SpecFlowInstaller/SpecFlowInstaller.wixproj
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -7,8 +7,8 @@
<SchemaVersion>2.0</SchemaVersion>
<OutputName>SpecFlowSetup</OutputName>
<OutputType>Package</OutputType>
- <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.5\Wix.targets</WixTargetsPath>
- <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.5\Wix.targets</WixTargetsPath>
+ <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.5\Wix2010.targets</WixTargetsPath>
+ <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.5\Wix2010.targets</WixTargetsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
View
4 Parser/TechTalk.SpecFlow.Parser.csproj
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
2  Reporting/NUnitExecutionReport/NUnitExecutionReportParameters.cs
@@ -11,7 +11,7 @@ public NUnitExecutionReportParameters(string projectFile, string xmlTestResult,
: base(projectFile, outputFile, xsltFile)
{
this.XmlTestResult = Path.GetFullPath(xmlTestResult);
- this.LabelledTestOutput = Path.GetFullPath(labelledTestOutput);
+ this.LabelledTestOutput = string.IsNullOrEmpty(labelledTestOutput) ? "" : Path.GetFullPath(labelledTestOutput);
}
}
}
View
2  Reporting/TechTalk.SpecFlow.Reporting.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
12 Runtime.Silverlight/Properties/AssemblyInfo.cs
@@ -21,15 +21,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("04dec58a-9677-4f58-ae8b-4744bbffb9a9")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
View
21 Runtime.Silverlight/TechTalk.SpecFlow.Silverlight.csproj
@@ -1,4 +1,8 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,10 +14,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TechTalk.SpecFlow</RootNamespace>
<AssemblyName>TechTalk.SpecFlow.Silverlight</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -169,15 +175,24 @@
<Compile Include="..\Runtime\UnitTestProvider\MbUnitRuntimeProvider.cs">
<Link>UnitTestProvider\MbUnitRuntimeProvider.cs</Link>
</Compile>
+ <Compile Include="..\Runtime\UnitTestProvider\MsTest2010RuntimeProvider.cs">
+ <Link>UnitTestProvider\MsTest2010RuntimeProvider.cs</Link>
+ </Compile>
<Compile Include="..\Runtime\UnitTestProvider\MsTestRuntimeProvider.cs">
<Link>UnitTestProvider\MsTestRuntimeProvider.cs</Link>
</Compile>
<Compile Include="..\Runtime\UnitTestProvider\NUnitRuntimeProvider.cs">
<Link>UnitTestProvider\NUnitRuntimeProvider.cs</Link>
</Compile>
+ <Compile Include="..\Runtime\UnitTestProvider\UnitTestRuntimeProviderHelper.cs">
+ <Link>UnitTestProvider\UnitTestRuntimeProviderHelper.cs</Link>
+ </Compile>
<Compile Include="..\Runtime\UnitTestProvider\XUnitRuntimeProvider.cs">
<Link>UnitTestProvider\XUnitRuntimeProvider.cs</Link>
</Compile>
+ <Compile Include="..\VersionInfo.cs">
+ <Link>VersionInfo.cs</Link>
+ </Compile>
<Compile Include="Compatibility\ConfigurationErrorsException.cs" />
<Compile Include="Compatibility\CultureInfoHelper.cs" />
<Compile Include="Compatibility\EnumHelper.cs" />
@@ -191,7 +206,7 @@
<Link>Languages.xml</Link>
</EmbeddedResource>
</ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
View
2  Runtime/TechTalk.SpecFlow.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
23 TechTalk.SpecFlow.sln
@@ -1,6 +1,6 @@

-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setup", "Setup", "{DCE0C3C4-5BC6-4A30-86BE-3FEFF4677A01}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A10B5CD6-38EC-4D7E-9D1C-2EBA8017E437}"
@@ -13,6 +13,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
VersionInfo.cs = VersionInfo.cs
EndProjectSection
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resources", "Resources", "{EF9D1EFD-574B-4A33-96CB-8885A6CEB227}"
+ ProjectSection(SolutionItems) = preProject
+ Installer\Resources\EULA.rtf = Installer\Resources\EULA.rtf
+ Installer\Resources\header.bmp = Installer\Resources\header.bmp
+ Installer\Resources\logo.png = Installer\Resources\logo.png
+ Installer\Resources\welcome_dialog.bmp = Installer\Resources\welcome_dialog.bmp
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TechTalk.SpecFlow.Reporting", "Reporting\TechTalk.SpecFlow.Reporting.csproj", "{FC43509F-E7D3-40C4-B4C3-1E6C9D5530A4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TechTalk.SpecFlow", "Runtime\TechTalk.SpecFlow.csproj", "{413EE28C-4F89-4C6F-BA1E-2CDEE4CD43B4}"
@@ -37,14 +45,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExternalStepsCS", "Tests\Fe
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SpecFlowInstaller", "Installer\SpecFlowInstaller\SpecFlowInstaller.wixproj", "{89167EB9-F458-48DA-9D8F-F639A74F5871}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resources", "Resources", "{EF9D1EFD-574B-4A33-96CB-8885A6CEB227}"
- ProjectSection(SolutionItems) = preProject
- Installer\Resources\EULA.rtf = Installer\Resources\EULA.rtf
- Installer\Resources\header.bmp = Installer\Resources\header.bmp
- Installer\Resources\logo.png = Installer\Resources\logo.png
- Installer\Resources\welcome_dialog.bmp = Installer\Resources\welcome_dialog.bmp
- EndProjectSection
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TechTalk.SpecFlow.Silverlight", "Runtime.Silverlight\TechTalk.SpecFlow.Silverlight.csproj", "{B93F95CF-BF89-4D92-BB0F-86885B9B6DCE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReportingTests", "Tests\ReportingTests\ReportingTests.csproj", "{1965463E-6972-4618-8E59-D3259AE7A125}"
@@ -144,6 +144,7 @@ Global
{0D3D2616-F53C-46A2-ADEB-273D140C1267}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D3D2616-F53C-46A2-ADEB-273D140C1267}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D3D2616-F53C-46A2-ADEB-273D140C1267}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {0D3D2616-F53C-46A2-ADEB-273D140C1267}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0D3D2616-F53C-46A2-ADEB-273D140C1267}.Debug|x86.ActiveCfg = Debug|Any CPU
{0D3D2616-F53C-46A2-ADEB-273D140C1267}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D3D2616-F53C-46A2-ADEB-273D140C1267}.Release|Any CPU.Build.0 = Release|Any CPU
@@ -214,9 +215,9 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
+ {EF9D1EFD-574B-4A33-96CB-8885A6CEB227} = {DCE0C3C4-5BC6-4A30-86BE-3FEFF4677A01}
{0D3D2616-F53C-46A2-ADEB-273D140C1267} = {DCE0C3C4-5BC6-4A30-86BE-3FEFF4677A01}
{89167EB9-F458-48DA-9D8F-F639A74F5871} = {DCE0C3C4-5BC6-4A30-86BE-3FEFF4677A01}
- {EF9D1EFD-574B-4A33-96CB-8885A6CEB227} = {DCE0C3C4-5BC6-4A30-86BE-3FEFF4677A01}
{70376361-0BE1-478D-8EEC-47BD1C768165} = {A10B5CD6-38EC-4D7E-9D1C-2EBA8017E437}
{F8FACCF0-5497-4C6B-861F-78D72FD9561B} = {A10B5CD6-38EC-4D7E-9D1C-2EBA8017E437}
{3FE793A8-E662-4026-B4EC-891324073235} = {A10B5CD6-38EC-4D7E-9D1C-2EBA8017E437}
View
2  Tests/FeatureTests/ExternalSteps/ExternalStepsCS/ExternalStepsCS.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
45 Tests/FeatureTests/FeatureTests.csproj
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -15,21 +15,6 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -49,6 +34,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="nunit.framework">
+ <HintPath>..\..\lib\nunit\nunit.framework.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -57,9 +45,6 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="nunit.framework, Version=2.5.1.9189, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <HintPath>..\..\lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
<Reference Include="Rhino.Mocks, Version=3.6.0.0, Culture=neutral, PublicKeyToken=0b3305902db7183f">
<HintPath>..\..\lib\mocking\Rhino.Mocks.dll</HintPath>
</Reference>
@@ -141,24 +126,6 @@
<LastGenOutput>StepArgumentTransformation.feature.cs</LastGenOutput>
</None>
</ItemGroup>
- <ItemGroup />
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -168,4 +135,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project>
+</Project>
View
4 Tests/ParserTests/ParserTests.csproj
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
159 Tests/ReportingTest.SampleProject/MsTestResult/TestResult.trx
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestRun id="41e38b3e-af2d-4033-89a0-ac829917dfb2" name="jba@TTV-JBA01 2010-06-29 21:54:46" runUser="TECHTALK\jba" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2006">
+ <TestRunConfiguration name="Local Test Run" id="41f9f48e-f00e-4f71-9725-3a3defc1fdab">
+ <Description>This is a default test run configuration for a local test run.</Description>
+ <Deployment runDeploymentRoot="C:\Users\jba\Dev\Code\SpecFlowExamples\MsTestConversion\ReportingTest.MSTestSampleProject\bin\Debug\TestResults\jba_TTV-JBA01 2010-06-29 21_54_46" />
+ <TestTypeSpecific />
+ </TestRunConfiguration>
+ <ResultSummary outcome="Failed">
+ <Counters total="4" executed="4" passed="2" error="0" failed="1" timeout="0" aborted="0" inconclusive="1" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
+ </ResultSummary>
+ <Times creation="2010-06-29T21:54:46.6249110+02:00" queuing="2010-06-29T21:54:47.0909376+02:00" start="2010-06-29T21:54:47.1619417+02:00" finish="2010-06-29T21:54:51.0051615+02:00" />
+ <TestDefinitions>
+ <UnitTest name="ScenarioWithPendingSteps" storage="c:\users\jba\dev\code\specflowexamples\mstestconversion\reportingtest.mstestsampleproject\bin\debug\reportingtest.mstestsampleproject.dll" id="e0c798ae-34fe-8aec-156d-98ed561da84b">
+ <Css projectStructure="" iteration="" />
+ <Execution timeOut="1800000" id="6c9f7dc0-04e5-4820-b965-35e67ab5b8dc" />
+ <Description>Scenario with pending steps</Description>
+ <Owners>
+ <Owner name="" />
+ </Owners>
+ <Properties>
+ <Property>
+ <Key>FeatureTitle</Key>
+ <Value>Feature with failing scenarios</Value>
+ </Property>
+ </Properties>
+ <TestMethod codeBase="C:/Users/jba/Dev/Code/SpecFlowExamples/MsTestConversion/ReportingTest.MSTestSampleProject/bin/Debug/ReportingTest.MSTestSampleProject.DLL" adapterTypeName="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter" className="ReportingTest.MSTestSampleProject.FeatureWithFailingScenariosFeature, ReportingTest.MSTestSampleProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="ScenarioWithPendingSteps" />
+ </UnitTest>
+ <UnitTest name="ScenarioWithFailingSteps" storage="c:\users\jba\dev\code\specflowexamples\mstestconversion\reportingtest.mstestsampleproject\bin\debug\reportingtest.mstestsampleproject.dll" id="c0017fff-ad3c-ee27-9915-b0075e4c5726">
+ <Css projectStructure="" iteration="" />
+ <Execution timeOut="1800000" id="78274073-6de8-4a1e-afca-a2d0440a217e" />
+ <Description>Scenario with failing steps</Description>
+ <Owners>
+ <Owner name="" />
+ </Owners>
+ <Properties>
+ <Property>
+ <Key>FeatureTitle</Key>
+ <Value>Feature with failing scenarios</Value>
+ </Property>
+ </Properties>
+ <TestMethod codeBase="C:/Users/jba/Dev/Code/SpecFlowExamples/MsTestConversion/ReportingTest.MSTestSampleProject/bin/Debug/ReportingTest.MSTestSampleProject.DLL" adapterTypeName="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter" className="ReportingTest.MSTestSampleProject.FeatureWithFailingScenariosFeature, ReportingTest.MSTestSampleProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="ScenarioWithFailingSteps" />
+ </UnitTest>
+ <UnitTest name="FirstSuccessfulScenario" storage="c:\users\jba\dev\code\specflowexamples\mstestconversion\reportingtest.mstestsampleproject\bin\debug\reportingtest.mstestsampleproject.dll" id="a0fd4d68-04e2-9f71-f8b6-6402581d342f">
+ <Css projectStructure="" iteration="" />
+ <Execution timeOut="1800000" id="cd8e91a0-f07b-447d-a0f7-0a03c133f211" />
+ <Description>First successful scenario</Description>
+ <Owners>
+ <Owner name="" />
+ </Owners>
+ <Properties>
+ <Property>
+ <Key>FeatureTitle</Key>
+ <Value>Feature with successful scenarios</Value>
+ </Property>
+ </Properties>
+ <TestMethod codeBase="C:/Users/jba/Dev/Code/SpecFlowExamples/MsTestConversion/ReportingTest.MSTestSampleProject/bin/Debug/ReportingTest.MSTestSampleProject.DLL" adapterTypeName="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter" className="ReportingTest.MSTestSampleProject.FeatureWithSuccessfulScenariosFeature, ReportingTest.MSTestSampleProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="FirstSuccessfulScenario" />
+ </UnitTest>
+ <UnitTest name="SecondSuccessfulScenario" storage="c:\users\jba\dev\code\specflowexamples\mstestconversion\reportingtest.mstestsampleproject\bin\debug\reportingtest.mstestsampleproject.dll" id="da6f36f1-b914-e04b-8001-3b8d953d1da5">
+ <Css projectStructure="" iteration="" />
+ <Execution timeOut="1800000" id="5276080d-845a-4a08-aaca-eb2bb249af7e" />
+ <Description>Second successful scenario</Description>
+ <Owners>
+ <Owner name="" />
+ </Owners>
+ <Properties>
+ <Property>
+ <Key>FeatureTitle</Key>
+ <Value>Feature with successful scenarios</Value>
+ </Property>
+ </Properties>
+ <TestMethod codeBase="C:/Users/jba/Dev/Code/SpecFlowExamples/MsTestConversion/ReportingTest.MSTestSampleProject/bin/Debug/ReportingTest.MSTestSampleProject.DLL" adapterTypeName="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter" className="ReportingTest.MSTestSampleProject.FeatureWithSuccessfulScenariosFeature, ReportingTest.MSTestSampleProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="SecondSuccessfulScenario" />
+ </UnitTest>
+ </TestDefinitions>
+ <TestLists>
+ <TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
+ <TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
+ </TestLists>
+ <TestEntries>
+ <TestEntry testId="c0017fff-ad3c-ee27-9915-b0075e4c5726" executionId="78274073-6de8-4a1e-afca-a2d0440a217e" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
+ <TestEntry testId="e0c798ae-34fe-8aec-156d-98ed561da84b" executionId="6c9f7dc0-04e5-4820-b965-35e67ab5b8dc" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
+ <TestEntry testId="a0fd4d68-04e2-9f71-f8b6-6402581d342f" executionId="cd8e91a0-f07b-447d-a0f7-0a03c133f211" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
+ <TestEntry testId="da6f36f1-b914-e04b-8001-3b8d953d1da5" executionId="5276080d-845a-4a08-aaca-eb2bb249af7e" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
+ </TestEntries>
+ <Results>
+ <UnitTestResult executionId="78274073-6de8-4a1e-afca-a2d0440a217e" testId="c0017fff-ad3c-ee27-9915-b0075e4c5726" testName="ScenarioWithFailingSteps" computerName="TTV-JBA01" duration="00:00:00.1022075" startTime="2010-06-29T21:54:47.1969437+02:00" endTime="2010-06-29T21:54:47.5349630+02:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Failed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d">
+ <Output>
+ <StdOut>Given I have a precondition that is failing
+-&gt; error: Assert.Fail failed. simulated failure</StdOut>
+ <ErrorInfo>
+ <Message>Assert.Fail failed. simulated failure</Message>
+ <StackTrace> at ReportingTest.SampleProject.StepDefinitions.GivenIHaveAPreconditionThatIs(String result) in C:\Users\jba\Dev\Code\SpecFlowExamples\MsTestConversion\ReportingTest.MSTestSampleProject\StepDefinitions.cs:line 24
+ at lambda_method(ExecutionScope , String )
+ at TechTalk.SpecFlow.Bindings.MethodBinding.InvokeAction(Object[] arguments, ITestTracer testTracer, TimeSpan&amp; duration)
+ at TechTalk.SpecFlow.TestRunner.ExecuteStepMatch(BindingMatch match, Object[] arguments)
+ at TechTalk.SpecFlow.TestRunner.ExecuteStep(StepArgs stepArgs)
+ at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
+ at ReportingTest.MSTestSampleProject.FeatureWithFailingScenariosFeature.ScenarioWithFailingSteps() in c:\Users\jba\Dev\Code\SpecFlowExamples\MsTestConversion\ReportingTest.MSTestSampleProject\FeatureWithFailingScenarios.feature:line 14
+</StackTrace>
+ </ErrorInfo>
+ </Output>
+ </UnitTestResult>
+ <UnitTestResult executionId="6c9f7dc0-04e5-4820-b965-35e67ab5b8dc" testId="e0c798ae-34fe-8aec-156d-98ed561da84b" testName="ScenarioWithPendingSteps" computerName="TTV-JBA01" duration="00:00:03.4117534" startTime="2010-06-29T21:54:47.5419634+02:00" endTime="2010-06-29T21:54:50.9541586+02:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Inconclusive" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d">
+ <Output>
+ <StdOut>Given I have a pending precondition
+-&gt; No matching step definition found for the step. Use the following code to create one:
+ [Binding]
+ public class StepDefinitions
+ {
+ [Given(@"I have a pending precondition")]
+ public void GivenIHaveAPendingPrecondition()
+ {
+ ScenarioContext.Current.Pending();
+ }
+ }</StdOut>
+ <ErrorInfo>
+ <Message>Assert.Inconclusive failed. No matching step definition found for one or more steps.
+[Binding]
+public class StepDefinitions
+{
+ [Given(@"I have a pending precondition")]
+ public void GivenIHaveAPendingPrecondition()
+ {
+ ScenarioContext.Current.Pending();
+ }
+}
+</Message>
+ <StackTrace> at lambda_method(ExecutionScope , String )
+ at TechTalk.SpecFlow.UnitTestProvider.MsTestRuntimeProvider.TestInconclusive(String message)
+ at TechTalk.SpecFlow.ErrorHandling.ErrorProvider.ThrowPendingError(TestStatus testStatus, String message)
+ at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
+ at ReportingTest.MSTestSampleProject.FeatureWithFailingScenariosFeature.ScenarioWithPendingSteps() in c:\Users\jba\Dev\Code\SpecFlowExamples\MsTestConversion\ReportingTest.MSTestSampleProject\FeatureWithFailingScenarios.feature:line 11
+</StackTrace>
+ </ErrorInfo>
+ </Output>
+ </UnitTestResult>
+ <UnitTestResult executionId="cd8e91a0-f07b-447d-a0f7-0a03c133f211" testId="a0fd4d68-04e2-9f71-f8b6-6402581d342f" testName="FirstSuccessfulScenario" computerName="TTV-JBA01" duration="00:00:00.0071058" startTime="2010-06-29T21:54:50.9561587+02:00" endTime="2010-06-29T21:54:50.9651592+02:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d">
+ <Output>
+ <StdOut>Given I have a precondition that is successful
+-&gt; done: StepDefinitions.GivenIHaveAPreconditionThatIs("successful") (0,0s)
+When I do something that works
+-&gt; done: StepDefinitions.GivenIHaveAPreconditionThatIs("works") (0,0s)
+Then I have a postcondition that is successful
+-&gt; done: StepDefinitions.GivenIHaveAPreconditionThatIs("successful") (0,0s)</StdOut>
+ </Output>
+ </UnitTestResult>
+ <UnitTestResult executionId="5276080d-845a-4a08-aaca-eb2bb249af7e" testId="da6f36f1-b914-e04b-8001-3b8d953d1da5" testName="SecondSuccessfulScenario" computerName="TTV-JBA01" duration="00:00:00.0039226" startTime="2010-06-29T21:54:50.9671594+02:00" endTime="2010-06-29T21:54:50.9711596+02:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d">
+ <Output>
+ <StdOut>Given I have a precondition that is successful
+-&gt; done: StepDefinitions.GivenIHaveAPreconditionThatIs("successful") (0,0s)
+And I have a precondition that is successful
+-&gt; done: StepDefinitions.GivenIHaveAPreconditionThatIs("successful") (0,0s)
+When I do something that works
+-&gt; done: StepDefinitions.GivenIHaveAPreconditionThatIs("works") (0,0s)
+Then I have a postcondition that is successful
+-&gt; done: StepDefinitions.GivenIHaveAPreconditionThatIs("successful") (0,0s)</StdOut>
+ </Output>
+ </UnitTestResult>
+ </Results>
+</TestRun>
View
5 Tests/ReportingTest.SampleProject/ReportingTest.SampleProject.csproj
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -66,6 +66,7 @@
</None>
<None Include="FeatureWithSuccessfulScenarios.feature">
</None>
+ <None Include="MsTestResult\TestResult.trx" />
<None Include="NUnitResult\generate.cmd" />
<None Include="NUnitResult\generate" />
</ItemGroup>
View
79 Tests/ReportingTests/NUnitExecutionReport.feature
@@ -0,0 +1,79 @@
+Feature: Generating HTML report from NUnit execution result
+ In order to present the test results in a nice form
+ As a test manager
+ I want to be able to generate an HTML report from the NUnit execution result
+
+Scenario: Summary is included in the HTML result
+ Given there are NUuit test execution results for the ReportingTest.SampleProject project
+ When I generate SpecFlow NUnit execution report
+ Then a report generated containing
+ """
+ Summary
+ Features Success rate Scenarios Success Failed Pending Ignored
+ 2 features 40% 5 2 1 1 1
+ """
+
+
+Scenario: Feature summary is included in the HTML result
+ Given there are NUuit test execution results for the ReportingTest.SampleProject project
+ When I generate SpecFlow NUnit execution report
+ Then a report generated containing
+ """
+ Feature Summary
+ Feature Success rate Scenarios Success Failed Pending Ignored
+ Feature with failing scenarios 0% 3 0 1 1 1
+ Feature with successful scenarios 100% 2 2 0 0 0
+ """
+
+
+Scenario: Successful test output is included in the HTML result
+ Given there are NUuit test execution results for the ReportingTest.SampleProject project
+ When I generate SpecFlow NUnit execution report
+ Then a report generated containing
+ """
+ Given I have a precondition that is successful
+ -> done: StepDefinitions.GivenIHaveAPreconditionThatIs("successful") (0,0s)
+ When I do something that works
+ -> done: StepDefinitions.GivenIHaveAPreconditionThatIs("works") (0,0s)
+ Then I have a postcondition that is successful
+ -> done: StepDefinitions.GivenIHaveAPreconditionThatIs("successful") (0,0s)
+ """
+
+
+Scenario: Pending test output is included in the HTML result
+ Given there are NUuit test execution results for the ReportingTest.SampleProject project
+ When I generate SpecFlow NUnit execution report
+ Then a report generated containing
+ """
+ Given I have a pending precondition
+ -> No matching step definition found for the step. Use the following code to create one:
+ [Binding]
+ public class StepDefinitions
+ {
+ [Given(@"I have a pending precondition")]
+ public void GivenIHaveAPendingPrecondition()
+ {
+ ScenarioContext.Current.Pending();
+ }
+ }
+ """
+
+
+Scenario: Failing test output is included in the HTML result
+ Given there are NUuit test execution results for the ReportingTest.SampleProject project
+ When I generate SpecFlow NUnit execution report
+ Then a report generated containing
+ """
+ Given I have a precondition that is failing
+ -> error: simulated failure
+ """
+
+
+Scenario: Failing test exception is included in the HTML result
+ Given there are NUuit test execution results for the ReportingTest.SampleProject project
+ When I generate SpecFlow NUnit execution report
+ Then a report generated containing
+ """
+simulated failure
+at ReportingTest.SampleProject.StepDefinitions.GivenIHaveAPreconditionThatIs(String result) in
+ """
View
190 Tests/ReportingTests/NUnitExecutionReport.feature.cs
@@ -0,0 +1,190 @@
+// ------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by SpecFlow (http://www.specflow.org/).
+// SpecFlow Version:1.3.2.0
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+// ------------------------------------------------------------------------------
+#region Designer generated code
+namespace ReportingTests
+{
+ using TechTalk.SpecFlow;
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [NUnit.Framework.TestFixtureAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Generating HTML report from NUnit execution result")]
+ public partial class GeneratingHTMLReportFromNUnitExecutionResultFeature
+ {
+
+ private static TechTalk.SpecFlow.ITestRunner testRunner;
+
+#line 1 "NUnitExecutionReport.feature"
+#line hidden
+
+ [NUnit.Framework.TestFixtureSetUpAttribute()]
+ public virtual void FeatureSetup()
+ {
+ testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
+ TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Generating HTML report from NUnit execution result", "In order to present the test results in a nice form\r\nAs a test manager\r\nI want to" +
+ " be able to generate an HTML report from the NUnit execution result", ((string[])(null)));
+ testRunner.OnFeatureStart(featureInfo);
+ }
+
+ [NUnit.Framework.TestFixtureTearDownAttribute()]
+ public virtual void FeatureTearDown()
+ {
+ testRunner.OnFeatureEnd();
+ testRunner = null;
+ }
+
+ public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
+ {
+ testRunner.OnScenarioStart(scenarioInfo);
+ }
+
+ [NUnit.Framework.TearDownAttribute()]
+ public virtual void ScenarioTearDown()
+ {
+ testRunner.OnScenarioEnd();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Summary is included in the HTML result")]
+ public virtual void SummaryIsIncludedInTheHTMLResult()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Summary is included in the HTML result", ((string[])(null)));
+#line 6
+this.ScenarioSetup(scenarioInfo);
+#line 7
+testRunner.Given("there are NUuit test execution results for the ReportingTest.SampleProject projec" +
+ "t");
+#line 8
+testRunner.When("I generate SpecFlow NUnit execution report");
+#line hidden
+#line 9
+testRunner.Then("a report generated containing", "\tSummary \r\n\tFeatures\tSuccess rate\tScenarios\tSuccess\t\tFailed\tPending\t\tIgnored \r\n\t2" +
+ " features\t40%\t\t\t\t5\t\t\t2\t\t\t1\t\t1\t\t\t1 ", ((TechTalk.SpecFlow.Table)(null)));
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Feature summary is included in the HTML result")]
+ public virtual void FeatureSummaryIsIncludedInTheHTMLResult()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Feature summary is included in the HTML result", ((string[])(null)));
+#line 17
+this.ScenarioSetup(scenarioInfo);
+#line 18
+testRunner.Given("there are NUuit test execution results for the ReportingTest.SampleProject projec" +
+ "t");
+#line 19
+testRunner.When("I generate SpecFlow NUnit execution report");
+#line hidden
+#line 20
+testRunner.Then("a report generated containing", "\tFeature Summary\r\n\tFeature\t\t\t\t\t\t\t\tSuccess rate\tScenarios\tSuccess\t\tFailed\tPending\t" +
+ "\tIgnored\t\t\r\n\tFeature with failing scenarios\t\t0%\t\t\t\t3\t\t\t0\t\t\t1\t\t1\t\t\t1\r\n\tFeature wi" +
+ "th successful scenarios\t100%\t\t\t2\t\t\t2\t\t\t0\t\t0\t\t\t0", ((TechTalk.SpecFlow.Table)(null)));
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Successful test output is included in the HTML result")]
+ public virtual void SuccessfulTestOutputIsIncludedInTheHTMLResult()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Successful test output is included in the HTML result", ((string[])(null)));
+#line 29
+this.ScenarioSetup(scenarioInfo);
+#line 30
+testRunner.Given("there are NUuit test execution results for the ReportingTest.SampleProject projec" +
+ "t");
+#line 31
+testRunner.When("I generate SpecFlow NUnit execution report");
+#line hidden
+#line 32
+testRunner.Then("a report generated containing", @" Given I have a precondition that is successful
+ -> done: StepDefinitions.GivenIHaveAPreconditionThatIs(""successful"") (0,0s)
+ When I do something that works
+ -> done: StepDefinitions.GivenIHaveAPreconditionThatIs(""works"") (0,0s)
+ Then I have a postcondition that is successful
+ -> done: StepDefinitions.GivenIHaveAPreconditionThatIs(""successful"") (0,0s)", ((TechTalk.SpecFlow.Table)(null)));
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Pending test output is included in the HTML result")]
+ public virtual void PendingTestOutputIsIncludedInTheHTMLResult()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Pending test output is included in the HTML result", ((string[])(null)));
+#line 43
+this.ScenarioSetup(scenarioInfo);
+#line 44
+testRunner.Given("there are NUuit test execution results for the ReportingTest.SampleProject projec" +
+ "t");
+#line 45
+testRunner.When("I generate SpecFlow NUnit execution report");
+#line hidden
+#line 46
+testRunner.Then("a report generated containing", @" Given I have a pending precondition
+ -> No matching step definition found for the step. Use the following code to create one:
+ [Binding]
+ public class StepDefinitions
+ {
+ [Given(@""I have a pending precondition"")]
+ public void GivenIHaveAPendingPrecondition()
+ {
+ ScenarioContext.Current.Pending();
+ }
+ }", ((TechTalk.SpecFlow.Table)(null)));
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Failing test output is included in the HTML result")]
+ public virtual void FailingTestOutputIsIncludedInTheHTMLResult()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing test output is included in the HTML result", ((string[])(null)));
+#line 62
+this.ScenarioSetup(scenarioInfo);
+#line 63
+testRunner.Given("there are NUuit test execution results for the ReportingTest.SampleProject projec" +
+ "t");
+#line 64
+testRunner.When("I generate SpecFlow NUnit execution report");
+#line hidden
+#line 65
+testRunner.Then("a report generated containing", "\tGiven I have a precondition that is failing\r\n\t-> error: simulated failure", ((TechTalk.SpecFlow.Table)(null)));
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Failing test exception is included in the HTML result")]
+ public virtual void FailingTestExceptionIsIncludedInTheHTMLResult()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Failing test exception is included in the HTML result", ((string[])(null)));
+#line 72
+this.ScenarioSetup(scenarioInfo);
+#line 73
+testRunner.Given("there are NUuit test execution results for the ReportingTest.SampleProject projec" +
+ "t");
+#line 74
+testRunner.When("I generate SpecFlow NUnit execution report");
+#line hidden
+#line 75
+testRunner.Then("a report generated containing", "simulated failure\r\nat ReportingTest.SampleProject.StepDefinitions.GivenIHaveAPrec" +
+ "onditionThatIs(String result) in ", ((TechTalk.SpecFlow.Table)(null)));
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+ }
+}
+#endregion
View
11 Tests/ReportingTests/ReportingTests.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -54,6 +54,11 @@
<DesignTime>True</DesignTime>
<DependentUpon>CustomXsltTemplate.feature</DependentUpon>
</Compile>
+ <Compile Include="NUnitExecutionReport.feature.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>NUnitExecutionReport.feature</DependentUpon>
+ </Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StepDefinitions\Setup.cs" />
<Compile Include="StepDefinitions\StepDefinitions.cs" />
@@ -81,6 +86,10 @@
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>CustomXsltTemplate.feature.cs</LastGenOutput>
</None>
+ <None Include="NUnitExecutionReport.feature">
+ <Generator>SpecFlowSingleFileGenerator</Generator>
+ <LastGenOutput>NUnitExecutionReport.feature.cs</LastGenOutput>
+ </None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
View
46 Tests/ReportingTests/StepDefinitions/StepDefinitions.cs
@@ -39,8 +39,8 @@ public void GivenThereIsAnXSLTTemplateContaining(string templateFileName, string
GenerateCustomXslt(xsltContent, templateFileName);
}
- [When(@"I generate SpecFlow NUnit execution report with the custom XSLT")]
- public void WhenIGenerateSpecFlowNUnitExecutionReportWithTheCustomXSLT()
+ [When(@"I generate SpecFlow NUnit execution report( with the custom XSLT)?")]
+ public void WhenIGenerateSpecFlowNUnitExecutionReportWithTheCustomXSLT(string withCustomXslt)
{
SpecFlowTool.NUnitExecutionReport(
sampleProjectInfo.ProjectFilePath,
@@ -60,9 +60,28 @@ public void ThenAReportGeneratedLike(string expectedResultContent)
AssertEqualIgnoringWhitespace(expectedResultContent, resultContent);
}
+ [Then(@"a report generated containing")]
+ public void ThenAReportGeneratedContaining(string expectedResultContent)
+ {
+ Assert.IsTrue(File.Exists(sampleProjectInfo.OutputFilePath), "no result is generated");
+
+ string resultContent = sampleProjectInfo.GetOutputFileContent();
+
+ AssertContainsIgnoringWhitespace(expectedResultContent, resultContent);
+ }
+
private void AssertEqualIgnoringWhitespace(string expectedValue, string actualValue)
{
- StringAssert.AreEqualIgnoringCase(NormalizeWhitespace(expectedValue), NormalizeWhitespace(actualValue));
+ StringAssert.AreEqualIgnoringCase(
+ NormalizeWhitespace(CleanHtml(expectedValue)),
+ NormalizeWhitespace(CleanHtml(actualValue)));
+ }
+
+ private void AssertContainsIgnoringWhitespace(string expectedValue, string actualValue)
+ {
+ StringAssert.Contains(
+ NormalizeWhitespace(HtmlEncode(expectedValue)).ToLowerInvariant(),
+ NormalizeWhitespace(CleanHtml(actualValue)).ToLowerInvariant());
}
private string NormalizeWhitespace(string value)
@@ -71,6 +90,27 @@ private string NormalizeWhitespace(string value)
return whitespaceRe.Replace(value.Trim(), " ");
}
+ private string HtmlEncode(string value)
+ {
+ return value.Replace("<", "&lt;").Replace(">", "&gt;");
+ }
+
+ private string CleanHtml(string value)
+ {
+ var bodyRe = new Regex(@"\<\/?\s*body\s*\>");
+ var bodyMatch = bodyRe.Match(value);
+ if (bodyMatch.Success)
+ {
+ value = value.Substring(bodyMatch.Index + bodyMatch.Value.Length);
+ bodyMatch = bodyRe.Match(value);
+ if (bodyMatch.Success)
+ value = value.Substring(0, bodyMatch.Index);
+ }
+ var whitespaceRe = new Regex(@"\<.*?\>");
+ var result = whitespaceRe.Replace(value.Trim(), " ");
+ return result;
+ }
+
private string GenerateCustomXslt(string content, string templateFileName)
{
string xsltTemplate = @"<?xml version=""1.0"" encoding=""utf-8""?>
View
2  Tests/RuntimeTests/RuntimeTests.csproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
4 Tools/TechTalk.SpecFlow.Tools.csproj
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
View
4 VersionInfo.cs
@@ -2,5 +2,5 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-[assembly: AssemblyVersion("1.3.1.0")]
-[assembly: AssemblyFileVersion("1.3.1.0")]
+[assembly: AssemblyVersion("1.3.2.0")]
+[assembly: AssemblyFileVersion("1.3.2.0")]
View
20 VsIntegration/TechTalk.SpecFlow.VsIntegration.csproj
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -134,16 +135,14 @@
-->
<RegisterOutputPackage>true</RegisterOutputPackage>
<RegisterWithCodebase>true</RegisterWithCodebase>
+ <GeneratePkgDefFile>false</GeneratePkgDefFile>
+ <CopyVsixManifestToOutput>false</CopyVsixManifestToOutput>
+ <BypassVsixValidation>false</BypassVsixValidation>
+ <CreateVsixContainer>false</CreateVsixContainer>
+ <DeployExtension>false</DeployExtension>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\VSSDK\Microsoft.VsSDK.targets" />
- <PropertyGroup>
- <SettingUpDevenvDependsOn>$(SettingUpDevenvDependsOn);SkipDevenvSetup</SettingUpDevenvDependsOn>
- </PropertyGroup>
- <Target Name="SkipDevenvSetup">
- <Touch Files="$(DevenvSetupStateFile)" />
- </Target>
-
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -152,9 +151,6 @@
<ItemGroup>
<OutputZipFiles Include="$(ZipIntermediatePath)\*.zip" />
</ItemGroup>
-
<Copy SourceFiles="@(OutputZipFiles)" DestinationFolder="$(OutputPath)" />
- <!--<Warning Text="zip: $(ZipIntermediatePath)" />
- <Warning Text="zip: $(ZipProjectOutput)" />-->
</Target>
</Project>
View
3  changelog.txt
@@ -1,8 +1,9 @@
-1.3.2 - ???
+1.3.2 - 2010/06/29
New features:
+ Support for MsTest for .NET 4.0 categories. Configure the test provider name to
"MsTest.2010" in order to use the [TestCategory] attribute.
++ Silverlight support (beta), see http://wiki.github.com/techtalk/SpecFlow/silverlight-support
Fixed issues:
+ Report generation fails if no custom XSLT is provided
Please sign in to comment.
Something went wrong with that request. Please try again.