visual studio 2013 - How to trouble-shoot missing test coverage in TeamCity? -
according log i'm missing info test coverage. possible reasons are:
- include / exclude patterns incorrect
- assemblies compiled without debugging information
- pdb files not available
- visual studio code coverage enabled mstest
- testrunconfig used mstest , visual studio code coverage not disabled
being novice on teamcity, need guidance on do.
- i've included dlls +:*dll. no exclusion @ moment i've tried omit test -:*test*.
- i compile using debug profile , result put on server in bin/debug , obj/debug directories. there's no release @ all.
- i have pdb files in .source/bin/debug on server.
- since run nunit , dotcover on teamcity server, there's no vs involved.
- since run nunit , dotcover on teamcity server, there's no vs involved.
what miss? can more?
edit
the system is: vs13, tfs10, tc8.2 (the latest available included nunit , dotcoverage)
the part of log testing step (no errors in compile step reported, exit code 0). after this, there's removal of dotcover snapshot files. note, however, there's no data file found , 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 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. 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 'c:\teamcity\buildagent\temp\buildtmp\coverage_dotcover16594618384737853441.data' (8.38 kb) 'dotnetcoverage' processor [11:00:09]process exited code 0
[11:00:09]waiting 1 service processes complete
[11:00:09]processing 1 coverage report(s)
[11:00:09]generating coverage report dotcover 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. rights reserved.
[11:00:09]dotcover exited 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. 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 code: 0
i followed nice little tutorial working me. here's mentions try if you're not getting results:
little hint: if right no report generated take buildlog. @ first try got error:
solution:
failed read source file >'c:\teamcity\buildagent\temp\buildtmp\dotcover8583844779204955574.xml'. not find part of path 'c:\windows\system32\config\systemprofile\appdata\local\temp\4q-kqg6z.tmp'.
create searched “temp” folder in “c:\windows\system32\config\systemprofile\appdata\local”
normally doesn´t exist , because of error appeared. after works.
if doesn't work you'll need provide more information in order deduce what's wrong.
e.g paths, versions of installed, settings have got enabled build configurations, etc.
edit: mentioned had working, wonder if still have build logs of working builds? before colleague messed up. there chance can diff between build logs when working , when it's not? might give clue of changed.
i managed make brand new configuration, test minimum work required generate coverage. here's steps took. maybe there's here find you've done differently.
from main teamcity screen @ localhost:8080, click "create project"
- name: myprojectname
- click "create"
click "add build configuration"
- name: debug
click "vcs settings"
click "create , attach vcs root"
- type of vcs: git
- vcs root name: myprojectname git repo
- fetch url: https://myusername@bitbucket.org/myusername/myprojectname.git
- auth method: password (enter bitbucket username , password)
- checking interval: custom, 600 seconds
- click "test connection", should go green. click "save"
click "add build step"
- runner type: msbuild
- step name: build myprojectname
- build file path: myprojectname.sln
- msbuild version: microsoft .net framework 4.5
- msbuild toolsversion: 4.0
- run platform: x64
- click "save"
click "add build step"
- runner type: nunit
- step name: run myprojectname tests
- .net runtime platform: x64
- .net runtime version: 4.0
- run tests from: myprojectname.tests\bin\debug\myprojectname.tests.dll
- .net coverage tool: jetbrains dotcover
- click "save"
click "projects"
click "run..."
after that, build should have generated coverage. luck!
Comments
Post a Comment