Can't generate the code coverage report

Answered
[14:26:38][Step 4/5] [JetBrains dotCover] Coverage session finished with errors: Unable to profile the application because the host protection is applied. Probably it relates with Microsoft SQL; Unable to profile the application because the host protection is applied. Probably it relates with Microsoft SQL.
[14:26:39][Step 4/5] Importing data from 'C:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover35883302832256814081.data' (not existing file) with 'dotNetCoverage' processor
[14:26:39][Step 4/5] Rejected coverage report file: C:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover35883302832256814081.data size: 0. File is empty or does not exist
[14:26:39][Step 4/5] Process exited with code -2
[14:26:39][Step 4/5] Importing data from 'C:\TeamCity\buildAgent\work\847c6f96ff11c294\TestResults\administrator_TEAM 2016-11-10 14_14_28.trx' (993.7 KB) with 'vstest' processor
 
We are using the SQL Local DB as our database in our unit test. I followed the link to start the SqlLocalDB in an isolated step, but it does not work for our configuration. Can you give us some hints to solve this issue?
 
Thanks
0
7 comments

Hello Edward,

What dotCover and TeamCity version do you use? There were related bugs fixed in dotCover 2016.2. Please update the bundled dotCover tool to 2016.2 for TC agents in the directory like "C:\BuildAgent\tools\dotCover\".

Please let me know if it helps.

0

Hi Alina,

I upgraded the TeamCity to the latest 10.0.3 and the version of dotCover is 2016.2.2, but the issue still exists. In addition, we have 700+ unit tests, and about 1/2 are using MS SQL Local DB. Is it possible that we have too many unit tests? I find that it worked properly on dotCover version 2016.1.2. Is it a regression bug in dotCover 2016.2? How can we downgrade dotCover to 2016.1.2?

Please give me more hints.

0

Hello Edward,

You can install dotCover on the agent machine and specify path to it in "Path to dotCover Home" of the runner. Also you can use NuGet feed to install dotCover. 

I'll ask dotCover support team to take a look at the issue.

1

Hello Edward,

As a workaround, you could try to filter out sqlsrvr.exe using process filters, which were implemented in dotCover 2016.2 :

/ProcessFilters=ARG : (Optional) Specifies process filters. Syntax: +:process1;-:process2

Please let me know if it helps.

 

0

Hi Fedor,

I set the extra argument /ProcessFilters=-:sqlservr.exe, and it works on our build.

Thanks.

1
Avatar
Permanently deleted user

/ProcessFilters=-:sqlservr.exe, worked for me too

0

Please sign in to leave a comment.