According to the log I'm missing the info to get the test coverage. Possible reasons are:
- Include / exclude patterns are incorrect
- Assemblies are compiled without debugging information
- PDB files are not available
- Visual Studio code coverage is enabled for MSTest
- TESTRUNCONFIG is used for MSTest and Visual Studio code coverage is not disabled
Being a novice on TeamCity, I need some guidance on what to do.
- I've included all DLLs by +:*DLL. No exclusion at the moment but I've tried to omit the test itself by -:*test*.
- I compile using DEBUG profile and the result is put on the server in bin/debug and obj/debug directories. There's no release at all.
- I have PDB files in .source/bin/debug on the server.
- Since I run the nUnit and dotCover on the TeamCity server, there's no VS involved.
- Since I run the nUnit and dotCover on the TeamCity server, there's no VS involved.
What do I miss? What can I do more?
Edit
The system is: VS13, TFS10, TC8.2 (the latest available with the included nUnit and dotCoverage)
The part of log that is the testing step (no errors in the compile step reported, exit code 0). After this, there's only the removal of dotCover snapshot files. Note, however, that there's no DATA file to be found and that the XML file contains no data.
<?xml version="1.0" encoding="UTF-8"?>
<Root DotCoverVersion="2.6.1000.602"
ReportType="TeamCityXml"
CoveragePercent="0"
TotalStatements="0"
CoveredStatements="0"/>
What can I do here?
[10:59:39]Step 2/2: Test (NUnit) (29s)
[10:59:39]Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin
\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[10:59:39]in directory: C:\TeamCity\buildAgent\work\263aa919ed5f7bb8
[10:59:46]JetBrains dotCover Console Runner v2.6.1000.602. Copyright (c) 2009-2014 JetBrains s.r.o. All rights reserved.
[10:59:55][JetBrains dotCover] Coverage session started [2014-06-30 10:59:55]
[11:00:02]Start TeamCity NUnit Test Runner
[11:00:02]Running NUnit-2.6.3 tests under .NET Framework v4.0 x64
[11:00:03]AutonomousTesting.dll
[11:00:03]CoverageTest.TestExample.TestEquality
[11:00:03]CoverageTest.TestExample.TestException
[11:00:03]CoverageTest.TestExample.TestInequality
[11:00:03]CoverageTest.TestExample.TestOmission
[11:00:03]Test ignored: CoverageTest.TestExample.TestOmission
[11:00:05]AutonomousTesting.dll
[11:00:05]CoverageTest.TestExample.TestEquality
[11:00:05]CoverageTest.TestExample.TestException
[11:00:05]CoverageTest.TestExample.TestInequality
[11:00:05]CoverageTest.TestExample.TestOmission
[11:00:05]Test ignored: CoverageTest.TestExample.TestOmission
[11:00:07][JetBrains dotCover] Coverage session finished [2014-06-30 11:00:07]
[11:00:07][JetBrains dotCover] Coverage results post-processing started [2014-06-30 11:00:07]
[11:00:08][JetBrains dotCover] Coverage results post-processing finished [2014-06-30 11:00:08]
[11:00:09]##teamcity[importData type='dotNetCoverage' tool='dotcover' file='C:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover16594618384737853441.data']
[11:00:09]Importing data from 'C:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover16594618384737853441.data' (8.38 KB) with 'dotNetCoverage' processor [11:00:09]Process exited with code 0
[11:00:09]Waiting for 1 service processes to complete
[11:00:09]Processing 1 coverage report(s)
[11:00:09]Generating coverage report by dotcover for files: [C:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover16594618384737853441.data]
[11:00:09]Get dotCover version
[11:00:09]Started dotCover: C:\TeamCity\buildAgent\tools\dotCover\dotCover.exe version C:\TeamCity\buildAgent\temp\buildTmp\dotCover4472367238745438467Version
[11:00:09]Output: JetBrains dotCover Console Runner v2.6.1000.602. Copyright (c) 2009-2014 JetBrains s.r.o. All rights reserved.
[11:00:09]dotCover exited with code: 0
[11:00:09]Use DotCover 2.6.x commands set
[11:00:09]Merge dotCover reports (9s)
[11:00:19]Started dotCover: C:\TeamCity\buildAgent\tools\dotCover\dotCover.exe merge C:\TeamCity\buildAgent\temp\buildTmp\dotcover4719506578346509917.xml
[11:00:19]Output: JetBrains dotCover Console Runner v2.6.1000.602. Copyright (c) 2009-2014 JetBrains s.r.o. All rights reserved. [JetBrains dotCover] Snapshot merging started [2014-06-30 11:00:18] [JetBrains dotCover] Source snapshots number: 1 [JetBrains dotCover] Snapshot merging finished [2014-06-30 11:00:19]
[11:00:19]dotCover exited with code: 0