Access & WebSocket
ACCESS_CARTA_DEFAULT
See the source code.
This test verifies basic WebSocket connection to the CARTA backend and validates the REGISTER_VIEWER_ACK response.
Frontend sends: REGISTER_VIEWER (
RegisterViewer) via WebSocket connectionBackend returns: REGISTER_VIEWER_ACK (
RegisterViewerAck)
Check 1: the REGISTER_VIEWER_ACK should satisfy:
REGISTER_VIEWER_ACK.success = True
REGISTER_VIEWER_ACK.session_id is not None
REGISTER_VIEWER_ACK.message is not empty
REGISTER_VIEWER_ACK.platformStrings is not empty
REGISTER_VIEWER_ACK.user_preferences = None (empty object)
REGISTER_VIEWER_ACK.user_layouts = None (empty object)
ACCESS_CARTA_DEFAULT_CONCURRENT
See the source code.
This test verifies that the backend can handle multiple concurrent WebSocket connections and that each connection receives a unique session ID.
Frontend opens 10 concurrent WebSocket connections
Each connection sends: REGISTER_VIEWER (
RegisterViewer)Backend returns: REGISTER_VIEWER_ACK (
RegisterViewerAck) for each connection
Check 1: every REGISTER_VIEWER_ACK should satisfy:
REGISTER_VIEWER_ACK.success = True
REGISTER_VIEWER_ACK.session_id is not None
REGISTER_VIEWER_ACK.message is not empty
REGISTER_VIEWER_ACK.platformStrings is not empty
All session IDs are unique across the 10 connections
REGISTER_VIEWER_ACK.session_type = CARTA.SessionType.NEW
REGISTER_VIEWER_ACK.user_preferences = None (empty object)
REGISTER_VIEWER_ACK.user_layouts = None (empty object)
ACCESS_CARTA_KNOWN_SESSION
See the source code.
This test verifies reconnecting to the backend with a known (previously established) session ID to test session resumption.
Frontend sends: REGISTER_VIEWER (
RegisterViewer)session_id = 9999 client_feature_flags = WEB_ASSEMBLY | WEB_GL
Backend returns: REGISTER_VIEWER_ACK (
RegisterViewerAck)
Check 1: the REGISTER_VIEWER_ACK should satisfy:
REGISTER_VIEWER_ACK.success = True
REGISTER_VIEWER_ACK.session_id = 9999
REGISTER_VIEWER_ACK.session_type = CARTA.SessionType.RESUMED
REGISTER_VIEWER_ACK.message is a non-empty string
REGISTER_VIEWER_ACK.user_preferences = None (empty object)
REGISTER_VIEWER_ACK.user_layouts = None (empty object)
ACCESS_CARTA_NO_CLIENT_FEATURE
See the source code.
This test verifies connecting to the backend with zero client feature flags (no features advertised) to validate backend handles feature-less clients.
Frontend sends: REGISTER_VIEWER (
RegisterViewer)session_id = 0 client_feature_flags = 0
Backend returns: REGISTER_VIEWER_ACK (
RegisterViewerAck)
Check 1: the REGISTER_VIEWER_ACK should satisfy:
REGISTER_VIEWER_ACK.success = True
REGISTER_VIEWER_ACK.session_id is a non-empty string (newly generated)
REGISTER_VIEWER_ACK.session_type = CARTA.SessionType.NEW
REGISTER_VIEWER_ACK.user_preferences = None (empty object)
REGISTER_VIEWER_ACK.user_layouts = None (empty object)
ACCESS_CARTA_SAME_ID_TWICE
See the source code.
This test verifies sending REGISTER_VIEWER twice with the same session ID on the same connection to validate backend behavior for duplicate session registration.
Frontend sends: REGISTER_VIEWER (
RegisterViewer)session_id = 9999 client_feature_flags = WEB_ASSEMBLY | WEB_GL
Backend returns: REGISTER_VIEWER_ACK (
RegisterViewerAck)Frontend sends again: REGISTER_VIEWER (
RegisterViewer) with the same session_id = 9999Backend returns: REGISTER_VIEWER_ACK (
RegisterViewerAck)
Check 1: the second REGISTER_VIEWER_ACK should satisfy:
REGISTER_VIEWER_ACK.success = True
REGISTER_VIEWER_ACK.session_id = 9999
REGISTER_VIEWER_ACK.session_type = CARTA.SessionType.RESUMED
REGISTER_VIEWER_ACK.user_preferences = None (empty object)
REGISTER_VIEWER_ACK.user_layouts = None (empty object)
ACCESS_WEBSOCKET
See the source code.
This test verifies basic WebSocket connectivity by testing the full WebSocket connection lifecycle and state transitions.
Frontend creates a WebSocket connection to the server
Check 1: the WebSocket state transitions should satisfy:
Initial state after construction: WebSocket.CONNECTING
After onopen callback: WebSocket.OPEN
After calling close(): WebSocket.CLOSING
After onclose callback: WebSocket.CLOSED