I have a deployment of a trigger from sandbox to production. I do not have a class associated with this trigger but I get a code coverage error what am I f doing wrong
If you are deploying any trigger in Production, then you must write a test class for that trigger with no Test failure and more than 75% code coverage.
Take a look at below references that has test class example along with details on how to implement test class.
https://trailhead.salesforce.com/en/content/learn/modules/apex_testing/apex_testing_intro
https://jayakrishnasfdc.wordpress.com/2021/01/02/salesforce-apex-test-class-with-an-example-annotations-best-practices-of-test-class/
https://www.sfdcpoint.com/salesforce/test-class-with-example-salesforce/
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
All Answers
If you are deploying any trigger in Production, then you must write a test class for that trigger with no Test failure and more than 75% code coverage.
https://help.salesforce.com/articleView?id=000315564&type=1&mode=1
Thanks,
Take a look at below references that has test class example along with details on how to implement test class.
https://trailhead.salesforce.com/en/content/learn/modules/apex_testing/apex_testing_intro
https://jayakrishnasfdc.wordpress.com/2021/01/02/salesforce-apex-test-class-with-an-example-annotations-best-practices-of-test-class/
https://www.sfdcpoint.com/salesforce/test-class-with-example-salesforce/
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,