Integration Tests
Test Execution
The tests currently being developed are divided into three specific collections:
- Successful Flows: A collection of tests that validates that the implemented methods return the parameters specified in Required Methods.
- Error Handling Flows: A collection of tests that validates that, in the event of an error, the wallet returns the responses specified in Error Response.
- Error-Free Flow: A collection that tests a player’s flow of plays on any game, and allows the wallet’s response to be validated while plays are being made, both for correct plays and if there is an error.
Steps to Execute
- Select the
GPAS_Wallet_Integrationenvironment from the Postman dropdown (selecting the environment variables to use). - In the
COLLECTIONSoption, select the collection you want to run, and on the left, select theRUNoption. - When the screen appears, select the
RUN WALLET -GPASoption.
General Tests
- Status response corresponding to the test.
- Response time:
- Accepted →
less than 500 ms - Accepted but with Warning →
500 ms - 700 ms - Not Accepted
greater than 700 ms
- Response in JSON format.
- The response body contains the data specified in Methods to Implement.
- Balance fields must always be returned with 4 places after the comma.
Results Validation
Each request includes automated tests (examples):
// Example test in Postman to validate responsepm.test("Status 200 OK", function() { pm.response.to.have.status(200);});Passing Criteria
- All requests must return ✅ PASS in the tests.
- The data sent/received matches the expected JSON Schema.
- The response time must be less than 500 ms to succeed, less than 700 ms to pass, but with a warning that it cannot be higher.
- There are no 4XX/5XX errors in sequential flows (e.g., sessions → bet → win).