I have been struggling with this error since two days ago. For certain classes, I cannot run the test and getting error of [cannot run test on class xxxxx].

I followed most the answers like 1) clear test results 2) Disable parallel running etc.

But it couldn't resolve this issue.

For now, I use to run the method from Eclipse and rerun from the UI, sometimes it works correctly.

1) Is this Salesforce's bug?

2) How can I overcome this issue?

3) And if I run test class from Eclipse, I sometimes can't see the debug log too. How I can fix it?

Because my workaround is so troublesome to do (running from Eclipse and then UI). Plus running from Eclipse takes time and I can't do anything in Eclipse while test is running. and it sometimes cannot solve the issue.

Any advice will be helpful for me.

  • Yep, still getting this error today, end of January 2014, for about 5% of random classes when running multiple tests via UI. The details say that the methods had passed, but overall says couldn't run. weird. Does this with disabled parallel testing too. Jan 23 '14 at 22:22

I tried the workaround prescribed in this known issue:


It was not working reliably for me either. I have a dev org with 79 classes with unit tests, and about 1/3 of them were still not running after disabling parallel testing and storing only aggregated code coverage. Then I clicked the "View Test History" link and cleared test results. This seemed to clear up the problem, allowing me to run all of my tests. Give it a shot.

update: As of 12/24, it looks like this issue has been marked as fixed: https://success.salesforce.com/issues_view?id=a1p30000000T0FeAAK. I was successful in running my unit tests in parallel, with detailed code coverage results.

  • clearing the test history doesn't solve the problem. The weird thing is even I get "test couldn't run" message, the result for the methods are "pass". So I deploy those classes to Production, still able to deploy successfully. I hope salesforce will solve it soon, cause so misleading.
    – kitokid
    Dec 7 '13 at 2:20
  • Hmm... all I can say is that it definitely did help me. I even had the problem resurface, and then just cleared the test history, and it cleared up again. Just to double check, you disabled parallel testing and changed the settings to store only aggregated code coverage too, right?
    – tlfu
    Dec 10 '13 at 11:59

Same thing happened to me tonight, and I found my own post:

"Could not run tests on class ..."

I clicked Store Only Aggregated Code Coverage and then all my tests passed as expected.


I am also facing the same behavior in some of my test classes...

some times following the workaround (disable parallel testing and store only aggregate coverage) works some times it doesn't

The good news is that it is a known issue and I guess it will be fixed soon. you can check the status here


  • seem like the workaround doesn't work for me though. I hope it will be fixed soon.
    – kitokid
    Nov 13 '13 at 9:34

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.