Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hi, I'm trying to do the same and I get a well formed NUnit xml output, and the discovery also goes well, but it doesn't show the test results. (All tests passed: http://i.imgur.com/3mDPzRL.png and 0 tests http://i.imgur.com/uAHdUyL.png) Also I have one test explicitly made to fail, but that also doesn't show up. It seems that TFS doesn't interp…
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results
name="c:\dev\pickles-results-harness\Pickles.TestHarness\Pickles.TestHarness.NUnit\bin\Debug\Pickles.TestHarness.NUnit.dll"
total="4" errors="0" failures="1" not-run="0" inconclusive="0" ignored="0" skipped="0" invalid="0" date="2012-01-14"
time="10:43:31">
<environment nunit-version="2.5.10.11092" clr-version="2.0.50727.5448"
os-version="Microsoft Windows NT 6.1.7601 Service Pack 1" platform="Win32NT" cwd="c:\dev\pickles-results-harness"
machine-name="BUMBLEBEE" user="camejef" user-domain="BUMBLEBEE" />
<culture-info current-culture="en-US" current-uiculture="en-US" />
<test-suite type="Assembly"
name="c:\dev\pickles-results-harness\Pickles.TestHarness\Pickles.TestHarness.NUnit\bin\Debug\Pickles.TestHarness.NUnit.dll"
executed="True" result="Failure" success="False" time="0.732" asserts="0">
<results>
<test-suite type="Namespace" name="Pickles" executed="True" result="Failure" success="False" time="0.725"
asserts="0">
<results>
<test-suite type="Namespace" name="TestHarness" executed="True" result="Failure" success="False" time="0.725"
asserts="0">
<results>
<test-suite type="TestFixture" name="AdditionFeature" description="Addition" executed="True"
result="Failure" success="False" time="0.724" asserts="0">
<results>
<test-suite type="ParameterizedTest" name="AddingSeveralNumbers" description="Adding several numbers"
executed="True" result="Success" success="True" time="0.157" asserts="0">
<categories>
<category name="tag2" />
</categories>
<results>
<test-case
name="Pickles.TestHarness.AdditionFeature.AddingSeveralNumbers(&quot;60&quot;,&quot;70&quot;,&quot;130&quot;,System.String[])"
executed="True" result="Success" success="True" time="0.137" asserts="1" />
<test-case
name="Pickles.TestHarness.AdditionFeature.AddingSeveralNumbers(&quot;40&quot;,&quot;50&quot;,&quot;90&quot;,System.String[])"
executed="True" result="Success" success="True" time="0.009" asserts="1" />
</results>
</test-suite>
<test-case name="Pickles.TestHarness.AdditionFeature.AddTwoNumbers" description="Add two numbers"
executed="True" result="Success" success="True" time="0.004" asserts="0">
<categories>
<category name="tag1" />
</categories>
</test-case>
<test-case name="Pickles.TestHarness.AdditionFeature.FailToAddTwoNumbers"
description="Fail to add two numbers" executed="True" result="Failure" success="False" time="0.028" asserts="0">
<categories>
<category name="tag1" />
</categories>
<failure>
<message><![CDATA[]]></message>
<stack-trace>
<![CDATA[at Pickles.TestHarness.xUnit.Steps.ThenTheResultShouldBePass(Int32 result) in C:\dev\pickles-results-harness\Pickles.TestHarness\Pickles.TestHarness.NUnit\Steps.cs:line 26
at lambda_method(Closure , IContextManager , Int32 )
at TechTalk.SpecFlow.Bindings.MethodBinding.InvokeAction(IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
at TechTalk.SpecFlow.Bindings.StepDefinitionBinding.Invoke(IContextManager contextManager, ITestTracer testTracer, Object[] arguments, TimeSpan& duration)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepArgs stepArgs)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()
at TechTalk.SpecFlow.TestRunner.CollectScenarioErrors()
at Pickles.TestHarness.AdditionFeature.ScenarioCleanup() in C:\dev\pickles-results-harness\Pickles.TestHarness\Pickles.TestHarness.NUnit\Addition.feature.cs:line 0
at Pickles.TestHarness.AdditionFeature.FailToAddTwoNumbers() in c:\dev\pickles-results-harness\Pickles.TestHarness\Pickles.TestHarness.NUnit\Addition.feature:line 18
]]>
</stack-trace>
</failure>
</test-case>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</test-results>
<?xml version="1.0" encoding="UTF-8"?>
<test-results name="Test results" date="2015-08-07" time="09:53:20" total="3" failures="1" not-run="0">
<test-suite name="xUnit.net Tests" success="False" time="0.237">
<results>
<test-suite name="Glnl.Tts.Services.Meta.Tests.dll" success="False" time="0.237">
<results>
<test-suite name="Test collection for Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests" success="False" time="0.176">
<results>
<test-case name="Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests.Failing__True" executed="True" success="False" time="0.0172558">
<failure>
<message>Assert.Equal() Failure
Expected: False
Actual: True</message>
<stack-trace>at Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests.Failing__True() in c:\Projects\TTS\Services\test\Meta\Glnl.Tts.Services.Meta.Tests\Controllers\UserControllerTests.cs:line 24</stack-trace>
</failure>
</test-case>
<test-case name="Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests.Get__UserName" executed="True" success="True" time="0.1586931" />
</results>
</test-suite>
<test-suite name="Test collection for Glnl.Tts.Services.Meta.Tests.Controllers.VersionControllerTests" success="True" time="0.084">
<results>
<test-case name="Glnl.Tts.Services.Meta.Tests.Controllers.VersionControllerTests.Get__Version" executed="True" success="True" time="0.0841688" />
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</test-results>
<?xml version="1.0" encoding="utf-8"?>
<assemblies>
<assembly name="Glnl.Tts.Services.Meta.Tests.dll" environment="32-bit .NET 4.0.30319.42000 [collection-per-class, parallel]" test-framework="xUnit.net 2.1.0.3029" run-date="2015-08-07" run-time="09:53:20" config-file="C:\Users\agro2\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe.config" total="3" passed="2" failed="1" skipped="0" time="0.237" errors="0">
<errors />
<collection total="2" passed="1" failed="1" skipped="0" name="Test collection for Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests" time="0.176">
<test name="Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests.Failing__True" type="Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests" method="Failing__True" time="0.0172558" result="Fail">
<failure exception-type="Xunit.Sdk.EqualException">
<message><![CDATA[Assert.Equal() Failure
Expected: False
Actual: True]]></message>
<stack-trace><![CDATA[ at Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests.Failing__True() in c:\Projects\TTS\Services\test\Meta\Glnl.Tts.Services.Meta.Tests\Controllers\UserControllerTests.cs:line 24]]></stack-trace>
</failure>
</test>
<test name="Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests.Get__UserName" type="Glnl.Tts.Services.Meta.Tests.Controllers.UserControllerTests" method="Get__UserName" time="0.1586931" result="Pass" />
</collection>
<collection total="1" passed="1" failed="0" skipped="0" name="Test collection for Glnl.Tts.Services.Meta.Tests.Controllers.VersionControllerTests" time="0.084">
<test name="Glnl.Tts.Services.Meta.Tests.Controllers.VersionControllerTests.Get__Version" type="Glnl.Tts.Services.Meta.Tests.Controllers.VersionControllerTests" method="Get__Version" time="0.0841688" result="Pass" />
</collection>
</assembly>
</assemblies>
@vriesmarcel

This comment has been minimized.

Copy link

vriesmarcel commented Aug 8, 2015

I looked at it and uploaded your transformed file using my build in my post (just by changing the publish task to take your file in stead of my file)
the results in the build show me this:
buildresultsnunit
and the test run details:
testrunnunit

so it looks like it does work. are you sure you are uploading the right file? and did you hit the refresh button on the test, since it sometimes shows stale data at the moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.