You need to sign in to do that
Don't have an account?
Deployment with single Apex test taking 15+ minutes to even START the test run...
Here's what I've been staring at for 16 minutes so far.
Deployed via SFDX, specifying a single apex test to run, which has less than 40 lines of code. Takes only a fraction of a second to run in scratch org or sandbox.
But when I deploy to Production, all components are validated within a minute or two, then the status switches to 'Running {testname}'.... and stays that way. For literally 15 minutes or more. Before the test is even started.
I'm not finding a lot of posts on this issue. Plenty of people talking about the time it takes to actually run the test. But I'm talking about the time it takes to start running the tests. This isn't a one time thing, but it also isn't consistent. Sometimes the tests will begin running pretty much immediately. Sometimes I'll end up cancelling and redeploying because a 30 minute delay to START testing seems ridiculous even given Salesforce's standards. And when I do cancel and redeploy? Good chance it'll take a fifth of the time, for no apparent reason.
What I'd really like is some better communication during this process. Why is my test run delayed? What was prioritized ahead of it? How can I anticipate deployment times so it's not a complete crapshoot regardless of build size?
Before running a deployment, verify that the Apex Code log level is not set to FINEST. Otherwise, the deployment is likely to take longer than expected. If the Developer Console is open, the log levels in the Developer Console affect all logs, including logs created during a deployment.
Interesting point! I do indeed have Apex Code set to FINEST in production log levels, at least for Dev Console. I'm not sure if I had the dev console open during the deployment, so I will try both with it open and without and see if it impacts test time.
However, it it didn't take 16 minutes for the test to run... it took 16 minutes for the test to BEGIN its run.. so I'm not positive this is the reason.
https://salesforce.stackexchange.com/questions/8346/how-to-reduce-the-test-class-execution-time-while-deploying
currently working on an native Android app
Visit in the https://social.technet.microsoft.com/Profile/rrsoares
Read more in https://social.msdn.microsoft.com/Profile/rrsoares