docker-compose up
This will provide :
- An api exposing its endpoint to create a player and a wallet
- A mock api to simulate the creation of a wallet on a blockchain which will be called by the other api
- A postgres database to store created users and wallets
The endpoint is exposed on the port 5000 :
http://localhost:5000/
The only method supported is POST
Header to provide :
Content-Type : application/json
Example of body to provide :
{
"username" : "johndoe",
"password" : "Foobar.1",
"pin_code" : "123456"
}
This endpoint will successfully respond with a body providing the name and the wallet address
{
"username":"johndoe",
"wallet_address":"1aec6b68-4918-4a24-9792-3756086c9925"
}
go test
go test -bench=.
k6 is installed on the Backend container and test scripts are provided
You can open a terminal on this container and run the tests
docker exec -it containerAddress
k6 run sample_test.js
- sample_test.js
- load_test.js
- stress_test.js
- spike_test.js