-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Code coverage and artifact build #1288
Comments
I don't think you need anything but the |
@JakubLinhart can you enable logs and check the reason why modules are not instrumented? https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/Troubleshooting.md |
@MarcoRossignoli thanks for your suggestion. I created a minimal example project. Diag log files are here, here and here. I can't find anything interesting in these logs. It seems like the problem shows up only when |
We need the pdb for the instrumentation, we use that informations to emit probes and to have mapping between code and IL. |
It is missing in |
But to the question of why |
what is your workflow? are you publishing and after running the tests? Unfortunately coverlet cannot instrument without pdbs file like other instrumentation method we need to know the sequence points to map probes/sources, so usually the user do the publish(where pdbs are close to the dlls) and run test or run tests directly on sln or proj where pdbs are present. |
Yes, publishing from a single build agent and then running tests on multiple test agents. I understand that PDB files are needed for the instrumentation. The PDB file is available on all test agents actually: The question is why instrumentation doesn't work when PDB is not available at this path: |
This issue is stale because it has been open for 3 months with no activity. |
This issue was closed because it has been inactive for 9 months since being marked as stale. |
I have an integration test suit and I parallelize its execution on mutliple test agents so it is much faster. Building solution on each test agent makes parallelization much less effective since the solution build itself takes considerable time (~10 minutes). The idea is to publish binary artifacts from one build agent and reuse these artifacts on all test agents.
It works only if binary artifacts include
bin
andobj
of all projects in the solution. The size of all binary files is unfortunatelly more than 3 GB and downloading them to build agent takes nearly the same time as building the solution on each test agent which makes the approach useless.It is enough to publish
bin
andobj
(~300 MB) of all test projects to run all integration tests since it contains all requireddll
andpdb
. But it is not enough for code coverage - resultingcoverage.cobertura.xml
is empty.The good part is that working copy path is the same on all build agents but also doesn't seem to be enough. Also deterministic build (as described in this example) seems to be not enough and coverlet still produces empty
coverage.cobertura.xml
.Please, is there any way how to run tests and collect code coverage just from
bin
/obj
files of test projects without the need ofbin
/obj
from all solution projects?EDIT:
Source code is available on all build and test agents on the same path.
The text was updated successfully, but these errors were encountered: