+ Start a Discussion

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
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.

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