Confirm the target
Read the environment by ID. Match the app name to the name used at creation. If an environment contains two Salesforce copies,connect('salesforce') and connect('partner-org') reach different app data.
Check that the client uses credentials from this environment. Credentials copied from another test can point at a still-running environment with older records. Obtain fresh credentials through the intended environment’s connect() helper.
Check the starting data
An environment created withapps starts with its app version’s predefined data. It does not contain your customer Salesforce records. Creating a snapshot also does not import data from a customer organization.
An environment created with snapshotId starts from that saved copy. Confirm the snapshot ID, its source, and its status. A descriptive name helps people find a fixture, but the ID determines what is restored.
Writes to a restored environment do not update the snapshot. If the fixture needs new records, create a new snapshot after preparing them and update the ID used by tests.
Verify the write and actor
Read the original write response and checkresponse.ok. A request that returned 400 did not satisfy the test’s success condition. Credentials and actors describes how credentials.fetch() returns HTTP errors.
For a successful write that a later query cannot see, confirm the actor, queried object, record identifier, and query filters. Restricted actors may have different record access than the administrator. A test that changes actors also changes the access being tested.
After an ambiguous network failure, inspect records through a stable identifier before repeating the write. A blind retry can create duplicates.