I have created a lightning component and want to create a package for that i wrote a test class for apex class coverage too which is showing 100% code coverage but when iam trying to upload the aura component iam getting the following error.

No test methods found in the Apex code included in the package. At least 75% test coverage is required.

Can some one help here.

  • Did you include your test class in the package? – David Reed Jul 20 '19 at 13:12
  • My test class is not visible in apex classes is their any way where it can be found in while creating package – Pushpesh Bisht Jul 20 '19 at 13:15
  • Even my apex class which i created using developer console is not visible in package manager apex class section iam using sandbox. – Pushpesh Bisht Jul 20 '19 at 13:18
  • 1
    You cannot create managed packages in Sandboxes. Use a developer org for that or go with unlocked packages. – Christian Szandor Knapp Jul 20 '19 at 13:21

Remember to add the @isTest annotation to both the main class definition and each test method:

private class MyTestClass {

    @isTest static void MyTestMethod1() {
        // Unit tests here...

    @isTest static void MyTestMethod2() {}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.