Apex Test Run While Deploying

The Test Level deploy options are the followings:

  • Run No Tests - No Apex test are run unless it is production deployment.

When deploying to production, Salesforce does not allow No Test Run, and it will force a Run Local Tests. Also, when deploying to production, it is possible to use the option Run Specified Tests. However, in order to benefit from this option, you will need to include in the same step altogether with the Apex classes and the Apex test classes which must provide at least 75% of coverage of the code being deployed.

  • Run Specified Tests - This option allows you to determine which tests you specifically want to run. This is great for deployments to staging sandboxes and provides you with the most control possible.

  • Run Local Tests - This option will run all tests in your organization except ones that originate from installed managed packages. This test level is the default for production deployments that include Apex classes or triggers. This is a great option to run tests that you’ve written, and which are under your control but ignoring those that may come with managed packages or installed apps. It can be a big time and frustration saver.

  • Run All Tests in Org - This option runs all tests in your Salesforce org, including third-party tests from managed packages.

  • Specified and Package Tests - This is an additional test level provided by FlexDeploy. It automatically selects all test classes available in the package and allows the user to further refine the selection by adding or removing test classes. This option provides flexibility and control, ensuring comprehensive testing of package-related changes while allowing for customization based on specific needs. By automatically selecting all test classes in the package, it saves time and ensures that no relevant tests are missed.

Reference screenshot is here -

2-TestLevels.png

 

The following macros are not currently supported in the footer:
  • style