As you already know Apex test methods don’t support callouts, and tests that perform callouts fail. However, testing runtime allows you to “mock” the callout. Mock callouts allow you to specify the response to return in the test instead of actually calling the web service
I recommend looking at the example listed in this Trailhead Module. If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!
As you already know Apex test methods don’t support callouts, and tests that perform callouts fail. However, testing runtime allows you to “mock” the callout. Mock callouts allow you to specify the response to return in the test instead of actually calling the web service
I recommend looking at the example listed in this Trailhead Module. If you find this information helpful, please mark this answer as Best. It may help others in the community. Thank You!
Anudeep