Facing issue in my batch test class. I am inserting simple Account and Opportunity in my test class. If we set(seealldata = false) the class fails in the sandbox and getting below error

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, EventbriteSync.EventbriteOpportunityTrigger: execution of AfterInsert
caused by: System.NullPointerException: Attempt to de-reference a null object
Trigger.EventbriteSync.EventbriteOpportunityTrigger: line 4, column 1: []

Facing the issue in 'Eventbrite OpportunityTrigger' which is from the managed package and we can't see the code.

If I set (seealldata = true) in test passes in the sandbox but we will get below when moving to Production

System.UnexpectedException: No more than one executeBatch can be called from within a test method. Please make sure the iterable returned from your start method matches the batch size, resulting in one executeBatch invocation.  Stack Trace: External entry point

There any way to fix this? Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.