This is a set of k6 load tests related to the CGN (carta giovani nazionale) initiative.
The new card activation and OTP generation tests require a set of parameters: rate, duration, preAllocatedVUs and maxVUs. These parameters are necessary to set the test target to a given number of iteration per second (rate) in a given time (duration), using a certain number of VUs (preAllocatedVUs and maxVUs).
To invoke k6 load test passing parameter use -e (or --env) flag:
-e MY_VARIABLE=MY_VALUE
This test is not very useful since it just calls the function app info page.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/get_cgn_info.js
You need to set an environment variable FUNC_KEY
with the azure cgn function app key.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/start_cgn_activation.js
- Get the activation status of a card associated to a fiscal code.
- You need to set an environment variable
FUNC_KEY
with the azure cgn function app key. - Get the activation status of a card associated to a fiscal code.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/get_cgn_status.js
- Get the activation status of a card associated to a fiscal code.
- You need to set an environment variable
FUNC_KEY
with the azure cgn function app key. - Get the activation status of a card associated to a fiscal code.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/get_cgn_activation.js
- You need to set an environment variable
FUNC_KEY
with the azure cgn function app key.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/upsert_cgn_status.js
- It generates a new opt for a given fiscal code.
- You need to set an environment variable
FUNC_KEY
with the azure cgn function app key.
docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/generate_otp.js
- It validates a generated OTP: an OTP has 10 minutes validity after it has been generated.
- You need to set an environment variable
FUNC_KEY
with the azure merchant function app key.
docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/validate_otp.js
- Get the activation status of a eyca card associated to a fiscal code.
- You need to set an environment variable
FUNC_KEY
with the azure cgn function app key. - Get the activation status of a eyca card associated to a fiscal code.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/get_eyca_status.js
- You need to set an environment variable
FUNC_KEY
with the azure function app key. - Since an eyca card needs an active cgn card this test starts to activate a cgn card for a given
fiscal code
then activate the eyca card.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} loadimpact/k6 run /src/start_eyca_activation.js
This test represents the activation of a new card from the mobile app for a citizen.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} -e BASE_URL=${BASE_URL} -e rate=20 -e duration=1m -e maxVUs=1 -e preAllocatedVUs=1 loadimpact/k6 run /src/user_activate_card_workflow.js
This test represents the usage of an OTP when doing a transacation with a supported merchant.
$ docker run -i --rm -v $(pwd)/src:/src -e FUNC_KEY=${FUNC_KEY} -e SUBSCRIPTION_KEY=${SUBSCRIPTION_KEY} -e BASE_URL=${BASE_URL} loadimpact/k6 run /src/otp_workflow.js
This test represents the usage of merchant search and request detail.
$ docker run -i --rm -v $(pwd)/src:/src -e OS_FUNC_KEY=${OS_FUNC_KEY} -e SUBSCRIPTION_KEY=${SUBSCRIPTION_KEY} -e OS_BASE_URL=${OS_BASE_URL} -e rate=${rate} -e duration=${duration} -e preAllocatedVUs=${preAllocatedVUs} -e maxVUs=${maxVUs} loadimpact/k6 run /src/user_operator_search.js