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
Shannan Robillard 2Shannan Robillard 2 

Updating Apex class code by deployment from sandbox and validation test failed

I have ot update an Apex Class that logs into Citrix Sharefiel because we were forced to change passwords this week. I made the change in sandbox and deployed to Production. When I ran validation test, they failed saying that production did not have enough coverage. I have never done this before but apparently it more difficult that I thought it would be to just change the password in the code. How do I update the apex class? 
SabrentSabrent
After you made the change to your Apex class, did you cover that change in your test class? if not, then you should. 
Run the test class in the Sandbox and see the code coverage percentage. 
If it is below 75%, make sure to improve the test coverage. 
Look at the log output to get an idea which test classes you could work on to improve the coverage for other classes.

There could be other reasons, but this could be a good start.  
 
Shannan Robillard 2Shannan Robillard 2
I did not cover the change in my test class. However the code coverage % in production says 0. How would I go about improving that to 75%?