Skip to main content
Is there a way to run all test classes in the org during the installation of an unlocked package? Currently, it does not run any  test classes during installation
3 réponses
  1. 17 août 2022, 22:05
    Hi Jit,

    Starting Winter ’21, It isenforced to have  75% code coverage. You will be able to create unlocked package versions even if code coverage is less than 75%, but such package versions can only be installed in scratch orgs and non-production orgs. In order to promote a package version from beta to released, you will have to have a minimum of 75% code coverage.

    You can use the CalculateCodeCoverage field in the Package2VersionCreateRequest object or the codecoverage CLI parameter on the force:package:version:create when you create a package version.

    Reference:

    https://help.salesforce.com/s/articleView?id=release-notes.rn_sfdx_packaging_get_ready_code_coverage.htm&type=5&release=226

    Please mark as Best Answer if above information was helpful.

    Thanks,
0/9000