Skip to content

Commit

Permalink
Add a MsTest-Result
Browse files Browse the repository at this point in the history
  • Loading branch information
jbandi committed Jun 29, 2010
1 parent a98ad8c commit 01e8146
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
159 changes: 159 additions & 0 deletions Tests/ReportingTest.SampleProject/MsTestResult/TestResult.trx
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
</None>
<None Include="FeatureWithSuccessfulScenarios.feature">
</None>
<None Include="MsTestResult\TestResult.trx" />
<None Include="NUnitResult\generate.cmd" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 01e8146

Please sign in to comment.