Is there anyway to merge cobertura coverage xml reports together?

后端 未结 5 1866
时光说笑
时光说笑 2021-01-04 02:29

I have c++/c application with a lots of unit tests. I would like to get overall coverage and also individual coverage of each test with condition that each test can be run o

5条回答
  •  星月不相逢
    2021-01-04 03:11

    The simplest utility I've found for merging Cobertura files is cobertura-merge via NPM.

    Usage:

    npm install cobertura-merge
    cobertura -merge -o output.xml package1=input1.xml package2=input2.xml
    

    Or it can be used directly without installing through npx:

    npx cobertura-merge -o output.xml package1=input1.xml package2=input2.xml
    

    Examples sourced from the GitHub README for cobertura-merge.

提交回复
热议问题