Tests to verify the API platform
Description
Tests are performed before connecting the client (partner) platform to FUNGAMESS.
These tests allow us to verify whether the platform meets the company's requirements.
A restriction on adding the platform may be applied if the tests are not passed successfully.
If the tests are successful, the platform can be connected to the product.
Tests for verifying API platforms can be found in the "Integration → Config" section of your FUNGAMESS back office.
Test 1 - sessionCheck User 1 Success
Method GET
Sending a request to sessionCheck for verification of the user.
A request is sent with the parameters of User1 and token for verification of the user.
Correct response: Status true.
If the token's validity period has expired, the response may contain status true and the token.
Additional request will be sent with a new token.
Expected result: Success.
Test 2 - sessionCheck User 1 wrong token
Method GET
Sending a request to sessionCheck with token substitution.
A request is sent with User1 parameters, but the token is replaced.
The platform must detect the substitution and prevent a user with the wrong token from connection to the system.
Correct response: Token not found.
Test 3 - sessionCheck signature verification
Method GET
Sending a request to sessionCheck for signature verification.
A request is sent with the User1 parameters and token, but a signature is substituted.
The system should detect invalid signature.
Correct response: Request not valid.
Test 4 - sessionCheck User 2 Success
Method GET
Sending a request to sessionCheck for verification of the second user.
The test is performed in the same way as the first test.
The parameters of User 2 were entered.
Correct response: true.
Test 5 - sessionCheck swap the users token
Method GET
Sending a request to sessionCheck after the swap of user tokens.
A request is sent to verify two users, when the user tokens were swapped.
The platform must detect token substitution and provide false responce to both requests.
Correct response: false.
Test 6 - getBalance User 1 Success
Method GET
Sending a request to getBalance to check the balance of first user.
A request is sent with the parameters of userID and token.
Correct response: true.
The amount of user's balance is displayed correctly.
Test 7 - getBalance User 1 wrong token
Method GET
Sending a request to getBalance with a token substitution.
A request is sent with a spoofed token.
The platform should detect the substitution and provide an error response: Token not found, status false.
A second request is sent to check the balance.
There should be no debit processing.
Response: The status and the amount of the user's balance were processed as true, before the initialization of verification.