function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike_M_2Mike_M_2 

running tests, coverage, old prod org

The situation is this:

I have a production org where various changes over time MIGHT cause tests (which originally passed) to now fail. What happens if I run all of the tests in Prod, but the 75% is not met? Will the Prod Org suddenly disable it's self and stop working? 

 

ALSO, I've developed some new classes and pages in my DEV org. I've written the test classes and everything is good ... more than 75% coverage. So the question is: If I migrate just those new classes to production, will tests automatically run for just those NEW classes, or will ALL tests for everything in Prod run??? Assuming it will run ALL the tests, what happens if the 75% coverage is not met?

 

Thanks,

Mike

Best Answer chosen by Admin (Salesforce Developers) 
craigmhcraigmh

The Production instance will be fine, you just will not be able to deploy code to it until you fix the test classes.

All Answers

Suresh RaghuramSuresh Raghuram

It will also run for the whole class, just because of that even the new clases that you are deploying may have 97% code coverage . When deploying it will show you more or less than 75% of the whole code .

so make sure the code coverage in production should be 75 % or more when you are adding the new classes.

 

If this answers your question MAke this as solution.

craigmhcraigmh

The Production instance will be fine, you just will not be able to deploy code to it until you fix the test classes.

This was selected as the best answer