[en] Mimicking is a testing feature that allows you to test functionality without depending on the services to which your app is integrated (third-party services, Veritran authentication services, among others). This accelerates and optimizes the app building and testing processes as the real services –provided by the bank– are replaced by emulated services.
[en] The mimicking feature allows decoupling from external dependencies, minimizing service availability issues, and testing complex scenarios, thus increasing the quantity and variety of tests (both manual and automated) that you can perform on your app. It also allows configuring routing rules that enable a hybrid behavior model. This means that, while working simultaneously on the same app, some platform users will interact directly with the real services and others will interact with the emulated services.
[en] To decouple from external dependencies, the outgoing requests from the middleware are routed through a proxy. Each time the app makes a request to a service, the proxy captures this interaction, including specific details of the request (such as the parameters and their structure) and the response (such as the response format and any potential errors). This helps to better understand how the endpoints are used in real-life scenarios and also allows for the automatic generation of detailed API documentation, improving the AI mimicking model with every capture.
[en] To emulate all the use cases of an application, the mimicking feature must recognize the different services required by the app and how their responses are structured. To do so, a services spec must be uploaded to the knowledge database in advance, which contains the necessary information to associate a specific request with its expected response. This response information can then be modified based on the project's specifications, allowing the emulation of different scenarios, including users with different products, transfers of different amounts, or different error messages.
[en] To test functionality using mimicking, you first need to prepare and configure the back-end settings required by the mimicking feature to emulate the real services. This setup includes:
[en] Obtaining the services API documentation.
[en] Generating the specs and uploading them to the knowledge database.
Importante
[en] If you need help generating the specs and uploading them to the database, contact the AI team.
[en] Configuring the proxy in a server (e.g. the Middleware server).
Nota
[en] The procedure to configure the mimicking proxy is not included in this documentation. Contact the AI team to gain access to the complete user guide.
[en] Pointing your app's transactions to the proxy's URL using Business Parameters.
[en] Then, you need to modify the predefined parameters to fit your project's requirements and enable the proxy from the mimicking feature. Refer to the section below to learn how to navigate the feature and set the configurations required to test your app.
[en] You can access the mimicking feature through the URL provided by the AI team. If it is the first time you access the feature, you need to provide the terminal ID of the device where you are going to test the app to create a new session. The device terminal ID is obtained from Devtools. If you have previously worked with the feature, you can choose an existing session.
[en] Then, from the Test configurations page, you can enable the proxy, select the services you want to emulate and modify the state to fit your project's requirements. The state is a JSON file containing all the necessary information for the mimicking feature to know how to respond to the requests made by the device. You may modify it by editing the lines of code in the JSON file on the right or by writing a prompt with the modifications to be applied in the text box on the left. The JSON file can be downloaded and uploaded to reuse it in other tests. From this page, you can also reset the modified state to go back to its initial version or go back to the device selection page.
[en] Finally, from this same page, you can turn the proxy on to use the emulated services. Once you have your test settings configured and you have enabled the proxy, you are ready to test your app from the defined device using the emulated services.