The correct selection is C, D. Reliable tests should be self-contained and independent of live external systems. Mock endpoints or Salesforce callout mocks provide deterministic responses for integration logic, while CSV static resources and Test.loadData() provide reusable test records without depending on middleware or external availability. From a testing perspective, the goal is deterministic evidence that the solution behaves correctly under the conditions that matter. Tests should isolate external dependencies, use controlled data, exercise positive and negative paths, and reproduce realistic volume or user behavior where required without making production the first place defects are discovered. The rejected choices either test the wrong layer, introduce live-system dependencies, or detect problems too late to provide the deterministic early feedback expected from a mature test strategy. For this scenario, the decisive point is therefore the platform behavior represented by the selected options (C. Host a mock endpoint to produce sample information from an endpoint.; D. Load a CSV as a static resource and reference it in a test class.). Applying that rule consistently keeps the implementation aligned with Salesforce-supported lifecycle practices and makes the resulting change easier to review, validate, and operate across environments.
Study Guide reference: Testing — Apex testing; test-data isolation; mocks; regression testing; performance/load testing; sandbox test strategy.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit