You need to sign in to do that
Don't have an account?
Ty Whitfield
Can't Deploy Trigger Into Production
I have a Trigger and the associated Test Class that I have set up in our sandbox. According to the Developer Console, I have a 95% coverage onmy trigger after running the Test Class. However, when I try to deploy into production, I receive "Test coverage of selected Apex Trigger is 38.095%, at least 75% test coverage is required.
Any idea as to why this is happening or has anyone else had this problem lately?
1.Maybe any custom field or picklist value not present in production.
2.Have you use any restriction on trigger?? if yes then please true or false your restriction after insert or update in test class.
3.You can set debug log in production to find mistake or Exception.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Suraj
May be a reason:-
1.Should not use (SeeAllData = true) in Test class.
2. Updated trigger should be deploy.
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh