...
Code Block |
---|
#Sample command without any client configuration being provided docker run --user root --rm -it \ -v "$(pwd)/logs:/usr/o3/tr-ozone-connect/logs" \ public.ecr.aws/g5c5c6i0/tr-image/tr-ozone-connect:cbuae \ yarn tr-ozone-connect \ --formatter terse \ --loglevel-runner info \ --config /usr/o3/tr-ozone-connect/config/config.yaml \ --out /usr/o3/tr-ozone-connect/logs/<custom_log_file_name>test_logs.json |
In order to run the tests against the LFI’s implementation of Ozone Connect the next command should be executed:
Code Block |
---|
#Sample command WITH the client configuration being provided docker run --user root --rm -it \ -v "$(pwd)/config:/usr/o3/tr-ozone-connect/config" \ -v "$(pwd)/logs:/usr/o3/tr-ozone-connect/logs" \ public.ecr.aws/g5c5c6i0/tr-image/tr-ozone-connect:cbuae \ yarn tr-ozone-connect \ --formatter terse \ --loglevel-runner info \ --config /usr/o3/tr-ozone-connect/config/config.yaml \ --out /usr/o3/tr-ozone-connect/logs/<custom_log_file_name>test_logs.json |
In order to run the above command against LFI’s implementation of Ozone Connect, the LFI needs to:
...
Running the Docker Container: The first part runs the Testing Tool Docker container, mounting the necessary directories and setting up the environment:
Option | Description |
---|---|
| If the LFI configuration is not provided, the tool will attempt to connect to a the Ozone Connect mock server deployed by Ozone in the cloud. For detailed information on the configuration file format, please refer to the configuration file section: https://openfinanceuae.atlassian.net/wiki/spaces/APIHubDocsv4/pages/168265011/Testing+Tool+User+Guide#6.2-Configuration-File SSL certificates are necessary for secure mTLS connection between the Testing Tool and LFI’s implementation of Ozone Connect. The method to generate these certificates is documented in the Certificates Generation section: https://openfinanceuae.atlassian.net/wiki/spaces/APIHubDocsv4/pages/168265011/Testing+Tool+User+Guide#6.3-Test-Certificates After generating the certificates, copy them into a folder named |
| This option is mandatory and needs to be passed to check the logs after the program has run. The logs will be available in this folder after the tests are run. |
Acquiring the latest docker image:
Option | Description |
---|---|
| This is the location of the publicly available Test Tool Docker image. |
Executing the Ozone Testing Tool: This 3rd part executes the Ozone Testing Tool within the container with a set of specified options:
Code Block yarn tr-ozone-connect \ --formatter terse \ --loglevel-runner info \ --config /usr/o3/tr-ozone-connect/config/config.yaml \ --out /usr/o3/tr-ozone-connect/logs/test_logs_5Aug.json
Option | Description | Possible Values |
---|---|---|
-h, --help | Show help (boolean) |
|
-c, --config | Input test configuration files in .yaml or .json format | config.yaml, config.json, ./config/test-input.yaml |
-f, --folder | Preconfigured path to the folders with the test files | src/tests, tests, ./src/tests |
- |
Regex patterns to match test cases. Runs a test that matches any of the patterns
(Format : string, optional)
pattern1:regex1#pattern2:regex2
o, --out | Output file name | results.json, output. |
json, ./test_output. |
json | ||
-e, --formatter | Use a standard formatter for the output | full, terse, medium, errors |
- |
File output format when not using a template
(Format : string, optional)
json, yaml
v, --loglevel-runner | Log level for the test runner (Format : string, optional) | debug, info, silent |
-l, --loglevel-suite | Log level for the test suite (Format : string, optional) |
info |
--version | Show version number (boolean) |
|
6.2 Configuration File
This section provides a detailed explanation of the configuration file fields used in the Testing Tool for Open Banking APIs.
...
Code Block |
---|
baseUrl: https://mock.rt-cbuae.rt.dev.ozoneapi.co.uk psuIdentifier: userId: '10000100000000000000002' aisBasePath: openbanking/v1/ais pisBasePath: openbanking/v1/pis accounts: validAccountIds: ['100004000000000000000001'] payments: paymentIds: ['abcdef1234567890'] headers: o3-ozone-interaction-id: 'e2ff21ca-dd11-4c05-98ef-403dcc8e588d' o3-api-operation: 'GET' o3-aspsp-id: 'RTCBUAE' o3-api-uri: 'open-banking/account-information/v1/accounts' o3-caller-org-id: '000015000000000000000001' o3-caller-client-id: '65e64982-f080-4785-a887-816f5274ea7e' o3-caller-software-statement-id: '000016000000000000000004' o3-consent-id: 'aac-6359d9-ab01458-c45a358cbf3230733' o3-psu-identifier: 'eyJ1c2VySWQiOiIxMDAwMDEwMDAwMDAwMDAwMDAwMDAwMDIifQ==' providerId: 'RTCBUAE' supported: accounts: multi: true single: true certs: transport: ca: '/usr/o3/tr-ozone-connect/config/ozone2021-ca.pem' certFileName: '/usr/o3/tr-ozone-connect/config/ozone-issued-transport-HQuZPIt3ipkh33Uxytox1E.pem' keyFileName: '/usr/o3/tr-ozone-connect/config/ozone-issued-transport-HQuZPIt3ipkh33Uxytox1E.key' |
Configuration | Description |
---|---|
baseUrl |
|
psuIdentifier
|
|
aisBasePath |
|
pisBasePath |
|
accounts
|
|
payments
|
|
headers
|
|
headers
|
|
headers
|
|
headers
|
|
headers
|
|
headers
|
|
headers
|
|
headers
|
|
headers
|
|
headers
|
|
supported
|
|
supported
|
|
certs
|
|
certs
|
|
certs
|
|
6.3 Test Certificates
The certificates in the certs folder are critical for securing communications between the LFI and the OFP using mTLS.
...
Follow the instructions below to run the Testing Tool:
Step 1 | Create an input test configuration file and set up it in | Please follow the Configuration File section in order to generate the required file: https://openfinanceuae.atlassian.net/wiki/spaces/APIHubDocsv4/pages/168265011/Testing+Tool+User+Guide#6.2-Configuration-File | ||
Step 2 | Acquire/Generate the SSL certificates and put them in a | Please follow the Test Certificates section in case you need to generate test certificates: https://openfinanceuae.atlassian.net/wiki/spaces/APIHubDocsv4/pages/168265011/Testing+Tool+User+Guide#6.3-Test-Certificates Otherwise please use OFTF Certificates. | ||
Step 3 | Execute the testing tool command. |
|
|
| ||
Step 4 | The final section of the sample output, after all tests have been run and logs have been printed, will appear as follows. |
|
| ||
Step 5 (optional) | Review the Testing Tool output log file containing the test case results. The log file's name is specified in the last part of the command in step 1 above. You can change this name each time you run the command. If not changed, successive runs will overwrite the same file. | Use any text editor to view the file : |
.json |
8. Test Cases
The list of supported test cases is available in the following document: Ozone Connect Test Cases
...