Fundamentals of Real-Time Testing
High Level Guidance
Real-time games require extra care in testing stability and connectivity. The stability of your game and handling of connectivity are key to ensuring optimal performance and player satisfaction. We have compiled important considerations and test cases below that focus specifically on real-time gameplay use cases.
As with any app development you should use defensive programming techniques and not assume that returned values are valid and not assume the user is always connected to the network. On the front-end, it is important to guide users and keep them informed of the current state (i.e. they are connecting to the server, they have lost connection, their opponent has lost connection etc.). Testing the happy path is straight forward, but covering all edge cases can be challenging.
In Game Test Cases
All real-time games at Skillz go through a rigorous testing process focused on connectivity and stability. These common test cases shown below should be accounted for in any real-time game. The cases linked below cover many use cases but are not entirely exhaustive.
Connecting to the Match
- Initializing game
- See “waiting for opponent modal” while you are connected and opponent has not
- If one player does not connect for a certain period of time, end the game and award the other player the win
App Backgrounding
- Background app and come back right away
- Ensure you are able to rejoin gameplay
- Depending on gameplay type, you may want to pause gameplay while backgrounded
- Background app multiple times
- Ensure you are able to rejoin gameplay each time
- If you background too many times, you may want to abort the game to prevent griefing
- If you have a timeout set for how long a user can be disconnected for, ensure that it is aggregate and does not refresh on each background
- Background and wait for timeout expiration
- When the reconnection timer expires, the game ends and your opponent wins
- When you return to the game, you return to either the Skillz results screen or to the score summary screen in your game
- Both players background
- When one player returns, they see that their opponent is still disconnected
- If both players background longer than the timeout expiration they should both abort
- When they return, they should see the Skillz results screen or the score summary screen in your game with an “Abort”
- Control center (iOS) or system tray (Android)
- Ensure you are able to rejoin gameplay after pulling either of these down
- Backgrounding mid-turn
- Ensure you return with the correct gameplay state when rejoining
Internet Connectivity
- Airplane Mode
- You are not able to make moves while in airplane mode and see that you are not connected to the game server
- You are able to rejoin the game when turning off airplane mode
- Ensure you rejoin the game in the correct state and that states match between users
- Manually switching Wi-Fi to cellular
- When toggling off Wi-Fi, you are able to rejoin the game on cellular and continue playing
- Ensure you rejoin the game in the correct state and that states match between users
- When toggling off Wi-Fi, you are able to rejoin the game on cellular and continue playing
- Walking from Wi-Fi to cellular
- When walking out of Wi-Fi range, you are able to rejoin the game on cellular and continue playing
- Ensure you rejoin the game in the correct state and that states match between users
- When walking out of Wi-Fi range, you are able to rejoin the game on cellular and continue playing
Other Common Scenarios
- Force Quit
- Your opponent sees that you disconnected and the game finishes when the timeout expiration runs down. Your opponent wins and you receive an abort.
- Phone call
- Able to ignore or accept a phone call and continue gameplay
- Notifications
- Able to receive push and system notifications and return to gameplay
- Griefing
- Take care to ensure players cannot pause or interrupt gameplay excessively