You need to sign in to do that
Don't have an account?
Rodolfo Calvo
Issue at creating a Package
If I create a package in salesforce for my app, an error is shown:
No test methods found in the Apex code included in the package. At least 75% test coverage is required.
I have more than 2000 lines of code in visualforce page and its controller. This requirement means that I have to re-write all my code??
Thanks in advance.
No test methods found in the Apex code included in the package. At least 75% test coverage is required.
I have more than 2000 lines of code in visualforce page and its controller. This requirement means that I have to re-write all my code??
Thanks in advance.
It means you will need some test coverage on the controller class you wrote.
All the code in your production org will need 75% coverage on average. Meaning, for example, if you have 90% coverage on a vast amount of code already, you can write tests to include some of the controller, and even if its under 75% for the one controller, as long as you are 75% for the org you will pass and be able to deploy.
It is always best practice to provide good test coverage on all code you are deploying to production.
More informaiton on test classes and coverage can be found here:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_test.htm
Hope this helps.
-derhyk
Would you please ilustrate me a little more, for example, let me show you a simple sample of code.
What's should I do here?
What would be the process to make my code work?
Thanks a lot.