How to merge two different jscoverage.json files?

586 Views Asked by At

I am taking coverage using jscoverage . Now the problem is after storing the report for say 15 times it stops working .So i get a report with some lines covered . Now if i again try to start the coverage freshly and try to merge the jscoverage.json of the new and the old files then it gets corrupted . Can someone suggest how to merge two jscoverage.json files ??

NOte: the coverage i am taking is for the same js file so directory and everything remains the same .

1

There are 1 best solutions below

1
On

You can merge reports using JSCover (successor of jscoverage). Use the following command,

java -cp JSCover-all.jar jscover.report.Main --merge REPORT-DIR1 REPORT-DIR2 REPORT-DIR3...DEST-DIR

See,

http://tntim96.github.io/JSCover/manual/manual.xml#reportMerging