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
Hitendra SabhadiyaHitendra Sabhadiya 

How to create test data for Bigobject in Test Class ?

Raj VakatiRaj Vakati
Create same like SObject 
 
Customer_Interaction__b bo = new Customer_Interaction__b();
bo.Account__c = “001R000000302D3”;
bo.Game_Platform__c = “PC”;
bo.Play_Date__c = “2015-01-01T23:01:01Z”;
bo.In_Game_Purchase__c = “A12569”;
bo.Level_Achieved__c = “41”;
bo.Lives_This_Game__c = “3”;
bo.Score_This_Game__c = “5500”;
bo.Play_Duration__c = “25”;
database.insertImmediate(bo);

 
Raj VakatiRaj Vakati
Or Use Build a Mocking Framework with the Stub API

https://developer.salesforce.com/docs/atlas.en-us.bigobjects.meta/bigobjects/apex_testing_stub_api.htm
Hitendra SabhadiyaHitendra Sabhadiya
Hi 

Solution Which you Provide like below

Customer_Interaction__b bo = new Customer_Interaction__b();
bo.Account__c = “001R000000302D3”;
bo.Game_Platform__c = “PC”;
bo.Play_Date__c = “2015-01-01T23:01:01Z”;
bo.In_Game_Purchase__c = “A12569”;
bo.Level_Achieved__c = “41”;
bo.Lives_This_Game__c = “3”;
bo.Score_This_Game__c = “5500”;
bo.Play_Duration__c = “25”;
database.insertImmediate(bo);


it doesn't work in Test class.
and How to write Mocking Framework with the Stub API  for Bigobject ?
 
Hitendra SabhadiyaHitendra Sabhadiya
Pls Give me some new example except  "https://developer.salesforce.com/docs/atlas.en-us.bigobjects.meta/bigobjects/apex_testing_stub_api.htm"