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
DoubleheadSoftwareDoubleheadSoftware 

External Objects and Test Coverage

I have created several External Objects and am accessing in several Apex classes. How do I create test coverage for the External Objects without setting the SeeAllData to true? Is there a mock class to use? 
NagaNaga (Salesforce Developers) 
Hi Doublehead,

Please see a similar test class below

User-added imageBest Regards
Naga Kiran
DoubleheadSoftwareDoubleheadSoftware
External objects are different than custom settings.  External objects are read only objects within Salesforce which point to a a external data source.  The objects can be queried using Apex.

David
 
Wim van BeekWim van Beek
Any clue here? It is a real pain to get coverage here.
Ps. Any External object is Object__x and not Object__c ! !

It is also imposibe to use insert or upsert. Need to use database.insertAsync in place