1

Hi i have a changeset which has 2 apex class and their test classes with 65% and 80% individually test coverage, if i choose a option of run specified test, will that be deployed? Because one of apex class is having 65%, do it require 75% for individual components?

3

No, it will not deploy. If you choose a test level of less than RunLocalTests, each unit will be required to achieve 75% coverage each, regardless of the average. Either run all tests, or fix the tests so the 65% coverage file achieves at least 75%. This in the release notes and documentation:

When running a subset of tests, code coverage is computed for each class and trigger individually and is different than the overall coverage percentage. If your deployment package contains Apex classes and triggers, the executed tests must cover each class and trigger for a minimum of 75% code coverage. --Emphasis mine

  • When you deploy an inbound change set with an apex class and an apex test class, does the change set validation run the tests that were uploaded in the change set or those already in the org? – Mark Crawford Jun 19 at 15:36
  • @MarkCrawford As long as the test is included in the change set, the new version will be run. – sfdcfox Jun 19 at 15:43

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.