Skip to main content
Version: 28.0.17

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 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 (ie. 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​

  1. Initializing game
    1. See “waiting for opponent modal” while you are connected and opponent has not
    2. If one player does not connect for a certain period of time, end the game and award the other player the win

App Backgrounding​

  1. Background app and come back right away
    1. Ensure you are able to rejoin gameplay
    2. Depending on gameplay type, you may want to pause gameplay while backgrounded
  2. Background app multiple times
    1. Ensure you are able to rejoin gameplay each time
    2. If you background too many times, you may want to abort the game to prevent griefing
    3. 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
  3. Background and wait for timeout expiration
    1. When the reconnection timer expires, the game ends and your opponent wins
    2. When you return to the game, you return to either the Skillz results screen or to the score summary screen in your game
  4. Both players background
    1. When one player returns, they see that their opponent is still disconnected
    2. If both players background longer than the timeout expiration they should both abort
      1. When they return, they should see the Skillz results screen or the score summary screen in your game with an “Abort”
  5. Control center (iOS) or system tray (Android)
    1. Ensure you are able to rejoin gameplay after pulling either of these down
  6. Backgrounding mid-turn
    1. Ensure you return with the correct gameplay state when rejoining

Internet Connectivity​

  1. Airplane Mode
    1. You are not able to make moves while in airplane mode and see that you are not connected to the game server
    2. You are able to rejoin the game when turning off airplane mode
      1. Ensure you rejoin the game in the correct state and that states match between users
  2. Manually switching wifi to cellular
    1. When toggling off wifi, you are able to rejoin the game on cellular and continue playing
      1. Ensure you rejoin the game in the correct state and that states match between users
  3. Walking from wifi to cellular
    1. When walking out of wifi range, you are able to rejoin the game on cellular and continue playing
      1. Ensure you rejoin the game in the correct state and that states match between users

Other Common Scenarios​

  1. 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.
  2. Phone call
    • Able to ignore or accept a phone call and continue gameplay
  3. Notifications
    • Able to receive push and system notifications and return to gameplay
  4. Griefing
    • Take care to ensure players cannot pause or interrupt gameplay excessively