Hello,
You would like to check
this useful post, theyhave same requirement as you,and seems got a way to gather the code coverage informationprogrammatically, hope can give you some advice.
Sincerely!
Please mark the replies as answers if they help and unmark them if they provide no help.