ryanwilsonperkin/pytest-circleci-parallelized

Question: how to get code coverage with parallelism?

Closed this issue · 2 comments

danvk commented

Neat tool! I'd love to use it, but we also use pytest to collect code coverage data. It seems like this would be tricky with parallelization since you'd need to join the coverage data at the end. Have you tried this? Do you have any pointers? Thanks!

@danvk CodeClimate has a tool to convert each partial coverage output into a universal json format which it is then joined in the end to get the overall coverage data. I followed this guide and applied all steps to pytest, you can check out my circleci config here: digitalfabrik/integreat-cms

Thanks for the details there @timoludwig, yes in order to capture complete coverage you'll need to take steps to combine the coverage artifacts from each runner. If someone is interested in contributing documentation for doing this I'd be happy to include it. In the meantime I'll close this issue as combining coverage is something that'd be out of scope for this tool.