+ Start a Discussion
Sudha SalesforceSudha Salesforce 

Failed to enqueue tests.: An unknown exception occurred

On clicking Run All  getting this error. Please help.
Failed to enqueue tests.: An unknown exception occurred
NagendraNagendra (Salesforce Developers) 
Hi Sudha,

The reason for this error is you have hit the maximum salesforce limit. You will get this if you're using other than Unlimited Edition. You have to wait for 24Hr to get reset.

For more information on this error, you may contact Salesforce support team so that they can address this error at the earliest.

You may cSalesforceesforce support here: Hope this helps.

Please mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Thanks,
Nagendra
Andrew WeinsteinAndrew Weinstein
I've encountered this problem in several different ways today, and I'm nowhere near my API limit (4000 out of 15000). I'll describe it as well as I can.

Background: I was working in Sublime + MavensMate yesterday, compiling code on my Salesforce org and running Apex tests with no problem. I finished working on a remote Git branch and merged into master, and - for lack of a clearer description - everything is now messed up.
  • First problem: in Sublime + MavensMate. Compiling works fine, but attempting to run any Apex test fails with this error: "Result: [ERROR]: An unknown exception occurred."
    • stack trace:
    •     at HttpApi.getError (/Applications/MavensMate.app/Contents/Resources/app/node_modules/jsforce/lib/http-api.js:250:13)
    •     at /Applications/MavensMate.app/Contents/Resources/app/node_modules/jsforce/lib/http-api.js:95:22
    •     at tryCallOne (/Applications/MavensMate.app/Contents/Resources/app/node_modules/promise/lib/core.js:37:12)
    •     at /Applications/MavensMate.app/Contents/Resources/app/node_modules/promise/lib/core.js:123:15
    •     at flush (/Applications/MavensMate.app/Contents/Resources/app/node_modules/asap/raw.js:50:29)
    •     at _combinedTickCallback (internal/process/next_tick.js:67:7)
    •     at process._tickCallback (internal/process/next_tick.js:98:9)
  • second problem: Eclipse + Force.com IDE
    • When attempting to run all tests: "[{'message':'An unknown exception occurred.','errorCode':'UNKNOWN_EXCEPTION'}]"
    • When attempting to run a single test: "[{'message':'Your classId property is missing or null. Provide the ID of an Apex class that has test methods, and use this format: \"classId\":\"<classId>\"','errorCode':'INVALID_INPUT'}]"
    • THE ONLY THING THAT WORKS:
      • right click on a single class -> Force.com -> save to server
      • select "No" when asked whether to cancel deployment and open Sychronize
      • select "Yes" when asked whether to save/overwrite
      • run only that single test class
  • third problem: running tests in Salesforce.com developer console
    • this happens much less often, and is seemingly at random
    • error message says "failed to enqueue tests: an unknown exception occurred"
  • Other possibly relevant information:
    • ant deployCode works just fine
    • the code executes without any problems on my SF org
    • I'm nowhere near my API limit (about 4000 out of 15000 max in past 24 hrs)
Please help. Thanks!
Andrew WeinsteinAndrew Weinstein
Also - I know that's not an answer, but it wouldn't let me post a new question with the same title.