+ Start a Discussion
Wayne_ClarkWayne_Clark 

Test Coverage - Avoid by installing a managed package?

This post stems from another post about our orgs issue with overall test coverage issue, the link to the previous post is here:

http://boards.developerforce.com/t5/Apex-Code-Development/Code-Coverage/td-p/257383

 

We found out that there were some classes installed in our production that do not have any code coverage and is bringing our overall coverage to around 35%.  There is also a managed package installed that is causing test failures.  These issues are not allowing us to develop and deploy any custom code.

 

If I developed custom code in a developer org and deployed the custom code we need as a managed package, would it deploy OK?  I've installed other managed packages into our production so I'm thinking this may be the way to go. 

 

Any suggestions or advice?  Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
metaforcemetaforce

Hi Wayne, the situation sounds complex as far as code coverage os concerned and you'll definitely need to spend good amount of effort to bring it to a sane state somehow otherwise you will run into this problem everytime you try to move your code to production!

 

But yes, your approach of installing managed package can definitely work. When installing the package, you can opt to ignore test method failures which will allow you to proceed with the installation. Drop me a message if you neeed any suggestion/assistance.

All Answers

metaforcemetaforce

Hi Wayne, the situation sounds complex as far as code coverage os concerned and you'll definitely need to spend good amount of effort to bring it to a sane state somehow otherwise you will run into this problem everytime you try to move your code to production!

 

But yes, your approach of installing managed package can definitely work. When installing the package, you can opt to ignore test method failures which will allow you to proceed with the installation. Drop me a message if you neeed any suggestion/assistance.

This was selected as the best answer
Afzal MohammadAfzal Mohammad

I just wonder if salesforce premium support team can help getting rid of classes (with no code) from a production instance.

 

Afzal

Wayne_ClarkWayne_Clark

We did have our managed package provider who has premium support put a ticket in with Salesforce on how to go about removing these components.  Salesforce did respond to them and our managed package providers response to me was "I checked the case and there is some feedback.  to make a long story short we need to uninstall each item manually as there is no script to automate it." 

 

So I'm assuming Salesforce will leave it up to us to remove them if need be. I am just not sure if we're actually using them or not, they have code, just no test code to cover them, I know some are being used for a job board, but am not sure if the others are or not.  There was a consultant long ago that put these classes in or org without test code, they only used a dummy test class to increase the overall code coverage in order to put there classes in.