Salesforce Decode
Salesforcedecode
DevOps & Testing questionsQuestion 23 of 100
DevOps & TestingIntermediateCode Reviewtestingcalloutsmocking

How do you mock HTTP callouts in Apex tests?

Scenario

Tests fail with "Methods defined as TestMethod do not support Web service callouts".

Answer it out loud first

Serious prep means attempting before reading. Take two minutes to structure your answer, then compare.