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
Salesforce Admin2Salesforce Admin2 

Deploying test classes, classes, triggers in a change set to production to increase code coverage in production

I wrote test classes to test my triggers and classes that reach 100 percent code coverage in the test environment.  So I created a change set that included the test classes for my triggers and classes but when I deployed the change set to production my code coverage still was only 67 percent.  It appears that the deployment did not test my test classes that was in the change set.  What are the steps in getting your new  test scripts into production>?
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi,

Please check if your latest modified test classes are in production.

 
Salesforce Admin2Salesforce Admin2
Hi
No, my latest test script are not in production and I do not know how to get them to production. i tried to deploy them along with the component they are testing but deployment failed due to low code coverage.
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi ,
Try to increase code coverage in sandbox itself and then deploy it to production.

 
James LoghryJames Loghry
The 67% is likey the entire aggregated code coverage across the org.  You're deploying a fix for a small subset of classes across the entire organization.  In otherwords, it sounds like although you're on the correct track to improving code coverage, you still have a ways to go.  You might also want to take a look at tests in production that utilize existing production data, which could impact your code coverage as well.  Good luck, and keep on fightning the code coverage fight.