DCI & Processors Mock Functionality

Starting with v22.1.4003, the DCI & Processors Mock functionality eliminates the billing costs associated with testing requests and API calls during the implementation phase.

From an architectural viewpoint, the DCI (Digital Cloud Infrastructure) & Processors can be seen as a two-layer business product. Therefore, the Mock functionalities were added not only to the DCI for simple API calls, but to the Processors as well, to enable complete (sometimes short-circuited) flow-runs. This is most useful during implementations and of course, opens up the way for automation testing of these two important Ecosystem components.

DCI Mock mechanism

All API endpoints of all the DCI cloud microservices accept an additional header: enableMock: true/false

This header lets the microservice know that it will process the request in mock mode. However, the business logic will still be in effect:

  • The request & authorization headers will still be validated.
  • The request data will be processed as standard (normal flow) and will throw validation errors or exceptions, if the request is invalid.
  • Only the response data coming from the provider will be served as mock.

Processors Mock mechanism

All processors now support a new configuration key (platform webconfig / vault). This key is formed as a concatenation of the serviceKey and enableMock.

This new key configuration (e.g. FTOSServicesLivenessenableMock) is not mandatory, and if it’s missing, it defaults as false.

This tells the processor to call the DCI using the enableMock header set to true or false.

Some of the processors work alongside an SDK component (Liveness, Video, OCR) for various reasons (to perform liveness check, to do a selfie capture using the camera, or just take a photo of your ID card / Driver’s License / Passport). When such processors work in mock mode, the SDK / capture process is circumvented. This can further allow the creation of automation tests, which was previously blocked from automating E2E flows, due to the capturing mechanism blocking the automation flow.