You need to sign in to do that
Don't have an account?
SFDC coder
Deployment fails even when code coverage is >75%in sandbox
Hello All,
There are no classes and triggers on the production org and am moving the apex code for the first time. The deployment is constantly failing even if the code coverage is 79% in the sandbox. The reason is shown as code coverage in production is 66 %
I checked my classes and i haven't mentioned see all dtaa tru anywhere in the test class
Can anyone please help me solve this issue?
There are no classes and triggers on the production org and am moving the apex code for the first time. The deployment is constantly failing even if the code coverage is 79% in the sandbox. The reason is shown as code coverage in production is 66 %
I checked my classes and i haven't mentioned see all dtaa tru anywhere in the test class
Can anyone please help me solve this issue?
Here we can do only one thing...because it gives false result many times and this is known issue....you can check with eclipse or mavensmate if that is also same then we should see what to do else if they are giving less percentage then you can increase the coverage .....and actually you can increase it to above 90 then deploy....
Thanks,
Sandeep
All Answers
Are you checking code coverage from developer console, setup or eclipse in sandbox ? because sometime these three gives different results..
Go to setup --> classess--? click on estimate organization coverage that will show ypu overall how much it is ..check and let me knwo that is above 75%..
Thanks,
Sandeep
Thanks for your quick response.i followed your steps and it still shows 79 % . What else can be done?
Can you share the screen shot of both, sandobox code coverage result and production failure ?
Could you please the code covrage for your Production Organization.
Because Whenever your start deployment, the code covrage of production is also verified.
Hope its help you!!
Thanks!
below pic is of production
AS i mentioned earlier, the code coverage of produciton is 0 % since am moving the code for the first time in my production org
Thanks and Regrads
It seems weired and it is giving false no of percentage because if it is more than 75%, then it does not give this sentecne,which says you must have 75% to deplo..
can you check with mavensmate or eclipse if they are also giving the same percentage ?
As you mention ,There are no classes and triggers on the production org and am moving the apex code for the first time so the code covrage was not checked for production.
Please make sure the code covrage of production should be 75%.
we got the Problem !!!
Here we can do only one thing...because it gives false result many times and this is known issue....you can check with eclipse or mavensmate if that is also same then we should see what to do else if they are giving less percentage then you can increase the coverage .....and actually you can increase it to above 90 then deploy....
Thanks,
Sandeep
You can check one thing ,as you don't have seeAllData=true .You test record have some hard coded record id . Then it wil not match in production and will give less coverage .
Please cross check if you have less number of test class .
You were right. when i checked in eclipse it shows a different figure i.e 68 %. Thanks for your suggestion
@Manoj: Thanks for your reply as well
Best Regards,
SFDC coder