Contents
How to validate apex web service trailhead challenge?
Apex Code Development (84563) General Development (53086) Visualforce Development (36450) APIs and Integration (15233) Lightning (14510) Trailhead (11003) Formulas & Validation Rules Discussion (10275) Other Salesforce Applications (7529) Jobs Board (6615) Force.com Sites & Site.com (4655) Mobile (2569) Java Development (3873)
What was the error in the Apex Challenge?
Challenge threw error – ‘The Apex test class AnimalLocatorTest does not appear to be using the AnimalLocatorMock class correctly’. First Register the url in the Remote site settings. // from the class that implements HttpCalloutMock.
Is the URL of apex web service valid?
The URL is valid. I’ve used Work Bench and curl to test and even tested with multiple Accounts with and without contacts. I know on other challenges, punctionation was important. What about the defination of the return? Are there expected names? I built a class to hold Account ID & Name along with a List of Contact names and IDs. Is this my issue?
What are the classes in the trailhead challenge?
I have written the below classes as part of the trailhead challenge for Apex REST callouts. I have got 100% code coverage for the main class. But when I check the challenge I get
What does it mean to have code coverage in apex?
The Apex testing framework generates code coverage numbers for your Apex classes and triggers every time you run one or more tests. Code coverage indicates how many executable lines of code in your classes and triggers have been exercised by test methods.
What do I need to know about trailhead apex?
I enter the code exactly as the trailhead describes abd attempt to hit the ‘/services/apexrest/Cases/’ url with workbench but I get the following error. What am I missing?
How are apex web services used in Salesforce?
Instead of using custom Apex code for REST and SOAP services, external applications can integrate with Salesforce by using Salesforce’s REST and SOAP APIs. These APIs let you create, update, and delete records. However, the advantage of using Apex web services is that Apex methods can encapsulate complex logic.