Add code coverage in xcode autocreated schemas

I've created an xcode workspace with path to multiple local packages, and an embed demo app, to simplify the development of our libraries.

Every package has its logical unit tests, and everything run fine. Xcode generate for each package a library target, a test target, and then there is an app target for the demo app

How can i gather the code coverage for each package? Is there any package configuration in the Package.swift that enables this tool? If a try to customize the autogenerated test plan everything breaks or the autogeneration fails after the first editing