Saturday 27 May 2017

Test class for XML DOM Parser and Testing HTTP Callouts Using Static Resources



Sample respone receiving from external system  to Test :

http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <UpdateCustomerHeaderInfoResponse xmlns="http://tempuri.org/xyz.customerdetails">
         <UpdateCustomerHeaderInfoResult>
<InsertResult>False</InsertResult>
<CustomerNumber>123456789</CustomerNumber>
</UpdateCustomerHeaderInfoResult>
      </UpdateCustomerHeaderInfoResponse>
   </soap:Body>

</soap:Envelope>


First we need to save above response in static resources and then we need call in test class.


More Info : check below URL to test above response.


https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_http_testing_static.htm



Complete Salesforce CPQ training Free videos

Salesforcestart:: We are excited to announce that our YouTube channel, Salesforcestart, is your one-stop-shop for all things Salesforce CPQ!...