• Dave Scott (UK)
  • NEWBIE
  • 0 Points
  • Member since 2016
  • Mr


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

Hi folks,

Please help!?

I'm not a developer and never deployed anything from Sandbox to Production and i've just joined a new company and they have an Apex Class (not written by me) that I need to make some very minor changes to (just need to add three lines of code to a Class that is already 688 lines long).

I've succesfully added the three lines of code to the Apex Class in Sandbox and the class now seems to do what it's suppose to do and works without any issues.

The problem I have now is Deploying it and this is where I'd like some help.

Here's what i've done so far:
1. Refreshed Sandbox, Logged into Sandbox, edited the Apex Class, Saved it, tested functionality - all ok
2. In Sandbox Setup, select Apex Test Execution and run the test on the original Test Class which has NOT been edited and it passes Test 1 & 2
3. Create new Outbound Change Set and add the Apex Class that i've made changes to but add no dependancies as no changes have been made to them.
4. Upload the Change Set
5. Log in to production org, locate the change set under Inbound Change Sets, select Deploy and select to run specified tests choosing the same test used when using the 'Apex Test Execution'
6. Deployment fails saying it only covers 63% of the code.

Why is this when running test in Sandox seems to be fine?

I also tried modifying the test class in sandbox and again run the 'Apex Test Execution' function under setup and all is fine, however when I try to upload both the updated test class and the updated Apex class, I'm still getting the same error.

Please help me understand how I can get this Apex Class deployed into production.

As I mentioned I'm not a developer so would appreciate step by step directions if possible of where I might be going wrong.

Many thanks,
Dave

Hi,

We have an Apex Class that we need to add two lines of code to.

We've tested the code in Sandbox and used Eclipse IDE software to make the changes and seems very easy to make the changes by right clicking on the code in Eclipse and selecting 'Save to Server'.

I'd like to know when we come to deploy the changes in our production org is it just as easy to do, i.e. open up the production Apex Class in Eclipse, add the two lines that we verified works fine in Sandbox and simply just right click and select 'Save to Server'?

Is that or am I missing something?

Many thanks,
Dave