Reputation: 1087
I have EntertainmentController
, and `EntertainmentControllerTestClass. Inside test class, I add test method refer to each method in the controller, all of them are empty methods so they all pass when run test. But when I upload to package application, I got the message:
Upload Failed:
No test methods found in the Apex code included in the package. At least 75% test coverage is required.
Upvotes: 0
Views: 785
Reputation: 808
Apex Tests have to actually test your business classes. Having empty tests serves no purpose. You must write Unit Tests that validate the code in your EntertainmentController class. The Unit Tests must result in 75% of the code in the EntertainmentController being executed without failures during test execution. Also, when you add your Apex Classes to your package, you have to add both your EntertainmentController and EntertainmentControllerTestClass.
Upvotes: 1