adspace


How do you write a test class for WS?

Answer Posted / Pushp Kumar Deval

To write a test class for Apex Web Services (AWS) in Salesforce, you should create a TestClass that extends the WebServiceTest class and contains methods annotated with @Test. Inside these methods, you can call your AWS classes, set up required data, and check the expected results using assertions. You may also need to mock external services or HTTP calls using MockHttpResponse or Test.setMockHttpResponse() methods.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is workflow rule and workflow actions? : salesforce workflows and approval process

572


What were you doing before sfdc development?

521