Loading

'Could not run tests on class <classId>' error is returned for some classes when tests are run

Fecha de publicación: Apr 18, 2024
Descripción
Users receive the error "Could not run tests on class <classId>" where classId is a specific class ID, when running all the test class on UI.
 
Solución
This error is not accurate. Tests are being executed, but the rows in the ApexTestQueueItem table detail this error. Click on one of the rows that details the error, you will see which tests have passed or failed. 

The actual results of individual tests are displayed in the ApexTestResult table and we can query the ApexTestResult table using the appropriate filter on TestTimestamp. This will correctly detail which results have failed and which have passed. 

Note:
This will NOT have an effect on your code coverage results. If you are concern about your Overall Code Coverage values being impacted by this error, please follow the steps mentioned in the article on Code coverage steps before deployment and best practices


Additional References:
Número del artículo de conocimiento

000386334

 
Cargando
Salesforce Help | Article