Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
Hi All I am writing a Unit Test for a Integration code, what I need to know is how can I pass different response for same GET,PUT method ?  I am doing a Mock Callout but there I am passing only 1 response per http method but I need to be more dynamic to pass different response for GET,PUT based on what method I call so that I can cover more code? Is there a way?
2 answers
  1. Sep 14, 2017, 9:48 AM
    Hi Rahul

    Thanks for your suggestion- I read it earlier but that can give 1 response for each http Method, but I am looking for different response say for same type of http Method. As in my Code we do multiple http callout each expecting different response and based on it we call different methods.So I am looking for a way where I can dynamically change the response instead of hard coding it.

    Thanks

    Regards

    Sarabjeet Pal

     
0/9000