function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gslatergslater 

Unable to locate failing batch

Let me see if I have this right. 

 

We have a lot of classes/triggers, and a lot of batches.  We also have a lot of managed packages with code hidden.

 

So when I get a test failing and the message 'System.Exception: No more than one executeBatch can be called from within a testmethod. Please make sure the iterable returned from your start method matches the batch size, resulting in one executeBatch invocation. ' it should be easy right?  Identify the failing batch, use an if(Test.isRunningTest()) -> Limit 200 and done.

 

But how do you identify the batch that's failing?  There's no line number in the error message, and the ridiculous 1.9Mb limit of the debug log shows approximately nothing (even with log filters - blame static variables for that).  What's more, the batch could be in a managed package where I can't see the code.   I'd If anyone has any tips as to how I can get the failing batch I would be very grateful!

gslatergslater

Maybe I'm asking in the wrong place?  If so please let me know because this is interfering with all our deployments and I need to resolve it ASAP.