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
fernandotakaifernandotakai 

Problem with Code Coverage and Deploy

Hi!

 

I'm trying to deploy an Apex app i developed, and for that i covered 78% of my code with tests (trying to get to 100% :D).

But every time i try to deploy, an error message appears:

 

Apex Class    My Class    No testMethods found in the selected Apex code for the package

 

And that's not true, because if i click on My Class link, it shows that this class has 100% of coverage.

 

Is this happening because instead of testing my classes on the same apex class, i'm using separated classes for each test?

(like, for MyClassController.cls i have a MyClassControllerTest.cls that is a private class with @isTest).

Kevin BromerKevin Bromer

Having seperate test classes wouldn't be causing your problems, we use that model in a variety of internal projects. Are you certain the test class made it into the package along with the actual production class?