API testing with synthetic test data¶
About synthetic testing¶
This API allows you to safely and free of charge test different job result scenarios, the secure sending of job requests, and the secure receiving and processing of job responses. For this Modigie will provision you with a Modigie Org Account and a synthetic Modigie Pub/Sub Repository.
A repository represents an instance of the Modigie Integration for Cloud Pub/Sub API and is owned by your Modigie Org Account in the API. To test the integration of your application with the API, Modigie will provide you first with a synthetic repository. Once your testing is concluded and your requirements are met, we will provide you with a regular repository for real jobs. A synthetic repository cannot be converted into a real repository or vice versa, so you will receive a separate Application Account and Pub/Sub topics and subscriptions.
Synthetic configuration¶
Your synthetic repository is designed to enable streamlined set up and testing of various scenarios and to ensure the proper functionality of the system in submitting requests and processing resultant data. This allows you to safely test different job result scenarios, the secure sending of job requests, and the secure receiving and processing of job responses.
Differences to real repositories¶
The following features are different from the actual operational procedure:
- Most importantly, synthetic jobs are not processed by Modigie's real-time engine.
- Cloud Pub/Sub will not perform schema validation when publishing a job request.
- Expiration and priority settings are not supported, and cancel requests are ignored.
Getting a synthetic repository¶
The process of getting a synthetic repository is simple and similar to requesting and configuring a real repository, see Onboarding process.
How the synthetic repository works¶
Job requests are published via a Cloud Pub/Sub topic provided by Modigie, consistent with the actual API's operational procedure. Your application will receive job responses through a Pub/Sub push or pull subscription based on your choice. This type of repository can work with fictive, non-sensitive test data and provides synthetic job results, rather than engaging the real-time engine. While no Personally Identifiable Information (PII) data is expected to flow in either direction, testing the authentication with the provided service account is crucial. This is why the configuration also requires your application to authenticate at Cloud Pub/Sub with the Application Account.
Deterministic job behavior¶
As you know, with the real-time engine the outcome of jobs is of probabilistic nature, i.e. there are many variants of outcomes that can't be predicted. This would make it hard to guarantee a high test coverage of your integration. Therefore, you can use a synthetic repository where the job results are entirely deterministic.
Specific input values control job result outcomes. For example, if in a synthetic enrichMobile job request the first letter of the first name in your job request is between A and M, a mobile number will be added to the job response (actually it is always the same phone number that is appended, no matter which names you send in the request). If the letter is between N and Z, no mobile number will be added. More details on controlling the job response are in the example pages linked below. The deterministic nature of the synthetic testing allows you to test all job events and edge cases as needed.
- Enrich Mobile & Verify Employment -
enrichMobile: synthetic example - Verify Employment -
verifyEmployment: synthetic example - Verify Mobile -
verifyMobile: synthetic example