DotCover source mapping

Has anybody got source mapping working?  TW-18231 seems to indicate that it has been fixed but I still can't get it to work and as the report only indicates 'source not available' I have no idea what I have done wrong.

Currently I have two configurations:

A: Compiles
B: Tests

And following above related issue I have added the following parameter:

dotNetCoverage.dotCover.source.mapping

with value:

%dep.btA.teamcity.build.default.checkoutDir%=>%teamcity.build.checkoutDir%

where btA is the correct identifier for configuration A.

B has a snapshot dependency on A and checks out the same source as A.

Any help would be greatly appreciated.
2 comments
Comment actions Permalink

what does it say in log?

0
Comment actions Permalink

I managed to get it to work.  The build log said:
Generate dotCover HTML report] No source files were found under the build checkout directory C:\BuildAgent\work\61af1e2e45a32255. No source files will be included in dotCover report as source code of classes.

a) run on the same machine
b) check out the same source that the compiled build ran against
b) the dependency property %dep.bt102.teamcity.build.checkoutDir% doesn't get passed to the test configuration but %dep.bt102.teamcity.build.default.checkoutDir% does.
c) The problem with the default directory is that it is just the hash not the full path.

This is the final parameter I used which worked:

dotNetCoverage.dotCover.source.mapping

C:\BuildAgent\work\%dep.bt102.teamcity.build.default.checkoutDir%=>%teamcity.build.checkoutDir%


All of that means it's really not worth it to use.  I've gone back to just having two steps in the test configuration, the first rebuilds the app, the second tests it.

It would be great if this could be improved.

0

Please sign in to leave a comment.