3

Successfully used testLoadData for a number of test classes for "regular" Sobjects. Have seen references to Stub Api Mocking Framework for one method to create test records for Big Objects in Apex but seems pretty advanced.

Is there a way to use the Static Resource and use Test.loadData(..) as documented here to add Big Object records for test classes? TestloadData(BigObjectName.Sobjecttype, 'Filename') does not seem to be working. Getting error:

Unknown field: xyz

  • 1
    Big Objects and SObjects have different characteristics. Test.loadData(..) is specific to load test data for SObjects only. If it's not documented to support Big Objects, you will not be able to load test data using this approach. – Jayant Das Jan 23 at 23:24
  • 1
    fflib Selector layer and apexmocks would be how I would go about this – cropredy Jan 23 at 23:35
  • Big Objects are CustomObjects as far as Metadata API. Only diff is __b – user2451 Jan 24 at 3:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.