+ Start a Discussion
Michael ZimmersMichael Zimmers 

REST callouts and tests

Hi -

I'm trying to complete this trailhead:


And I must confess to being a little confused. In the tutorials, two kinds of test callouts are shown:
  1. StatResourceCalloutMock
  2. HttpCalloutMock
...but it's not clear to me which I should be using. So, I think my mock (and test) is sort of an incorrect hybrid (and it does fail). I'm trying to figure out the coding on my own, but can someone explain which test callout I should be using?

Thank you.
Best Answer chosen by Michael Zimmers
Michael ZimmersMichael Zimmers
Found the problem; I was indeed confusing the static resource approach with the HTTP callout. This was an excellent resource: