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
lopezclopezc 

Test Coverage

hi All,

I don't really understand the Test coverages. Could you please help me with this?

When I modify a trigger that already exists in production I change it and modify it in sandbox but after I see that it is working correctly I modify it directly in production through the Force.com project. I could do more test coverage in production to see if it is also working correctly in production but the trigger is already deplyed in production because I changed it manually using Eclipse.

I would like to know if it is damangerous and if there is another way to do it more secure.

Thanks.
jyotijyoti
I think the preferred path is to promote from a Sandbox to Production.  I've run into instances where I didn't and even though the save looks like it went through, sometimes the code does not get updated because of inadequate test coverage or another error.  Promoting via Eclipse will give you these such messages.
lopezclopezc
Ok, Thanks for your reply.

So if I am creating a new trigger I will have to do a test coverage in sandbox and deploy it to production.
Can I do that in Eclipse just clicking right on the trigger code and clicking on "Force.com" and "deploy to Server.." ??? In the new window that appears it only let me to introduce the production SOAP endpoint. I am very scare about everything related to the production server. I don't really like to touch it if I am not sure that I am doing well. Could you please help me with this?

Thanks!

jyotijyoti

Yes create the trigger and test class in your Sandbox.  Run a test to make sure you are ok.

Then using Eclipse you can deploy to Production as you said.  Force.com > Deploy to Server.  You'll log in to the destination (Production), select the components / artifacts to promote, click the Validate Deployment button, and Next and it will be promoted if it passes all the validations, checks, etc.

iperez_geniusiperez_genius
i was wondering how i promot my sandbox class and trigger to production class and trigger...

at the moment i am trying to deploy from eclipse but i only have a test coverage of 54% where as in my sandbox it has a test coverage of 100%

can you explain what i need to do please


Ilan