I have an APEX controller that writes to a Big Object. How do I unit this? During an insert operation insert I get an error:

Unsupported External Object Operations.

1 Answer 1


I found these two references in the documentation for Big Objects:

Any Apex tests that use DML calls will fail and potentially insert bad data into the target big object. This data won’t be deletable. To test DML calls, use a mocking framework with the Apex stub API to contain calls to the target big object.

So it appears you will need to Mock the Big Objects for your test cases.

  • ApexMocks addresses second bullet; Force.com Enterprise Architecture patterns - Unit of Work layer is one pattern I've used to deal with these issues + apexMocks
    – cropredy
    Feb 28, 2018 at 22:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .