Unanswered No code coverage from TFS 2010 build

  • Monday, October 17, 2011 4:29 PM
     
     

    Hi,  I have seen people on other forums discussing this problem but so far have not found a solution.

    Here is my issue:

    I have a solution with code coverage enabled.  Running the build and tests locally I see code coverage results fine.

    However my build server (which is TFS2010 SP1 PLUS Visual Studio 2010 Premium) is reporting "No Code Coverage" when it runs a build.  The .coverage file is on the build server, so it looks like instrumentation is fine.   I can also click on "View Test Results" from the build summary in Visual Studio, and then right click and select "Code Coverage Results" and I do see the results from the build server.

    So it just looks like the build summary is incorrect.

    Has anybody solved this yet?

     

All Replies

  • Tuesday, October 18, 2011 12:34 AM
     
     

    I would create a very simple hello world app and make sure the build server is configured correctly.  You can see all the steps here:

    http://www.donovanbrown.com/?tag=/Code-Coverage

    I notice lots of people forget to select the correct test settings file in their builds.

    Good Luck,
    Donovan

  • Tuesday, October 18, 2011 6:25 AM
    Moderator
     
     

    Hi Robinsonpr,

     

    Thanks for your post.

     

    For this issue, Donovan provided us the helpful explanation in his blog, please refer to the detailed steps and setting in that video.

     

    Or you can refer to this article: http://msmvps.com/blogs/rfennell/archive/2010/08/05/getting-code-coverage-working-on-team-build-2010.aspx and http://geekswithblogs.net/jakob/archive/2009/06/03/tfs-team-build-2010-running-unit-tests.aspx.   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Tuesday, October 18, 2011 8:19 AM
     
     

    Thanks for the links guys.

    Still no joy, however.  I created a brand new "Hello World" app with a test to get some coverage.  Ran locally and coverage reported.  I then put it in TFS and set up a build for it.  I made sure to double check that the Automated Tests bit of my build definition had the TestSettings file set, and it definitely is, to $/Test/TestCoverage/Local.testsetttings.

    When I look on the hard drive of my build server, in the build folder for the app there is a TestResults folder, and under that in the "In" folder there is a DATA.COVERAGE file, so it certainly looks to me like code coverage IS being carried out on the build server, just not reported in the final build output.

    As another verification of this, when I open the build summary on the VS2010 desktop, if I expand the "test run completed" node and click on "View Test Results" I see the result of the test.   If I then right-click on the test and select "Code Coverage Results" I CAN see the code coverage results from the build server (I can tell it's from the build server as the top node in the Hierarchy has the format [MyUserName]@[MyBuildServer] [BuildName]).

    So very strange, it looks like coverage is being executed on the build server but just not reported in the build summary.

  • Tuesday, October 18, 2011 10:20 AM
    Moderator
     
     

    Hi Robinsonpr,

     

    Thanks for your reply.

     

    I want to confirm with you that: have you installed VS 2010 on your build machine? If not, I suggest you install VS 2010 on your build machine, then queue your Build Definition again. 


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Tuesday, October 18, 2011 10:26 AM
     
     

    Hi John,

    Yes I already have VS2010 Premium installed on my build machine.

     

  • Wednesday, October 19, 2011 8:12 AM
    Moderator
     
     

    Hi Robinsonpr,

     

    Thanks for your reply.

     

    Ok, I know you already installed the VS 2010 on your build machine(build agent). And you said the data.coverage file already be created in TestResult folder under Working Directory path. It seems that only the code coverage not displayed correctly in build summary as you said.    

     

    Please open the Build Summary report(Team Project>>Reports>>Builds), check if there has the code coverage value under Code Coverage column.  

     

    Which build process template you used in Build Definition, DefaultTemplate.xaml? Have you tried to test scenario on other clients and build machines?  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Wednesday, October 19, 2011 8:33 AM
     
     

    Hi John,

    I can't find the Report you are referring to, in fact I have no Reports option (I presume the Team Project>>Reports>>Builds path you mentioned was from the Team Explorer of my client workstation?).

    My TFS instance is currently running on a Windows 7 machine as our 2008 Servers are not yet provisioned.  I know that TFS under Windows 7 doesn't support reporting.  Maybe this is the cause of not seeing code coverage in the build summary?

    Oh and I am using DefaultTemplate.xaml, unmodified.

    Thanks for the help,

    Paul

  • Wednesday, October 19, 2011 9:03 AM
    Moderator
     
     

    Hi Paul,

     

    Yes, I mean Team Explorer>>Team Project>>Reports node>>Builds folder>>Build Summary report. And as you said, if not configure Reporting Service for TFS, there no the Reports node under Team Project.     

     

    I don’t think this issue cause by not configured Reporting Service for your TFS, but I need to confirm that. 


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Wednesday, October 19, 2011 12:07 PM
     
     
    Ok thanks for the update, I look forward to your confirmation!
    • Edited by robinsonpr Wednesday, October 19, 2011 4:32 PM
    •  
  • Thursday, October 20, 2011 3:44 AM
    Moderator
     
     

    Hi Robinsonpr,

     

    I disabled the Reporting Service for my TFS 2010, then queued the Build Definition, still can view the Code Coverage under Build Summary, so I think it’s not relate to Reporting Service.

     

    Could you share your detailed build log here? I will compare it with my build log, try to find the difference.  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Thursday, October 20, 2011 8:19 AM
     
      Has Code

    That would be great, here is my build log:

    Build started 17/10/2011 18:10:24.
    Project "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln" on node 1 (default targets).
    ValidateSolutionConfiguration:
      Building solution configuration "Debug|Any CPU".
    Project "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln" (1) is building "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode\SomeCode.csproj" (2) on node 1 (default targets).
    PrepareForBuild:
      Creating directory "obj\Debug\".
    GenerateTargetFrameworkMonikerAttribute:
    Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
    CoreCompile:
      C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\SomeCode.dll /target:library Class1.cs Properties\AssemblyInfo.cs "C:\Users\robinson2p\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs"
    CopyFilesToOutputDirectory:
      Copying file from "obj\Debug\SomeCode.dll" to "C:\Builds\2\Test\TestCoverage\Binaries\SomeCode.dll".
      SomeCode -> C:\Builds\2\Test\TestCoverage\Binaries\SomeCode.dll
      Copying file from "obj\Debug\SomeCode.pdb" to "C:\Builds\2\Test\TestCoverage\Binaries\SomeCode.pdb".
    Done Building Project "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode\SomeCode.csproj" (default targets).
    Project "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln" (1) is building "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests\SomeCodeTests.csproj" (3) on node 1 (default targets).
    PrepareForBuild:
      Creating directory "obj\Debug\".
    GenerateTargetFrameworkMonikerAttribute:
    Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
    CoreCompile:
      C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:C:\Builds\2\Test\TestCoverage\Binaries\SomeCode.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\SomeCodeTests.dll /target:library Properties\AssemblyInfo.cs Class1Tests.cs "C:\Users\robinson2p\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs"
    CopyFilesToOutputDirectory:
      Copying file from "obj\Debug\SomeCodeTests.dll" to "C:\Builds\2\Test\TestCoverage\Binaries\SomeCodeTests.dll".
      SomeCodeTests -> C:\Builds\2\Test\TestCoverage\Binaries\SomeCodeTests.dll
      Copying file from "obj\Debug\SomeCodeTests.pdb" to "C:\Builds\2\Test\TestCoverage\Binaries\SomeCodeTests.pdb".
    Done Building Project "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests\SomeCodeTests.csproj" (default targets).
    Done Building Project "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln" (default targets).
    
    Build succeeded.
        0 Warning(s)
        0 Error(s)
    
    Time Elapsed 00:00:01.23

     

  • Thursday, October 20, 2011 8:41 AM
    Moderator
     
     

    Hi Robinsonpr, 

     

    When queue the build definition, in the Queue Build “TeamProjectName dialog box>> click Parameters tab>> change the Logging Verbosity’s value to Diagnostic>> click Queue to start this Build. After build complete, under Build Explorer, double-click build name to open build details, under View Log, press Ctrl+A and Ctrl+C.   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Thursday, October 20, 2011 8:46 AM
     
     

    Thanks didn't know how to set the log detail level!  Here is the detailed log:

     

    00:16

    Overall Build Process

    Initial Property Values
    AgentSettings = Use agent where Name=* and Tags is empty; Max Wait Time: 04:00:00
    AssociateChangesetsAndWorkItems = True
    BuildNumberFormat = $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)
    BuildSettings = Build $/Test/TestCoverage/TestCoverage.sln with default platform and configuration
    CleanWorkspace = All
    CreateLabel = False
    CreateWorkItem = False
    DisableTests = False
    DropBuild = True
    GetVersion =
    MSBuildArguments =
    MSBuildPlatform = Auto
    PerformTestImpactAnalysis = True
    PrivateDropLocation =
    RunCodeAnalysis = AsConfigured
    SourceAndSymbolServerSettings = Index Sources
    TestSpecs = Run tests in assemblies matching **\*test*.dll using settings from $/Test/TestCoverage/Local.testsettings
    Verbosity = Diagnostic

     

    00:00

    Get the Build

    00:00

    Update Drop Location

    00:00

    Update Build Number

     

    Initial Property Values
    BuildNumberFormat = $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)

    Final Property Values
    BuildNumberFormat = $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)
    Result = TestCoverage_20111020.1

    00:00

    If DropBuild And Build Reason is Triggered

     

    Initial Property Values
    Condition = True

    00:00

    If DropLocationRoot is empty

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    00:00

    Set Drop Location

     

    Initial Property Values
    BuildNumber =
    CompilationStatus = Unknown
    DropLocation = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1
    KeepForever = False
    LabelName =
    LogLocation =
    Quality =
    SourceGetVersion =
    Status = None
    TestStatus = Unknown

    Final Property Values
    BuildNumber =
    CompilationStatus = Unknown
    DropLocation = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1
    KeepForever = False
    LabelName =
    LogLocation =
    Quality =
    SourceGetVersion =
    Status = None
    TestStatus = Unknown

    00:00

    Create the Drop Location

     

    Initial Property Values
    Directory = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1

    Final Property Values
    Directory = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1

    Final Property Values
    Condition = True

    00:00

    If DropBuild And Build Reason is ValidateShelveset

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    00:15

    Run On Agent (reserved build agent Default Agent - ste11747)

     

    Initial Property Values
    MaxExecutionTime = 00:00:00
    MaxWaitTime = 04:00:00
    ReservationSpec = Name=*, Tags=

    00:00

    Initialize Variables

    00:00

    Get the Agent

     

    Initial Property Values
    Result = Default Agent - ste11747 (vstfs:///Build/Agent/2)

    00:00

    Get the Build Directory

     

    Initial Property Values
    Result = C:\Builds\2\Test\TestCoverage

    00:00

    Initialize Workspace Name

     

    Initial Property Values
    Value = 2_2_ste11747

    Final Property Values
    To = 2_2_ste11747
    Value = 2_2_ste11747

    00:00

    Initialize Sources Directory

     

    Initial Property Values
    Value = C:\Builds\2\Test\TestCoverage\Sources

    Final Property Values
    To = C:\Builds\2\Test\TestCoverage\Sources
    Value = C:\Builds\2\Test\TestCoverage\Sources

    00:00

    Initialize Binaries Directory

     

    Initial Property Values
    Value = C:\Builds\2\Test\TestCoverage\Binaries

    Final Property Values
    To = C:\Builds\2\Test\TestCoverage\Binaries
    Value = C:\Builds\2\Test\TestCoverage\Binaries

    00:00

    Initialize TestResults Directory

     

    Initial Property Values
    Value = C:\Builds\2\Test\TestCoverage\TestResults

    Final Property Values
    To = C:\Builds\2\Test\TestCoverage\TestResults
    Value = C:\Builds\2\Test\TestCoverage\TestResults

    00:00

    If Not BuildSettings.HasPlatformConfigurations

     

    Initial Property Values
    Condition = True

    00:00

    Use Default Platform Configuration

     

    Initial Property Values
    Collection = |
    Item = |

    Final Property Values
    Collection = |
    Item = |

    Final Property Values
    Condition = True

    00:00

    If WorkspaceName > MaxSize

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    00:00

    Initialize Workspace

    00:00

    Delete Test Results Directory

     

    Initial Property Values
    Directory = C:\Builds\2\Test\TestCoverage\TestResults
    Recursive = True

    Final Property Values
    Directory = C:\Builds\2\Test\TestCoverage\TestResults
    Recursive = True

    00:00

    If Not CleanWorkspace = CleanWorkspaceOption.None

     

    Initial Property Values
    Condition = True

    00:00

    Delete Binaries Directory

     

    Initial Property Values
    Directory = C:\Builds\2\Test\TestCoverage\Binaries
    Recursive = True

    Final Property Values
    Directory = C:\Builds\2\Test\TestCoverage\Binaries
    Recursive = True

    Final Property Values
    Condition = True

    00:00

    If CleanWorkspace = CleanWorkspaceOption.All

     

    Initial Property Values
    Condition = True

    00:00

    Delete Workspace and Sources Directory

    00:00

    Delete Workspace

     

    Initial Property Values
    DeleteLocalItems = True
    Name = 2_2_ste11747

    Final Property Values
    DeleteLocalItems = True
    Name = 2_2_ste11747

    00:00

    Delete Sources Directory

     

    Initial Property Values
    Directory = C:\Builds\2\Test\TestCoverage\Sources
    Recursive = True

    Final Property Values
    Directory = C:\Builds\2\Test\TestCoverage\Sources
    Recursive = True

    Final Property Values
    Condition = True

    00:00

    Create Workspace

     

    Initial Property Values
    BuildDirectory = C:\Builds\2\Test\TestCoverage
    Comment = Workspace Created by Team Build
    Name = 2_2_ste11747
    SourcesDirectory = C:\Builds\2\Test\TestCoverage\Sources

    Final Property Values
    BuildDirectory = C:\Builds\2\Test\TestCoverage
    Comment = Workspace Created by Team Build
    Name = 2_2_ste11747
    Result = 2_2_ste11747;UK\Robinson2P
    SourcesDirectory = C:\Builds\2\Test\TestCoverage\Sources

    00:00

    If CleanWorkspace = CleanWorkspaceOption.Outputs

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    00:00

    Get Workspace

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\Local.testsettings;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.vsmdi;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.vssscc;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TraceAndTestImpact.testsettings;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode\Class1.cs;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode\Properties;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode\SomeCode.csproj;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode\SomeCode.csproj.vspscc;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCode\Properties\AssemblyInfo.cs;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests\Class1Tests.cs;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests\Properties;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests\SomeCodeTests.csproj;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests\SomeCodeTests.csproj.vspscc;C39

    Getting C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\SomeCodeTests\Properties\AssemblyInfo.cs;C39

    Final Property Values
    AllowUnmapped = True
    AutoMerge = True
    Deletes =
    GetOptions = None
    Gets =
    NoCIOption = True
    PopulateOutput = False
    Replaces =
    VersionOverride =
    Workspace = 2_2_ste11747;UK\Robinson2P

     

    Initial Property Values
    AllowUnmapped = True
    AutoMerge = True
    GetOptions = None
    NoCIOption = True
    PopulateOutput = False
    VersionOverride =
    Workspace = 2_2_ste11747;UK\Robinson2P

    00:00

    If CreateLabel

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    00:13

    Try Compile, Test, and Associate Changesets and Work Items

    00:12

    Compile, Test, and Associate Changesets and Work Items

    00:12

    Try Compile and Test

    00:12

    Compile and Test

    00:12

    For Each Configuration in BuildSettings.PlatformConfigurations

     

    Initial Property Values
    Values = |

    00:12

    Compile and Test for Configuration

    00:00

    Initialize Variables

    00:00

    Initialize OutputDirectory

     

    Initial Property Values
    Value = C:\Builds\2\Test\TestCoverage\Binaries

    Final Property Values
    To = C:\Builds\2\Test\TestCoverage\Binaries
    Value = C:\Builds\2\Test\TestCoverage\Binaries

    00:00

    If DropLocation is Set

     

    Initial Property Values
    Condition = True

    00:00

    Initialize LogFile Drop Location

     

    Initial Property Values
    Value = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1\logs

    Final Property Values
    To = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1\logs
    Value = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1\logs

    Final Property Values
    Condition = True

    00:05

    If BuildSettings.HasProjectsToBuild

     

    Initial Property Values
    Condition = True

    00:05

    For Each Project in BuildSettings.ProjectsToBuild

     

    Initial Property Values
    Values = $/Test/TestCoverage/TestCoverage.sln

    00:05

    Try to Compile the Project

    00:05

    Compile the Project

    00:00

    Convert Server Path to Local Path

     

    Initial Property Values
    Input = $/Test/TestCoverage/TestCoverage.sln
    Workspace = 2_2_ste11747;UK\Robinson2P

    Final Property Values
    Input = $/Test/TestCoverage/TestCoverage.sln
    Result = C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln
    Workspace = 2_2_ste11747;UK\Robinson2P

    00:05

    Run MSBuild for Project

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln" /m:1 /fl /flp:"logfile=C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.log;encoding=Unicode;verbosity=diagnostic" /p:SkipInvalidConfigurations=true /p:OutDir="C:\Builds\2\Test\TestCoverage\Binaries\\" /p:VCBuildOverride="C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln.vsprops" /dl:WorkflowCentralLogger,"c:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;BuildUri=vstfs:///Build/Build/60;InformationNodeId=91469;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://ste11747:8080/tfs/EnterpriseDevelopment;"*WorkflowForwardingLogger,"c:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;"

     

    Initial Property Values
    AdditionalVCOverrides =
    CommandLineArguments = /p:SkipInvalidConfigurations=true
    Configuration =
    GenerateVSPropsFile = True
    LogFile =
    LogFileDropLocation = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1\logs
    MaxProcesses = 1
    OutDir = C:\Builds\2\Test\TestCoverage\Binaries
    Platform =
    Project = C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln
    ResponseFile =
    RunCodeAnalysis = AsConfigured
    Targets =
    TargetsNotLogged = String[] Array
    ToolPath =
    ToolPlatform = Auto
    Verbosity = Diagnostic

    00:01

    Built $/Test/TestCoverage/TestCoverage.sln for default targets.

    00:00

    Built $/Test/TestCoverage/SomeCode/SomeCode.csproj for default targets.

    00:00

    Built $/Test/TestCoverage/SomeCodeTests/SomeCodeTests.csproj for default targets.

    00:00

    Built $/Test/TestCoverage/SomeCode/SomeCode.csproj for default targets.

    Final Property Values
    AdditionalVCOverrides =
    CommandLineArguments = /p:SkipInvalidConfigurations=true
    Configuration =
    GenerateVSPropsFile = True
    LogFile =
    LogFileDropLocation = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1\logs
    MaxProcesses = 1
    OutDir = C:\Builds\2\Test\TestCoverage\Binaries
    Platform =
    Project = C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\TestCoverage.sln
    ResponseFile =
    RunCodeAnalysis = AsConfigured
    Targets =
    TargetsNotLogged = String[] Array
    ToolPath =
    ToolPlatform = Auto
    Verbosity = Diagnostic

    Final Property Values
    Values = $/Test/TestCoverage/TestCoverage.sln

    Final Property Values
    Condition = True

     

    MSBuild Log File

    00:06

    If Not DisableTests

     

    Initial Property Values
    Condition = True

    00:06

    Run Tests

    00:06

    If Not TestSpecs Is Nothing

     

    Initial Property Values
    Condition = True

    00:06

    For Each TestSpec in TestSpecs

     

    Initial Property Values
    Values = Run tests in assemblies matching **\*test*.dll using settings from $/Test/TestCoverage/Local.testsettings

    00:06

    Try Run Tests

    00:06

    Run MSTest for Test Assemblies

    00:00

    Assign spec to testAssembly

     

    Initial Property Values
    Value = Run tests in assemblies matching **\*test*.dll using settings from $/Test/TestCoverage/Local.testsettings

    Final Property Values
    To = Run tests in assemblies matching **\*test*.dll using settings from $/Test/TestCoverage/Local.testsettings
    Value = Run tests in assemblies matching **\*test*.dll using settings from $/Test/TestCoverage/Local.testsettings

    00:00

    Find Test Assemblies

     

    Initial Property Values
    MatchPattern = C:\Builds\2\Test\TestCoverage\Binaries\**\*test*.dll

    Final Property Values
    MatchPattern = C:\Builds\2\Test\TestCoverage\Binaries\**\*test*.dll
    Result = System.Linq.OrderedEnumerable`2[System.String,System.String]

    00:06

    If Test Assemblies Found

     

    Initial Property Values
    Condition = True

    00:06

    If testAssembly.HasTestSettingsFile

     

    Initial Property Values
    Condition = True

    00:06

    Find Test Settings File And Run MSTest

    00:00

    Convert Server Path to Local Path

     

    Initial Property Values
    Input = $/Test/TestCoverage/Local.testsettings
    Workspace = 2_2_ste11747;UK\Robinson2P

    Final Property Values
    Input = $/Test/TestCoverage/Local.testsettings
    Result = C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\Local.testsettings
    Workspace = 2_2_ste11747;UK\Robinson2P

    00:06

    Run MSTest for Test Assemblies

    The MSTestActivity was invoked without a value for Platform or Flavor. The values Any CPU and Debug were used.

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe /nologo /usestderr /testSettings:"C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\Local.testsettings" /searchpathroot:"C:\Builds\2\Test\TestCoverage\Binaries" /resultsfileroot:"C:\Builds\2\Test\TestCoverage\TestResults" /testcontainer:"C:\Builds\2\Test\TestCoverage\Binaries\SomeCodeTests.dll" /publish:"http://ste11747:8080/tfs/EnterpriseDevelopment" /publishbuild:"vstfs:///Build/Build/60" /teamproject:"Test" /platform:"Any CPU" /flavor:"Debug"

    Loading C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\Local.testsettings...

    Loading C:\Builds\2\Test\TestCoverage\Binaries\SomeCodeTests.dll...

    Starting execution...

     

    Results Top Level Tests

    ------- ---------------

    Passed SomeCodeTests.Class1Tests.TestMethod1

    1/1 test(s) Passed

     

    Summary

    -------

    Test Run Completed.

    Passed 1

    ---------

    Total 1

    Results file: C:\Builds\2\Test\TestCoverage\TestResults\Robinson2P_STE11747 2011-10-20 09_43_49_Any CPU_Debug.trx

    Test Settings: Local

    Waiting to publish...

    Publishing results of test run Robinson2P@STE11747 2011-10-20 09:43:49_Any CPU_Debug to http://ste11747:8080/tfs/EnterpriseDevelopment...

    .Publish completed successfully.

    Final Property Values
    Category =
    CommandLineArguments =
    Flavor =
    MaxPriority = -1
    MinPriority = -1
    PathToResultsFilesRoot = C:\Builds\2\Test\TestCoverage\TestResults
    Platform =
    Publish = True
    SearchPathRoot = C:\Builds\2\Test\TestCoverage\Binaries
    TestConfigId = -1
    TestConfigName =
    TestContainers = System.Linq.OrderedEnumerable`2[System.String,System.String]
    TestLists =
    TestMetadata =
    TestNames =
    TestSettings = C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\Local.testsettings
    ToolPath =
    Version = -1

    Final Property Values
    Condition = True

    Final Property Values
    Condition = True

    Final Property Values
    Values = Run tests in assemblies matching **\*test*.dll using settings from $/Test/TestCoverage/Local.testsettings

    Final Property Values
    Condition = True

    Final Property Values
    Condition = True

    Final Property Values
    Values = |

     

    Initial Property Values
    Category =
    CommandLineArguments =
    Flavor =
    MaxPriority = -1
    MinPriority = -1
    PathToResultsFilesRoot = C:\Builds\2\Test\TestCoverage\TestResults
    Platform =
    Publish = True
    SearchPathRoot = C:\Builds\2\Test\TestCoverage\Binaries
    TestConfigId = -1
    TestConfigName =
    TestContainers = System.Linq.OrderedEnumerable`2[System.String,System.String]
    TestLists =
    TestMetadata =
    TestNames =
    TestSettings = C:\Builds\2\Test\TestCoverage\Sources\users\robinson2p\documents\visual studio 2010\Projects\TestCoverage\Local.testsettings
    ToolPath =
    Version = -1

    00:00

    If CompilationStatus = Unknown

     

    Initial Property Values
    Condition = True

    00:00

    Set CompilationStatus to Succeeded

     

    Initial Property Values
    BuildNumber =
    CompilationStatus = Succeeded
    DropLocation =
    KeepForever = False
    LabelName =
    LogLocation =
    Quality =
    SourceGetVersion =
    Status = None
    TestStatus = Unknown

    Final Property Values
    BuildNumber =
    CompilationStatus = Succeeded
    DropLocation =
    KeepForever = False
    LabelName =
    LogLocation =
    Quality =
    SourceGetVersion =
    Status = None
    TestStatus = Unknown

    Final Property Values
    Condition = True

    00:00

    If TestStatus = Unknown

     

    Initial Property Values
    Condition = True

    00:00

    Set TestStatus to Succeeded

     

    Initial Property Values
    BuildNumber =
    CompilationStatus = Unknown
    DropLocation =
    KeepForever = False
    LabelName =
    LogLocation =
    Quality =
    SourceGetVersion =
    Status = None
    TestStatus = Succeeded

    Final Property Values
    BuildNumber =
    CompilationStatus = Unknown
    DropLocation =
    KeepForever = False
    LabelName =
    LogLocation =
    Quality =
    SourceGetVersion =
    Status = None
    TestStatus = Succeeded

    Final Property Values
    Condition = True

    00:00

    If TreatTestFailureAsBuildFailure And (TestStatus = Failed)

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    00:00

    If AssociateChangesetsAndWorkItems

     

    Initial Property Values
    Condition = True

    00:00

    Associate Changesets and Work Items

    Warning: Cannot find the last label '': no changesets will be associated with the build.

    No change sets are submitted to build 'TestCoverage_20111020.1'.

    Final Property Values
    CurrentLabel =
    LastLabel =
    Result = (Collection)
    UpdateWorkItems = True

    Final Property Values
    Condition = True

     

    Initial Property Values
    CurrentLabel =
    LastLabel =
    UpdateWorkItems = True

    00:00

    If a Compilation Exception Occurred

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    00:00

    Get Impacted Tests, Index Sources and Publish Symbols

    00:00

    If PerformTestImpactAnalysis

     

    Initial Property Values
    Condition = True

    00:00

    Get Impacted Tests

    00:00

    Find Build Outputs

    There were no matches for the search pattern C:\Builds\2\Test\TestCoverage\Binaries\**\*.exe

    Final Property Values
    MatchPattern = C:\Builds\2\Test\TestCoverage\Binaries\**\*.dll;C:\Builds\2\Test\TestCoverage\Binaries\**\*.exe
    Result = System.Linq.OrderedEnumerable`2[System.String,System.String]

     

    Initial Property Values
    MatchPattern = C:\Builds\2\Test\TestCoverage\Binaries\**\*.dll;C:\Builds\2\Test\TestCoverage\Binaries\**\*.exe

    00:00

    Get Impacted Tests

    Build "TestCoverage_20111017.3" on drop share "\\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111017.3" will be used as a baseline for test impact analysis.

    Final Property Values
    Assemblies = System.Linq.OrderedEnumerable`2[System.String,System.String]
    AssociatedChangesets = (Collection)
    BaselineBuildDropLocation =
    BinariesRoot = C:\Builds\2\Test\TestCoverage\Binaries
    CodeChanges = (Collection)
    ImpactedTests = (Collection)
    Workspace = 2_2_ste11747;UK\Robinson2P

    Final Property Values
    Condition = True

     

    Initial Property Values
    Assemblies = System.Linq.OrderedEnumerable`2[System.String,System.String]
    AssociatedChangesets = (Collection)
    BaselineBuildDropLocation =
    BinariesRoot = C:\Builds\2\Test\TestCoverage\Binaries
    Workspace = 2_2_ste11747;UK\Robinson2P

    00:00

    If SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath

     

    Initial Property Values
    Condition = True

    00:00

    Find Symbol Files

     

    Initial Property Values
    MatchPattern = C:\Builds\2\Test\TestCoverage\Binaries\**\*.pdb

    Final Property Values
    MatchPattern = C:\Builds\2\Test\TestCoverage\Binaries\**\*.pdb
    Result = System.Linq.OrderedEnumerable`2[System.String,System.String]

    00:00

    If SourceAndSymbolServerSettings.IndexSources

     

    Initial Property Values
    Condition = True

    00:00

    Try Index Sources

    00:00

    Index Sources

    c:\Program Files\Microsoft Team Foundation Server 2010\Tools\srctool.exe C:\Builds\2\Test\TestCoverage\Binaries\SomeCode.pdb -r

    c:\Program Files\Microsoft Team Foundation Server 2010\Tools\pdbstr.exe -w -p:C:\Builds\2\Test\TestCoverage\Binaries\SomeCode.pdb -i:C:\Users\robinson2p\AppData\Local\Temp\tmpA505.tmp -s:srcsrv

    c:\Program Files\Microsoft Team Foundation Server 2010\Tools\srctool.exe C:\Builds\2\Test\TestCoverage\Binaries\SomeCodeTests.pdb -r

    c:\Program Files\Microsoft Team Foundation Server 2010\Tools\pdbstr.exe -w -p:C:\Builds\2\Test\TestCoverage\Binaries\SomeCodeTests.pdb -i:C:\Users\robinson2p\AppData\Local\Temp\tmpA535.tmp -s:srcsrv

    Final Property Values
    FileList = System.Linq.OrderedEnumerable`2[System.String,System.String]

    Final Property Values
    Condition = True

     

    Initial Property Values
    FileList = System.Linq.OrderedEnumerable`2[System.String,System.String]

    00:00

    If SourceAndSymbolServerSettings.HasSymbolStorePath

     

    Initial Property Values
    Condition = False

    Final Property Values
    Condition = False

    Final Property Values
    Condition = True

    00:00

    Revert Workspace and Copy Files to Drop LocationSkipped execution of Revert Workspace because of BuildReason Manual

     

    00:00

    If DropBuild And DropLocation is Set

     

    Initial Property Values
    Condition = True

    00:00

    Copy Files to Drop Location

    Skipped execution of Check In Gated Changes because of BuildReason Manual

    Final Property Values
    AgentSettings = Use agent where Name=* and Tags is empty; Max Wait Time: 04:00:00
    AssociateChangesetsAndWorkItems = True
    BuildNumberFormat = $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)
    BuildSettings = Build $/Test/TestCoverage/TestCoverage.sln with default platform and configuration
    CleanWorkspace = All
    CreateLabel = False
    CreateWorkItem = False
    DisableTests = False
    DropBuild = True
    GetVersion =
    MSBuildArguments =
    MSBuildPlatform = Auto
    PerformTestImpactAnalysis = True
    PrivateDropLocation =
    RunCodeAnalysis = AsConfigured
    SourceAndSymbolServerSettings = Index Sources
    TestSpecs = Run tests in assemblies matching **\*test*.dll using settings from $/Test/TestCoverage/Local.testsettings
    Verbosity = Diagnostic

     

    Initial Property Values
    Destination = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1
    Source = C:\Builds\2\Test\TestCoverage\Binaries

    Final Property Values
    Destination = \\STE11747\TFSBuilds\TestCoverage\TestCoverage_20111020.1
    Source = C:\Builds\2\Test\TestCoverage\Binaries

    Final Property Values
    Condition = True

    Final Property Values
    MaxExecutionTime = 00:00:00
    MaxWaitTime = 04:00:00
    ReservationSpec = Name=*, Tags=

     
  • Friday, October 21, 2011 7:49 AM
    Moderator
     
     

    Hi Robinsonpr,

     

    Thanks for your reply.

     

    It seems that everything work normally in build log. I think we need more troubleshooting on this issue. Try to open your build result in TFS Web Access, still no code coverage under View Summary section?

     

    If your “Hello World” app is a asp.net project, you can try this workaround:

    ·         Create a batch file with attached script. 

    ·         Add this script to the solution and set it as cleanup script in test setting being used by the build definition.

    ·         Check in the changes into source control

    ·         Run the build


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Friday, October 21, 2011 7:54 AM
     
     

    Hi John,

    Build result in TFS Web Access also shows no code coverage:

    1 projects/solutions compiled
    $/Test/TestCoverage/TestCoverage.sln - 0 error(s), 0 warning(s), View Log File
    1 test run(s) completed - 100% average pass rate
    1/1 test(s) passed, 0 failed, 0 inconclusive
    No Code Coverage Results
    My "Hello World" app is just a class library.  My "real" app is Winforms.  Does this mean I can't use the suggested workaround?  Also I couldn't see any script attached to the post....
    Thanks,
    Paul
  • Friday, October 21, 2011 8:08 AM
    Moderator
     
     

    Hi Paul,

     

    Yes, that workaround only for asp.net project.

     

    I’m discussing this issue with TFS Product Team, that will spend some time confirm this scenario. Is it a urgent issue for you?   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Friday, October 21, 2011 8:14 AM
     
     

    Hi John,

    It's not massively urgent, it's not like we can't cut code!

    That said, the reason I'm putting this together is to try and "convert" the rest of the developers in my organisation that TFS is what we should be using for ALM.  The current process uses old open source tools - Nant, NCover, CruiseControl etc, and I'm trying to show them how easy and slick CI is with TFS.  My demo didn't look too good when it showed zero code coverage in the build summary!

    Thanks for your continued support....

    Paul

  • Wednesday, November 02, 2011 9:13 AM
     
     

    Hi John,

    Did you get anywhere with the TFS Product Team on this issue?

    Thanks,

    Paul

  • Wednesday, November 09, 2011 4:31 PM
    Owner
     
     
    We are actually in the process of working a similar issue with our product group and another customer. As your case is pretty much the same issue, it would be best if you open a support case with us (http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone). If the issue turns out to be a bug (likely), it will of course be free.  Please reference this thread when opening the case.
    --Trevor H.