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
Daniel MuirDaniel Muir 

Apex test classes

Do we have to run test classes for classes created in sandbox if they are for our own production org?
The code works perfectly well in our snadbox, but we have not created any test classes for it yet. 
Best Answer chosen by Daniel Muir
Davy HuijgensDavy Huijgens
You will need test classes to be able to deploy to a production environment. Total coverage needs to be 75%.

You can run your tests from the developer console, from the menu option Test choose run all to get an overview of your current coverage. More info can be found here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_code_coverage_best_pract.htm

All Answers

Davy HuijgensDavy Huijgens
You will need test classes to be able to deploy to a production environment. Total coverage needs to be 75%.

You can run your tests from the developer console, from the menu option Test choose run all to get an overview of your current coverage. More info can be found here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_code_coverage_best_pract.htm
This was selected as the best answer
Daniel MuirDaniel Muir
Thanks Davy. 

Was just checking as we seemed to have some unmanaged packages in our system which did not have code coverage, but think they had simply not been tested again in our production was all.