From bce7cf14ec34806eec87035a59c599d5b6e089f6 Mon Sep 17 00:00:00 2001 From: Vijay Date: Fri, 6 Oct 2023 12:30:37 +0530 Subject: [PATCH] feat: refine doc --- README.md | 40 +++++++++++++++++++++++++++------------- docker-compose-perf.yml | 2 +- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 5b1aea81..93981011 100644 --- a/README.md +++ b/README.md @@ -343,22 +343,36 @@ To capture results without running tests, use the following command ./automate_perf.sh -c -f -t ``` -### Running Services for testing remote Kubernetes +### Testing Performance of Remote Mojaloop Deployment -```bash -../docker-compose --project-name simulators -f docker-compose-perf.yml --profile 8dfsp --profile testing-toolkit --profile ttk-provisioning-remote-k8s up -d +For executing performance test scenarios against a Mojaloop deployment, follow the steps below: -../docker-compose --project-name monitoring --profile transfers-test -f docker-compose-monitoring.yml up -d -``` +1. **Set Environment Variables:** + - Set `perf.override.env` with the proper endpoints of the Mojaloop services. -``` -env K6_SCRIPT_CONFIG_FILE_NAME=fspiopSingleTransfer.json ../docker-compose --project-name load -f docker-compose-load.yml up -``` +2. **Customize Configurations:** + - Edit the file `docker/ml-testing-toolkit/test-cases/environments/remote-k8s-env.json` to customize currencies and MSISDNs according to your requirements. -Stop Services +3. **Run Simulators and TTK Provisioning:** + ```bash + docker-compose --project-name simulators -f docker-compose-perf.yml --profile 8dfsp --profile testing-toolkit --profile ttk-provisioning-remote-k8s up -d + ``` -```bash -docker-compose --project-name simulators -f docker-compose-perf.yml --profile 8dfsp --profile testing-toolkit --profile ttk-provisioning-remote-k8s down -v -``` +4. **Run Monitoring Services:** + ```bash + docker-compose --project-name monitoring --profile transfers-test -f docker-compose-monitoring.yml up -d + ``` + +5. **Execute Single Transfer Test Case:** + ```bash + env K6_SCRIPT_CONFIG_FILE_NAME=fspiopSingleTransfer.json docker-compose --project-name load -f docker-compose-load.yml up + ``` + +6. **Stop Services:** + ```bash + docker-compose --project-name simulators -f docker-compose-perf.yml --profile 8dfsp --profile testing-toolkit --profile ttk-provisioning-remote-k8s down -v + docker-compose --project-name monitoring --profile transfers-test -f docker-compose-monitoring.yml down -v + ``` + +> **Note:** The `-v` argument is optional and will delete any volume data created by the monitoring Docker Compose. -> NOTE: `-v` argument is optional, and it will delete any volume data created by the monitoring docker compose \ No newline at end of file diff --git a/docker-compose-perf.yml b/docker-compose-perf.yml index 0174cbb1..1b84c7fa 100644 --- a/docker-compose-perf.yml +++ b/docker-compose-perf.yml @@ -840,7 +840,7 @@ services: command: - sh - -c - - 'sed -e "s~K6_CALLBACK_FQDN~$$K6_CALLBACK_FQDN~g" -e "s~K6_SCRIPT_ADMIN_ENDPOINT_URL~$$K6_SCRIPT_ADMIN_ENDPOINT_URL~g" -e "s~K6_SCRIPT_ALS_ADMIN_ENDPOINT_URL~$$K6_SCRIPT_ALS_ADMIN_ENDPOINT_URL~g" environments/remote-k8s-env.json > /tmp/env.json && npm run cli -- -u http://mojaloop-testing-toolkit:5050 -l 2 -i collections/provisioning -e /tmp/env.json --report-format html --report-target file://reports/ttk-provisioning-report.html' + - 'sed -e "s~K6_CALLBACK_FQDN~$$K6_CALLBACK_FQDN~g" -e "s~K6_SCRIPT_ADMIN_ENDPOINT_URL~$$K6_SCRIPT_ADMIN_ENDPOINT_URL~g" -e "s~K6_SCRIPT_ALS_ADMIN_ENDPOINT_URL~$$K6_SCRIPT_ALS_ADMIN_ENDPOINT_URL~g" -e "s~K6_SCRIPT_ALS_ENDPOINT_URL~$$K6_SCRIPT_ALS_ENDPOINT_URL~g" environments/remote-k8s-env.json > /tmp/env.json && npm run cli -- -u http://mojaloop-testing-toolkit:5050 -l 2 -i collections/provisioning -e /tmp/env.json --report-format html --report-target file://reports/ttk-provisioning-report.html' user: root profiles: - ttk-provisioning-remote-k8s