๐Ÿšจ WebSocket SOS Service Tester

Real-time Emergency Signal Testing Platform

๐Ÿ” Login

๐Ÿ“‹ Token Info

No token yet. Login first.

๐Ÿ“ก WebSocket Connection

Disconnected

๐Ÿ“ Ping/Pong Test

Test connection heartbeat:

0
Pings Sent
0
Pongs Received
--
Latency (ms)

๐Ÿ“จ WebSocket Messages Log

๐Ÿšจ Create SOS Alert

๐Ÿ“ Location Info

Location will be shown here

๐Ÿ“Š Recent Alerts

No alerts created yet

๐ŸŸข Connection Status

OFF

๐Ÿ“จ Messages Received

0

โฑ๏ธ Uptime

0s

๐Ÿ“ˆ Performance Metrics

Avg Latency: --
Max Latency: --
Min Latency: --
Success Rate: --

๐Ÿงช Auto Test

Run automated tests every 30 seconds:

๐Ÿ“Š System Statistics

Waiting for data...

๐Ÿ“– How to Test WebSocket SOS Service

1. ๐Ÿ” Step 1: Authenticate

  1. Go to Authentication tab
  2. Enter credentials (default: wstester@test.com / WsTest1234!)
  3. Click Login
  4. You should see a JWT token in the Token Info panel

2. ๐Ÿ“ก Step 2: Connect WebSocket

  1. Go to WebSocket tab
  2. Click Connect button
  3. You should see connection status change to "Connected"
  4. Green indicator means WebSocket is active

3. ๐Ÿ“ Step 3: Test Ping/Pong

  1. Click Send Ping button
  2. Watch for pong response in the message log
  3. Latency should be < 100ms

4. ๐Ÿšจ Step 4: Create SOS Alert

  1. Go to SOS Alert tab
  2. Fill in location (latitude/longitude)
  3. Enter message
  4. Click Create SOS Alert
  5. Check WebSocket Messages Log for alert notification

5. ๐Ÿ“Š Step 5: Monitor Results

  1. Go to Monitor tab
  2. View connection status, message count, and uptime
  3. Check performance metrics (latency, success rate)
โ„น๏ธ
Default Test Credentials:
Email: wstester@test.com
Password: WsTest1234!

๐Ÿ”ง API Endpoints

POST /api/v1/auth/login Content-Type: application/json { "email": "wstester@test.com", "password": "WsTest1234!" }
WebSocket: ws://localhost:8002/api/v1/emergency/ws/{user_id}?token={jwt_token}
POST /api/v1/alert Authorization: Bearer {jwt_token} Content-Type: application/json { "latitude": 55.7558, "longitude": 37.6173, "address": "Location", "alert_type": "SOS", "message": "Emergency message" }

๐Ÿ’ก Tips

  • Keep WebSocket connected while testing SOS alerts
  • Messages appear in real-time in the WebSocket Messages Log
  • Green indicator = Connection is active
  • Red indicator = Connection is lost
  • Latency < 100ms is excellent
  • Use Monitor tab to track performance