+ Start a Discussion
viktorVviktorV 

Failed deployment

I had an APEX class which sends out a specified email to the given address with some lead details, then updates the lead.

I've completed the class with a simple function, it inserts a completed task  assigned to the lead.

The class works fine in Sandbox but deployment is failed. In the result I get the next failures: all my active triggers are listed with problem: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required"

 

What's wrong?

 

Thanks for the answers!

Best Answer chosen by Admin (Salesforce Developers) 
grigri9grigri9

To deploy any triggers to production you have to write test code to verify that they are working properly. The Developer's Guide has more information on writing test code.

 

 

 

All Answers

grigri9grigri9

To deploy any triggers to production you have to write test code to verify that they are working properly. The Developer's Guide has more information on writing test code.

 

 

 

This was selected as the best answer
viktorVviktorV

thanks, I'm already know it.

Anyway, till this time I've never had to write a test method, all of my triggers and classes could get deployed without it. What's the reason?