You need to sign in to do that
Don't have an account?
moverdorf
Managed vs UnManaged Code - Test results vary....
I cloned a class and ran my test class against BOTH the original and the cloned version.
The original says I have 48% coverage, the clone says 80%. The reason for the difference is that the original (managed code) says that the number of lines to test coverage for is 1036 and the cloned version (unmanaged code) says I have 612 lines to test.
My question now is, what is the difference when performing Test coverage on MANAGED vs UNMANAGED code?
Thanks!
Hi moverdorf,
If you have same code in controller and also in test class for both the classes (part of managed class and your newly cloned class ) then please compare the code coverage of your classes, definitely your class which shows 48% might contain some blank line and commented line and class which have 80% code coverage only took your actual code for test coverage (except commented line and blank lines) .
To remove this problem just edit your class from browser (not by eclipse or any other id ) and simply save it again and then after run your test class. I hope it will solves your problem.
If this post helps you then hit kudus by clicking on star and accept my post as a solution to your question.
I thought the same thing, that somehow the managed code was counting comments and whitespace lines as additional lines of code. The problem is once the code is deemed "managed" you can't click the Code Coverage link to see the covered/non covered lines of code.
I noticed that if I ran the test in Force IDE, the test comes back corect saying I have 82% coverage. So the issue is with the SalesForce interface.
Yes this is a problem at salesforce end and it's not a big issue these kind of test classes will automatically correct when you deploy that class to the production org.
If this post helps you then hit kudus by clicking on star and accept my post as a solution to your question.