function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
balraj singh 33balraj singh 33 

package promote failing due to low code coverage

Commands used :

A)sfdx force:package:create --name "XYZ" --description "Understand" --packagetype Unlocked --path force-app --nonamespace --targetdevhubusername hub
B) Create a Package Version
* sfdx force:package:version:create -p "XYZ" -d force-app --wait 10 -k l1b3rtY --codecoverage --releasenotesurl "http://example.com" --postinstallurl " http://example.com -v hub

C) Promote the package
* sfdx force:package:version:promote -p " XYZ @<<version>>" -v hub


We i try to promote the package but it fails

reason it shows is low code coverage and if we check code coverage of the package version it is only 12 percent.

but , we are creating package version using codecoverage parameter and it gives no error , also the when we deploy the package there are no issues.
Pcakage has only two apex classes and test class for then and all other are custom fields.