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
Pallavic14Pallavic14 

I'm trying to validate change set in LIVE. I get error Average test coverage across all Apex Classes and Triggers is 52%, at least 75% test coverage is required.

Hi,

I'm not so experinced in APEX developement, I have developed a VF page and controller and to cusomtize convert button. Everythign works fine in sandbox.
When i try to move to LIVE. I get this error message.

Average test coverage across all Apex Classes and Triggers is 52%, at least 75% test coverage is required.

I see each of my test calss seperately says 100 % coverage. But overall coverage is only 52%.

I saw posting and does'nt seem to be having perfect solution.
I really appreaciate if some one can help me how i can increase test code.


Thanks
Pallavi
bob_buzzardbob_buzzard
That sounds like you have some code in your production org that isn't covered by testing.  If you run all unit tests do you see any errors?  I'm afraid you'll have to fix that before you can deploy your change set to production, even though its not your code that's at fault.
Sonam_SFDCSonam_SFDC
When you run the test classes through Developer Console, it will give you the lines  in the apex classes which are still not covered through the test classes...check these and based on this alter your test classes(add system asserts where necessary) to increase the code coverage 
Pallavic14Pallavic14
No error when I run test. Only error I see is when validate change set.