0
votes

When i build my project in TFS 2015, I have set up to run all Unit tests/code coverage. The tests run and all of them pass. The issue i am having is that the results don't show up at the summary of the build or any where. Any reason why not showing up?

I looked at the logs and i am getting this warning:

Results File: C:\BuildAgent_work\1\TestResults\serverName$_serverName 2015-12-03 15_56_33.trx

Total tests: 533. Passed: 533. Failed: 0. Skipped: 0.

Test Run Successful.

Test execution time: 29.5985 Seconds

Publishing Test Results...

##[warning]Invalid results file. Please make sure the Test Result Format field in the task matches the result format of the file: C:\BuildAgent_work\1\TestResults\serverName$_serverName 2015-12-03 15_56_33.trx

I looked at the file

serverName$_serverName 2015-12-03 15_56_33.trx`

 <?xml version="1.0" encoding="UTF-8"?>
    <TestRun id="730b84f3-e06c-4d30-8994-15aa6ff385df" name="serverName$@serverName 2015-12-03 15:56:33" runUser="NT AUTHORITY\NETWORK SERVICE" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
  <Times creation="2015-12-03T15:56:33.2204061-05:00" queuing="2015-12-03T15:56:33.2204061-05:00" start="2015-12-03T15:56:33.2204061-05:00" finish="2015-12-03T15:57:01.4723683-05:00" />
  <TestSettings name="default" id="d53ac855-fee0-4c64-9372-227e08990a04">
    <Execution>
      <TestTypeSpecific />
    </Execution>
    <Deployment runDeploymentRoot="serverName$_serverName 2015-12-03 15_56_33" />
    <Properties />
  </TestSettings>
  <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>
  <ResultSummary outcome="Completed">
    <Counters total="0" executed="0" passed="0" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
    <Output>
      <StdOut>NUnit 1.2.0.0 executing tests is startedLoading tests from C:\BuildAgent\_work\1\a\App.Tests.dllRun started: C:\BuildAgent\_work\1\a\App.Tests.dllLoading tests from C:\BuildAgent\_work\1\a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dllRun started: C:\BuildAgent\_work\1\a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dllNUnit 1.2.0.0 executing tests is finished</StdOut>
    </Output>
    <RunInfos>
      <RunInfo computerName="serverName" outcome="Warning" timestamp="2015-12-03T15:56:31.8163881-05:00">
        <Text>Diagnostic data adapter message: Could not find diagnostic data adapter of type 'Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector' and Uri 'datacollector://microsoft/CodeCoverage/2.0'.</Text>
      </RunInfo>
      <RunInfo computerName="serverName" outcome="Warning" timestamp="2015-12-03T15:56:32.8460013-05:00">
        <Text>Unable to create DiaSession for C:\BuildAgent\_work\1\a\App.Tests.dll
No source location data will be available for this assembly.</Text>
      </RunInfo>
      <RunInfo computerName="serverName" outcome="Warning" timestamp="2015-12-03T15:57:01.1759645-05:00">
        <Text>System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.</Text>
      </RunInfo>
    </RunInfos>
  </ResultSummary>
</TestRun>
1
What version of Visual Studio is installed on the build agent?MrHinsh - Martin Hinshelwood
Are you using XAML build or vNext build? Is this project new created? Could you share your detailed steps how to create your solution and how to build?Cece Dong - MSFT
I had the wrong version of VS. Uninstall 2013 and install 2015 and everything is working.Valter

1 Answers

1
votes

My issue was with the Visual Studio in the build server. Once i updated Visual Studio from 2013 to 2015 in the build server everything worked fine.