views:

265

answers:

1

Hi all,

We have a tradtional layering architecture with business layer, service layer, model layer, etc. We have unit tests which test at least part of every production code assembly. I can see that they execute on TFS (see below).

When I look at the coverage provided by TFS (formatted when opened from Visual Studio), it lists just three assemblies: Business and two data assemblies.

Any pointers to what I may be doing wrong?

Thanks,

Anders, Denmark

/searchpathroot:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release" /resultsfileroot:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\TestResults" /testcontainer:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBasis.dll" /testcontainer:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBusiness.dll" /testcontainer:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBusinessLayer.dll" /testcontainer:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXDataLayer.dll" /testcontainer:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXModelLayer.dll" /testcontainer:"C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXServiceLayer.dll" /publish:"http://dkrdstfs01:8080/" /publishbuild:"vstfs:///Build/Build/6046" /teamproject:"CIM CIR" /platform:"Any CPU" /flavor:"Release"
The "TestToolsTask" task is using "MSTest.exe" from "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe". Loading D:\Build\CIMCIR_source.XXXX\XXXX\src\LocalTestRun.testrunconfig... Loading C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBasis.dll... Loading C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBusiness.dll... Loading C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBusinessLayer.dll... Loading C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXDataLayer.dll... Loading C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXModelLayer.dll... Loading C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXServiceLayer.dll... UTA050: Test TestXXXXServiceLayer.IntegrationTests.CaseBundleServiceIntegrationTest.TestThatCaseCanBeAddedToBundle has the Ignore attribute. Ignoring test. Starting execution...

Results Top Level Tests ------- --------------- Passed TestXXXXBusiness.Document.GetFolderImageIndexTest.TestThatCorrectImageIndexIsReturned ... Passed TestXXXXBusinessLayer.Services.BusinessLogicServiceTest.TestThatBusinessLogicKnowsDefaultBusinessProcess ... Passed TestXXXXDataLayer.IntegrationTests.StructureMapIntegrationTest.TestThatRepositoryInstanceCanBeObtainedParticipantRepository ... Passed TestXXXXModelLayer.PersonWithInitialsListTest.TestThatProjectPlanModelCanBeCreatedAndIterated ... Passed TestXXXXServiceLayer.IntegrationTests.DocumentServiceIntegrationTest.TestThatServiceCanLockUnlockedDocument2 ... 107/133 test(s) Passed, 20 Inconclusive, 6 Timeout

Summary


Test Run Timeout. Passed 107 Inconclusive 20 Timeout 6 ----------------- Total 133 Results file: C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\TestResults\svc-dkrdssandbox02-T_DKRDSBUILD02 2010-01-23 13_56_43_Any CPU_Release.trx Run Configuration: Local Test Run

Run has the following issue(s): Code coverage instrumentation warning while processing file XXXX.Business.dll: TESTTOOLSTASK : warning VSP2013: Instrumenting this image requires it to run as a 32-bit process. The CLR header flags have been updated to reflect this. Code coverage instrumentation warning while processing file XXXX.Data.dll: TESTTOOLSTASK : warning VSP2013: Instrumenting this image requires it to run as a 32-bit process. The CLR header flags have been updated to reflect this. Code coverage instrumentation warning while processing file XXXX.DataDBSpecific.dll: TESTTOOLSTASK : warning VSP2013: Instrumenting this image requires it to run as a 32-bit process. The CLR header flags have been updated to reflect this. Waiting to publish... Publishing results of test run svc-dkrdssandbox02-T@DKRDSBUILD02 2010-01-23 13:56:43_Any CPU_Release to http://dkrdstfs01:8080/Build/v1.0/PublishTestResultsBuildService2.asmx... ........Publish completed successfully. MSBUILD : warning MSB6006: "MSTest.exe" exited with code 1. The previous error was converted to a warning because the task was called with ContinueOnError=true. Build continuing because "ContinueOnError" on the task "TestToolsTask" is set to "true". Done executing task "TestToolsTask" -- FAILED. Task "TestToolsTask" skipped, due to false condition; ( '$(IsDesktopBuild)'=='true' and '$(V8TestToolsTask)'!='true' and '%(MetaDataFile.Identity)' != '' ) was evaluated as ( 'false'=='true' and 'false'!='true' and '' != '' ). Task "TestToolsTask" skipped, due to false condition; ( '$(IsDesktopBuild)'=='true' and '$(V8TestToolsTask)'=='true' and '%(MetaDataFile.Identity)' != '' ) was evaluated as ( 'false'=='true' and 'false'=='true' and '' != '' ). Task "TestToolsTask" skipped, due to false condition; ( '$(IsDesktopBuild)'=='true' and '$(V8TestToolsTask)'!='true' and '@(LocalTestContainer)' != '' ) was evaluated as ( 'false'=='true' and 'false'!='true' and 'C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBasis.dll;C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBusiness.dll;C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXBusinessLayer.dll;C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXDataLayer.dll;C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXModelLayer.dll;C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\Binaries\Release\TestXXXXServiceLayer.dll' != '' ). Done building target "CoreTestConfiguration" in project "TFSBuild.proj". Target "TestConfiguration" in file "C:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" from project "C:\Documents and Settings\svc-dkrdssandbox02-T\Local Settings\Temp\CIM CIR\CIM CIR - XXXX\BuildType\TFSBuild.proj": Building target "TestConfiguration" completely.

A: 

Either of the following reasons may cause this behaviour:

  1. Code coverage information is only gathered for assemblies specified in the Test Run Configuration file used by Team Build (LocalTestRun.testrunconfig from the output above, though usually there are separate .testrunconfig files for local and server builds).
  2. Code coverage information is only gathered for assemblies containing code that is executed during a test run - check your test list.
Thomas Gerstendörfer