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
Rajesh SriramuluRajesh Sriramulu 

How to mock(startStubbing) dynamic SOQL in apex test class to cover the code coverage

Hi All,

I can able to do the code coverage for normal SOQL using Mock(startStubbing)  framework but for Dynamic SOQL it's not able to cover.

Much appreciated if any one replied. 

Thanks,
Rajesh

AnkaiahAnkaiah (Salesforce Developers) 
Hi Rajesh,

Refer the below link will help you to proceed further on your test class.
https://salesforce.stackexchange.com/questions/217461/test-class-coverage-for-dynamic-soql

Thanks!!
Rajesh SriramuluRajesh Sriramulu
Thanks Ankaiah for your reply,  but I need the code coverage for Dynamic SOQL  using Mock(startStubbing)  framework.

Regards,
Rajesh