function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ryanelkinsryanelkins 

Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

I have 7 triggers - they are all at 100% code coverage according to the Develop -> Apex Triggers page save for 1 at 76%. 

 

When I do a "Run all Tests" from Develop -> Apex Classes I am sitting at 85% code coverage. 

 

However, when I try to upload my package it fails with a "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required."

 

What gives?

Best Answer chosen by Admin (Salesforce Developers) 
ryanelkinsryanelkins

Solved my own problem minutes later - the class containing all the tests for the triggers has to be included in the package - I had inadvertently left it out.

All Answers

ryanelkinsryanelkins

Solved my own problem minutes later - the class containing all the tests for the triggers has to be included in the package - I had inadvertently left it out.

This was selected as the best answer
admintrmpadmintrmp

I am also getting this problem but everything in the package is uploaded.

 

When I run tests, all the triggers have at least 1% coverage.