"Could not run tests on class <classId>" is returned for some classes while running tests
Last updated 2015-02-10 ·Reference W-2041419 ·Reported By 302 users
** Update **
This issue has not been fully resolved for some customers since the last bug fix was released. Updated details and workarounds are below.
** Issue Details **
Since Winter '14, running all tests may show some classes error out with the following error:
"Could not run tests on class <classId>"
where classId is a specific class ID.
This error is not accurate. Tests are being executed, but the rows in the ApexTestQueueItem table detail this error. The actual results of individual tests are displayed in the ApexTestResult table.
** Note **
This should NOT have an affect on your code coverage results. If you are concern about your Overall Code Coverage values being impacted by this error, please use the Force.com IDE (Or Eclipse + Plugin) with the Apex Test Runner panel enabled to execute tests. This will give an accurate break-down of which classes passed, failed, and the % covered for each class.
1) Go To Develop | Apex Classes and click Run All Tests
2) The Result column for some classes may show "Could not run tests on class <classId>"
Same error is returned if the affected classes are run individually.
In some cases, below configuration has been used as a workaround:
a) Go to Setup | Develop | Apex Test Execution
b) Click Options
c) Uncheck "Store Only Aggregated Code Coverage" AND check "Disable Parallel Apex Testing"
On the Apex Test Execution page, click on one of the rows that details the error. In the test result panel below, you will see which tests passes or failed.
Query the ApexTestResult table using the appropriate filter on TestTimestamp. This will correctly detail which results have failed and which have passed.
Use the Apex Test Runner panel in the Force.com IDE to run all tests.
Reported By (302)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.