+ Start a Discussion
Lokeswara ReddyLokeswara Reddy 

CPU time out error with test class

Hi All,

Any best practices around handling CPU time out error for test classes?
The error from the deployment really doesn't give any clue on why it is taking too long for test class execution.

Michiel van FeliusMichiel van Felius
With the new summer '19 release I also notice more CPU time limit errors. I think this is releated to the 'fix' of 'Apex CPU time limit is not enforced if an Apex test runs in synchronous mode': https://success.salesforce.com/issues_view?id=a1p3A0000008q7VQAQ

However the best way to debug the timeout is by using the Developer Console Log Panels (Stack tree, Execution Stack, Execution Overview) which you can find by navigating to Developer Console -> Debug -> View Log Panels..

Kind regards,