5

I'm running a package build on our packages to get the --codecoverage parameter like so:

sfdx force:package:version:create -p myPackage -w 100 -x -v DevHub  --json --codecoverage

This runs, and returns

Request in progress. Sleeping 30 seconds. Will wait a total of 6000 more seconds before 
timing out. Current Status='Initializing'
Request in progress. Sleeping 30 seconds. Will wait a total of 5970 more seconds before 
timing out. Current Status='Initializing'
Request in progress. Sleeping 30 seconds. Will wait a total of 5940 more seconds before 
 timing out. Current Status='Verifying features and settings'
Request in progress. Sleeping 30 seconds. Will wait a total of 5910 more seconds before 
timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5880 more seconds before 
timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5850 more seconds before t. 
timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5820 more seconds before 
 timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5790 more seconds before 
timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5760 more seconds before 
timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5730 more seconds before 
timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5700 more seconds before 
timing out. Current Status='Verifying metadata'
Request in progress. Sleeping 30 seconds. Will wait a total of 5670 more seconds before 
timing out. Current Status='Finalizing package version'
Request in progress. Sleeping 30 seconds. Will wait a total of 5640 more seconds before 
timing out. Current Status='Finalizing package version'
sfdx-project.json has been updated.
Successfully created the package version [08c1v000000TQdqAAG]. Subscriber Package Version 
Id: 04t1v000001YYHFAA4
Package Installation URL: https://login.salesforce.com/packaging/installPackage.apexp? 
p0=04t1v000001YYHFAA4

But codecoverage isn't shown at all. Am I missing something here? This is when using sfdx-cli/7.73.1.

5
  • 1
    Are you doing this in a Winter 21 org? Odds are, it won't work in an existing Summer 20 org.
    – sfdcfox
    Commented Sep 11, 2020 at 10:28
  • Correct @sfdcfox . That's the problem. And the Preview window closed yesterday.
    – akarnid
    Commented Sep 11, 2020 at 11:16
  • You should be able to make a Winter '21 preview scratch org, but you won't be able to create packages there. You may well have to wait until the actual release at this point. You could try asking for a Winter '21 sandbox, maybe Support could help with that?
    – sfdcfox
    Commented Sep 11, 2020 at 11:19
  • In the short term, can't you simply use sfdx force:apex:test:run --codecoverage to get Apex coverage? Or am I missing something...?
    – Phil W
    Commented Sep 11, 2020 at 11:32
  • well, won't the dev hub have to be on Winter'21 as well (Which is my production org).
    – akarnid
    Commented Sep 11, 2020 at 11:41

1 Answer 1

0

When you run the package version command with --codecoverage flag what happens is the code coverage is calculated in the backend.

You can then see the code coverage by listing the package versions for the package using the below command

sfdx force:package:version:list -p <packaged> --verbose
2
  • Doesn't this require the dev hub org being on Winter 21? My dev hub is my production org. Can I specify more than 1 dev hub ?
    – akarnid
    Commented Sep 14, 2020 at 21:23
  • It does require your dev hub to be on winter 21 as well. It’s not recommended to change devhub Commented Sep 14, 2020 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .