Test Connectors in App Xchange
This topic provides information on testing endpoints for a newly developed connector on the platform.
Before testing a connector in App Xchange, you need a workspace with an active and working connection to the external system for which your connector is built. You should also have already read the following sections of the help documentation:
See Testing a Connector Locally in the Connector SDK for instructions on local testing, which should also be completed before deployment.
Test a Cache Writer (Data Reader)
Cache writers or data readers read and replicate data from a connected system. When testing, you must perform the following verifications.
Verify a Cache Writer
Use this test plan to ensure all necessary scenarios have been tested. Follow these steps to verify a cache writer.
-
Run the cache writer once to verify a complete
write of the data in the connected system. For information about how to create
and run a service, see Services.
- In Job History, confirm the count expected is the same as the logs and that there are no errors.
- Verify the objects display as expected in the Data Cache Explorer.
-
Confirm that the cache writer picks up new objects.
- Add a new object in the connected system (after the initial cache write).
- Verify the object displays correctly in the job history logs.
- Verify the object displays correctly when viewing the record in the Data Cache Explorer.
-
Confirm that the cache writer picks up changes to existing objects.
- Update an existing object in the connected system. Verify that it is detected as an update in the cache writer and verify the change in the Data Cache Explorer.
- If a change in the connected system can affect others, verify that the change is detected in all systems.
-
Confirm that the cache writer removes deleted objects.
- Delete an existing object (or the new one you created above).
- Verify the object is deleted in the logs.
- Verify the object is no longer present in the Data Cache Explorer.
Test an Action Processor
Action processors write data to a connected system. To run an
action processor, use the Connector Action flow step. Afterward, test the action output by verifying the following details. These checks
should be run for every new action processor added to a connector.
- Verify the action outputs look correct in the run history.
- Verify the logs look correct in the tab of your integration.
- Verify the object displays correctly in the data explorer.
- Verify any changes are reflected correctly in the connected system.
-
For each connector action type, verify any changes
are reflected correctly in the connected system.
Automate Testing with Flows
Whenever you modify an action processor or cache writer, you should run the Test an Action Processor steps again. This is especially important when updating endpoints that are already in use. To help reduce the time needed to regression test changes to existing endpoints, much of the above can be automated using the following pattern in flow:
-
Use a
Connector Action flow step to run the action processor. Seed this step with data and logic as necessary to allow it to be rerun (on demand or a schedule) without changes and successfully execute each time.
-
Use a
Lookup flow step to look up the record by its key value in the cache. Expect exactly one object matching the key to be present. This also provides testing of the cache writer, as this object gets written to the cache from the connected system after insertion. In other words, this is a representation of the object as it exists in the connected system.
-
Use an
Assertion flow step to test various expectations about the object’s data state that should be true. It is recommended to test every property.
Was this helpful? Give us feedback.