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
Ravi Kumar 259Ravi Kumar 259 

Two classes in that one with 0% code coverage & another with 90% code coverage. Can we send it to production?

SantoshChitalkarSantoshChitalkar
Hi Ravi,

Whenever you deploy classes, trigger to production, all the test classes runs again. Note that test coverage in production is calculated against the number of lines of code. If production has 90% code coverage for 1000 lines of code and now you are trying deploy class to production which has 100 line code then salesforce run all test classes again. Salesforce will check the test coverage for 1100  and if it is above 75% then you can deploy your new class even without test class.

Its all depends upon how much code coverage you have in production against #lines of code and how many lines and code you want to deploy.
Production + New code test coverage should cross 75%.

Let me know if you need more clarification on this.

Regards,
Santosh Chitalkar