3

I wrote 35 test methods in my test class to cover all the scenarios. When i ran the test class from Apex Test Execution code coverage is showing up as 58%. When i check the coverage in developer console it is showing only few methods.

When i ran the same class through eclipse the coverage is showing up as 98%.

I have cleared the test history but no use.

4
  • 1
    DevConsole is buggy.. Cant depend on it. Atleast thats my experience
    – Prady
    Jan 22, 2014 at 11:45
  • 1
    The last time I tried to use dev console for testing, I got internal server errors on around 50% of my test classes. Eclipse (aka the force.com ide) has been the most reliable for me. Jan 22, 2014 at 14:06
  • 2
    Sometimes it helps to clear your code coverage (yes, I know it's not an answer). The hiccups are kind of explained at the SF blog: blogs.developerforce.com/engineering/2013/11/…
    – eyescream
    Jan 22, 2014 at 23:47
  • There is no limitation, i believe. Once I have written 74 test methods to cover scenarios. So don't worry up to 74 (or more).
    – Ashwani
    Feb 21, 2014 at 17:36

2 Answers 2

2

No limitation on number of test methods. Don't rely on the developer console coverage. It is buggy. Only use Eclipse when you want to be sure about coverage.

0

You must rely on what eclipse is showing.Developer console is having some issues these days.

3
  • 4
    can you substantiate or illustrate what you are saying?
    – Bartley
    Jan 22, 2014 at 13:32
  • Is there any limitation on number of test methods in the Apex test class? Jan 24, 2014 at 10:03
  • @Kapil : no there isn't Feb 21, 2014 at 13:43

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.