Property 'apexTestAccess' is not allowed

Issue #2373 resolved
Gunther Roskams created an issue

Following the documentation on https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_unlocked_pkg_unpackaged_md.htm, you are able to use the apexTestAccess setting to assign permission sets and permission set licenses to the user in whose context your Apex tests get run at package version creation.

During the configuration of the sfdx-project.json file, you ‘ll retrieve the warning Property 'apexTestAccess' is not allowed. Screen in attach. When you configure the apexTestAccess setting in the same directory as the packageDirectories, you don’t have a warning (but you are not able to create your package version with code coverage)

{
  "packageDirectories": [
    {
      ...
      "apexTestAccess": {
        "permissionSets": [
          "ConsentManagementConfigurator",
          "ConsentManagementDeveloper"
        ]
      },
      ...
    }
  ],
  ...
}

Comments (2)

  1. Scott Wells repo owner
    • changed status to open

    Thanks for logging. Looks like it was added to the JSON schema, in Summer '21, but at the incorrect level. I've resolved that now, and the fix will be included in Monday's Summer '23 update.

  2. Log in to comment