Ability to export the unit test coverage in the json format and push it to the repository automatically
The sfdx CLI has the ability to generate a report of the unit test coverage in JSON format with the default naming convention test-result-codecoverage.
I would like to be able to retrieve this JSON file and push it automatically to the repository on every unit test execution.
As an example please find a possible sfdx command to achieve it: - sfdx force:apex:test:report --testrunid 7075J00001NZBNIQA5 -c -r json -d folderDirectory #testRunID is the value from the ApexTestResult obj AsyncApexJobId field
Please find more information on the official salesforce documentation about it https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_testing.htm
![](https://secure.gravatar.com/avatar/b6c2be9a7b0901332332cc71b0c1f4c7?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)