XML Report Processing not showing results

Hi,

I created a build feature using XML Report Processing, NUnit is specified as the Report Type. My tests are running(although they fail), The xml file is generated on the build agent, is found by TC and I can see in the following log messages that it is successfully parsed:

[11:01:04][NUnit report watcher] 1 report found for paths:
[11:01:04][NUnit report watcher] D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite\TestResult.xml
[11:01:04][NUnit report watcher] Successfully parsed
[11:01:04][Successfully parsed] 1 report
[11:01:04][Successfully parsed] Quality\Specflow.TestingSuite\TestResult.xml
 
But, I cannot see the results. Where are the results generated? I don't see a separate tab created for the test results in the build detail, it is not in the dynamic drop downs from where we can see build logs and parameters and artifacts. Where can I find it?
 
Any help will be awesome.
5 comments

Hello Syed,

The "Tests" tab should appear alongside with Overview, Changes, Parameters, etc.
Please try to enable Verbose output option in XML Report Processing build feature. Do any hints appear in the build log? 
If not, then please attach your TestResult.xml report. I'll try to reproduce the issue.

0

Hi Alina,

Tests tab is not getting created. The tests are actually run as a command line build step, the .cmd file that is run in this step uses NUnit Console Runner to run the tests. I see the following lines while the tests are run:

NUnit Console Runner 3.2.0
[15:24:40][Step 7/7] Copyright (C) 2016 Charlie Poole
[15:24:40][Step 7/7]
[15:24:40][Step 7/7] Runtime Environment
[15:24:40][Step 7/7] OS Version: Microsoft Windows NT 6.2.9200.0
[15:24:40][Step 7/7] CLR Version: 4.0.30319.42000
[15:24:40][Step 7/7]
[15:24:40][Step 7/7] Test Files
[15:24:40][Step 7/7] AureaAes.TestingSuite.Test\bin\Debug\AureaAes.TestingSuite.Test.dll
 
Then there are a bunch or errors related to these tests. And then:
 
Test Run Summary
[15:25:00][Step 7/7] Overall result: Failed
[15:25:00][Step 7/7] Test Count: 3, Passed: 0, Failed: 3, Inconclusive: 0, Skipped: 0
[15:25:00][Step 7/7] Failed Tests - Failures: 0, Errors: 3, Invalid: 0
[15:25:00][Step 7/7] Start time: 2016-04-03 15:24:41Z
[15:25:00][Step 7/7] End time: 2016-04-03 15:24:59Z
[15:25:00][Step 7/7] Duration: 18.367 seconds
[15:25:00][Step 7/7]
[15:25:00][Step 7/7] Results (nunit3) saved as TestResult.xml
 
And then the messages that the file got parsed. But I don't see the Tests tab. I haven't done any additional configuration for the report tabs, please let me know if I need to do something about that.

How can I provide you with the xml file?I don't see an option to upload files. SO I am posting the TestResult.xml in the following message in this thread.
0

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<test-run id="2" testcasecount="3" result="Failed" total="3" passed="0" failed="3" inconclusive="0" skipped="0" asserts="0" engine-version="3.2.0.0" clr-version="4.0.30319.42000" start-time="2016-04-03 15:56:14Z" end-time="2016-04-03 15:56:32Z" duration="18.375827">
<command-line><![CDATA[..\..\SharedBinaries\3rdParty\NUnit\nunit3-console.exe AureaAes.TestingSuite.Test\bin\Debug\AureaAes.TestingSuite.Test.dll]]></command-line>
<test-suite type="Assembly" id="0-1004" name="AureaAes.TestingSuite.Test.dll" fullname="D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite\AureaAes.TestingSuite.Test\bin\Debug\AureaAes.TestingSuite.Test.dll" runstate="Runnable" testcasecount="3" result="Failed" site="Child" start-time="2016-04-03 15:56:14Z" end-time="2016-04-03 15:56:32Z" duration="18.293303" total="3" passed="0" failed="3" inconclusive="0" skipped="0" asserts="0">
<environment framework-version="3.0.5813.39031" clr-version="4.0.30319.42000" os-version="Microsoft Windows NT 6.2.9200.0" platform="Win32NT" cwd="D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite" machine-name="WIN-B45ISV51GB9" user="Administrator" user-domain="WIN-B45ISV51GB9" culture="en-US" uiculture="en-US" os-architecture="x64" />
<settings>
<setting name="WorkDirectory" value="D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite" />
<setting name="ImageRuntimeVersion" value="4.0.30319" />
<setting name="ImageTargetFrameworkName" value=".NETFramework,Version=v4.5.2" />
<setting name="ImageRequiresX86" value="False" />
<setting name="ImageRequiresDefaultAppDomainAssemblyResolver" value="False" />
<setting name="NumberOfTestWorkers" value="2" />
</settings>
<properties>
<property name="_PID" value="548" />
<property name="_APPDOMAIN" value="test-domain-" />
</properties>
<failure>
<message><![CDATA[One or more child tests had errors]]></message>
</failure>
<test-suite type="TestSuite" id="0-1005" name="AureaAes" fullname="AureaAes" runstate="Runnable" testcasecount="3" result="Failed" site="Child" start-time="2016-04-03 15:56:14Z" end-time="2016-04-03 15:56:32Z" duration="18.282773" total="3" passed="0" failed="3" inconclusive="0" skipped="0" asserts="0">
<failure>
<message><![CDATA[One or more child tests had errors]]></message>
</failure>
<test-suite type="TestSuite" id="0-1006" name="TestingSuite" fullname="AureaAes.TestingSuite" runstate="Runnable" testcasecount="3" result="Failed" site="Child" start-time="2016-04-03 15:56:14Z" end-time="2016-04-03 15:56:32Z" duration="18.282644" total="3" passed="0" failed="3" inconclusive="0" skipped="0" asserts="0">
<failure>
<message><![CDATA[One or more child tests had errors]]></message>
</failure>
<test-suite type="TestSuite" id="0-1007" name="Test" fullname="AureaAes.TestingSuite.Test" runstate="Runnable" testcasecount="3" result="Failed" site="Child" start-time="2016-04-03 15:56:14Z" end-time="2016-04-03 15:56:32Z" duration="18.282632" total="3" passed="0" failed="3" inconclusive="0" skipped="0" asserts="0">
<failure>
<message><![CDATA[One or more child tests had errors]]></message>
</failure>
<test-suite type="TestSuite" id="0-1008" name="Features" fullname="AureaAes.TestingSuite.Test.Features" runstate="Runnable" testcasecount="3" result="Failed" site="Child" start-time="2016-04-03 15:56:14Z" end-time="2016-04-03 15:56:32Z" duration="18.282596" total="3" passed="0" failed="3" inconclusive="0" skipped="0" asserts="0">
<failure>
<message><![CDATA[One or more child tests had errors]]></message>
</failure>
<test-suite type="TestFixture" id="0-1000" name="Cis_Component_Feature" fullname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature" classname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature" runstate="Runnable" testcasecount="3" result="Failed" label="Error" site="SetUp" start-time="2016-04-03 15:56:14Z" end-time="2016-04-03 15:56:32Z" duration="18.277170" total="3" passed="0" failed="3" inconclusive="0" skipped="0" asserts="0">
<properties>
<property name="Description" value="Cis.Component_" />
</properties>
<failure>
<message><![CDATA[System.Data.Entity.Core.EntityException : The underlying provider failed on Open.
----> System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
----> System.ComponentModel.Win32Exception : No such host is known]]></message>
<stack-trace><![CDATA[ at AureaAes.TestingSuite.Model.Services.ClientService.GetAllClients() in D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite\AureaAes.TestingSuite.Model\Services\ClientService.cs:line 48
at AureaAes.TestingSuite.Test.Steps.BaseStepDefinitions.BeforeTestRun() in D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite\AureaAes.TestingSuite.Test\Steps\BaseStepDefinitions.cs:line 31
at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType bindingEvent)
at AureaAes.TestingSuite.Test.Features.Cis_Component_Feature.FeatureSetup() in D:\TCRepos\a8efeea5358cd7e0\Quality\Specflow.TestingSuite\AureaAes.TestingSuite.Test\Features\Cis.Component.feature.cs:line 0
--SqlException
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
--Win32Exception
]]></stack-trace>
</failure>
<test-case id="0-1002" name="GenerateConsumption" fullname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature.GenerateConsumption" methodname="GenerateConsumption" classname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature" runstate="Runnable" seed="1630670862" result="Failed" label="Error" site="Parent" start-time="0001-01-01 00:00:00Z" end-time="0001-01-01 00:00:00Z" duration="0.000000" asserts="0">
<properties>
<property name="Description" value="GenerateConsumption" />
</properties>
<failure>
<message><![CDATA[OneTimeSetUp: System.Data.Entity.Core.EntityException : The underlying provider failed on Open.
----> System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
----> System.ComponentModel.Win32Exception : No such host is known]]></message>
</failure>
</test-case>
<test-case id="0-1001" name="GenerateInvoice" fullname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature.GenerateInvoice" methodname="GenerateInvoice" classname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature" runstate="Runnable" seed="798259755" result="Failed" label="Error" site="Parent" start-time="0001-01-01 00:00:00Z" end-time="0001-01-01 00:00:00Z" duration="0.000000" asserts="0">
<properties>
<property name="Description" value="GenerateInvoice" />
</properties>
<failure>
<message><![CDATA[OneTimeSetUp: System.Data.Entity.Core.EntityException : The underlying provider failed on Open.
----> System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
----> System.ComponentModel.Win32Exception : No such host is known]]></message>
</failure>
</test-case>
<test-case id="0-1003" name="Import867FileToMarket" fullname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature.Import867FileToMarket" methodname="Import867FileToMarket" classname="AureaAes.TestingSuite.Test.Features.Cis_Component_Feature" runstate="Runnable" seed="993609143" result="Failed" label="Error" site="Parent" start-time="0001-01-01 00:00:00Z" end-time="0001-01-01 00:00:00Z" duration="0.000000" asserts="0">
<properties>
<property name="Description" value="Import867FileToMarket" />
</properties>
<failure>
<message><![CDATA[OneTimeSetUp: System.Data.Entity.Core.EntityException : The underlying provider failed on Open.
----> System.Data.SqlClient.SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
----> System.ComponentModel.Win32Exception : No such host is known]]></message>
</failure>
</test-case>
</test-suite>
</test-suite>
</test-suite>
</test-suite>
</test-suite>
</test-suite>
</test-run>

0

The issue was that the tests were never run, as they failed during the NUnit setup. Now I can see the Tests tab. I am attaching the screenshot of the results I can see in the Tests tab.

 

But even if I run the build without the XML processing build feature, I am still seeing the same kind of result in the Tests tab with or without the XML processing. I was rather expecting some green and red colors. Please let me know if the Tests tab is not as expected.



0

Hi Syed,

I was pointed out about this issue recently, sorry that it went unanswered so long. Just for reference, our build usually checks on the default paths for the possible XML reports and analyzes them automatically if they're found, without needing to add the XML Report Processing step. This feature is more thought for the non-standard reports.

This tests tab shows as expected, "Status" changes from Failure to OK, but no fancy colors on it. Those are reserved for full build status.

0

Please sign in to leave a comment.