I'm trying to find the list of all the metadatas objects that we can deploy to production without having to trigger the run of all test classes

For example I know that we can deploy ListViews, Reports, profiles... without running the test classes

Is there an exhaustive list?

  • 1
    There is an exhaustive blacklist and it's very short. Any change containing Apex code requires tests. – Adrian Larson Nov 29 '17 at 16:31

It depends on version of Metadata API. Here is a list of all metadata, that causes test execution before 34.0.

If the deployment includes components for the following metadata types, all local tests are run.

  • ApexClass
  • ApexComponent
  • ApexPage
  • ApexTrigger
  • ArticleType
  • BaseSharingRule
  • CriteriaBasedSharingRule
  • CustomDataType
  • CustomField
  • CustomObject
  • DataCategoryGroup
  • Flow
  • InstalledPackage
  • NamedFilter
  • OwnerSharingRule
  • PermissionSet
  • Profile
  • Queue
  • RecordType
  • RemoteSiteSetting
  • Role
  • SharingReason
  • Territory
  • Validation Rules
  • Workflow

If Metadata API is version 34.0 and higher, only deployment of Apex class or Apex trigger causes deployment test execution.

When deploying to production, all tests, except those that originate from managed packages, are executed if your deployment package contains Apex classes or triggers. If your package doesn’t contain Apex components, no tests are run by default.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.