Validation Deployment is always running test in Production

You may have noticed that the test classes run most of the times in production when doing a recalculation of the flow even though you have set the Environment with Run all tests False and the Deployment Flow Step with Test Level "No Test Run".

Copado will request a validation deployment to the Production environment with testLevel - NoTestRun which is correct and match the settings in both the deployment step and environment but, since the validation is being made in Production, Salesforce might enforce the TestRun depending on what is being deployed (validated).

"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."

You can check if the package in the validation will contain a class from the manage branches page specific to the environment that is deploying to production. If the Merged Files contains a class, Salesforce will enforce all test except those that originate from managed packages.
User-added image


How did we do?