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
prageethprageeth 

Where do I need the 75% of test coverage

Hi All;

I know it is required to have a 75% of test coverage in order to upload a package. And I know that if a test method fails at the moment the user installs my package, he gets an error.

What I want to know is that is it required to have a 75% of test coverage, at the moment that the user installs my package in his organization.

(Ex:- According to the data in users organization test coverage can be less that 75%. I want to know whether it is allowed.) 

 

(If my question is not clear enough, Im ready to supply more info.)  

 

Message Edited by prageeth on 11-10-2009 08:07 PM
Best Answer chosen by Admin (Salesforce Developers) 
Cool_DevloperCool_Devloper

Ok .. i got ur ques now!!

 

Well, if it is not having any reference to an existing code in the account you are installing your package, then just the code coverage which you had while u developed the package should be 75%.

 

But in the other case, you might face some issues and the code coverage might get affected as then overall should be 75% at the time of install!

 

Cool_D

All Answers

Cool_DevloperCool_Devloper

Prageeth,

 

if the overall code coverage comes to more then 75%, then still you can move the package even though some of its component's indivdual coverage might be less then 75%.

 

Cool_D

prageethprageeth

Hi 

Thank you very much for the reply. Actually what I want to know is little bit different from your answere. I think my question was not enough clear. I can clarify it as below.

For an example, the overall test coverage of my application can be varied according to the Account in which the application is going to be installed. 

It means although the overall coverage is 78% in my account, it can be 77% in another account.(I think you will agree with me.)

Then what I want to know is that, is it required my application to have a 75% of overall test coverage upon the account in which the application is going to be installed.

Simply, if you are going to install my package, should my package have a 75% of coverage "at the moment you installs" it.(Not at the moment I package it)

(If my question is not clear enough, Im ready to supply more info.) 

 

 

 

Cool_DevloperCool_Devloper

Ok .. i got ur ques now!!

 

Well, if it is not having any reference to an existing code in the account you are installing your package, then just the code coverage which you had while u developed the package should be 75%.

 

But in the other case, you might face some issues and the code coverage might get affected as then overall should be 75% at the time of install!

 

Cool_D

This was selected as the best answer
prageethprageeth

Hello Cool_Developer;

Now I got some light. Could you please further clarify what you meant by "any reference to an existing code".

 Did you mean an Apex class in users account or any other sObject? Thanks.

Cool_DevloperCool_Devloper

Yes ... that's correct!!

 

Cool_D

prageethprageeth
Thanks Cooool_D..!!