Test Using Multiple Browser Clients

Testing real-time applications requires multiple connected clients.

Use the following testing procedure:

  1. Start the backend.
  2. Open Chrome.
  3. Connect to the chat application.
  4. Open another browser window.
  5. Connect using a different username.
  6. Send a message from the first browser.
  7. Verify that the second browser receives it.
  8. Send a message from the second browser.
  9. Verify that the first browser receives it.
  10. Disconnect one browser and inspect the backend logs.

Also test room-based communication by opening separate clients and joining different rooms.

Clients in the same room should receive room messages, while clients outside that room should not.

Key Takeaways
  • Multiple clients are essential for testing real-time behavior.

  • Verify broadcasting and room isolation.

  • Test both connection and disconnection behavior.