QuestionQ14Verified/Test Automation ToolsCopy linkReport a problemAsk AstroTutorSave questionWhich two methods are recommended for creating test data in Salesforce?Choose twoAHost a mock endpoint to produce sample information from an endpoint.BReference data from middleware directly within your test class.CUtilize Heroku Connect to provide test class data.DLoad a CSV as a static resource and reference it in a test class.Show AnswerAnswerExplanationSalesforce unit tests should use controlled, isolated data rather than depend on live middleware or external services. A mock endpoint supplies predictable sample responses, and a CSV uploaded as a static resource can be loaded into a test class as repeatable fixture data (for example, with Test.loadData).Learn moreMonth of Testing: Advanced Topics in Salesforce Unit TestingTesting Apex Callouts Using HttpCalloutMockShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion