4

I've got a class and test class that I know are at least 75% covered, but for some reason when running from the Developer console, although all tests pass, code coverage remains at 0% and doesn't show any coverage information.

Thinking this might just be an issue with the Developer console, I've tried this through MavensMate and got the same result and deploying code to an older org but still get the same problem.

I'm assuming this might be linked to the recent release but I wanted to know if:

  • There's a fix (even if it means contacting Salesforce Support)

OR

  • There's a workaround

Developer Console Tests

4
  • 1
    did you try by running Run all Test? there are some issue going on with this in winter release success.salesforce.com/issues_view?id=a1p30000000eMoyAAE
    – Himanshu
    Oct 27 '15 at 10:03
  • Since I see coverage of all the tests as 0, Are you storing only aggregate code coverage? You can check it by going to apex test execution and clicking options button
    – manjit5190
    Oct 27 '15 at 10:04
  • Close all open classes for which you are running test. Reopen dev console. And run test.
    – Ashwani
    Oct 27 '15 at 10:07
  • Thanks for pushing me in the right direction guys. Posted my answer below.
    – Dan Jones
    Oct 27 '15 at 10:16
6

Got it.

Turns out the problem was to do with running tests asynchronously. Checking the "Always Run Asynchronously" box fixes it for me. Novice oversight there.

enter image description here

Hopefully anyone with a similar problem will get a bit of help from this.

enter image description here

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.