+ Start a Discussion
A chauhanA chauhan 

Code coverage error in production while deploying trigger

i have created trigger in sandbox that avoid duplicate record creation on account object . in sandbox it is showing 100% code coverage while deploying that trigger in production using change set it is giving code coverage error your trigger has 0% code coverage ,every trigger atleast  require 1% code coverage
sfdcMonkey.comsfdcMonkey.com
hi Chauhan
can you share your chnage set validaition screenshort Please :)
A chauhanA chauhan
code coverage error
sfdcMonkey.comsfdcMonkey.com
hi
try onces
when you validate changeset for test class
 in the Options for Change Sets
select --> Run Specified Tests -- >  and enter your test class name and then validate it .
Thanks
let me inform if it work
A chauhanA chauhan
same error is displaying for specified tests also not working 
Amit Chaudhary 8Amit Chaudhary 8
Are you deploying Test class with Trigger ? if no then please add same in change set
Are you using SeeAllData in your test class ? if yes then removew seeAllData and create test data in test class
 
Lawrence-AccentureLawrence-Accenture
Hi Chauhan,

Any update on whether you were able to get around this issue? Was it an issue with a missing test class, or with SeeAllData=true but missing data? Or was it something else?

If something else, did you get test class failures along with the 0% code coverage error? Or did all your unit tests pass, with the 0% code coverage error the only error that was raised?

-L