E2E smoke test: game loads → backend connects → no crash #3

Open
opened 2026-05-29 23:46:08 +00:00 by kaykayyali · 0 comments
Owner

Goal

Create an automated end-to-end smoke test that validates:

  1. Client loads — webpack builds, game scene renders (no blank screen)
  2. Socket.IO connects — client establishes connection to backend at port 8081
  3. Game server starts — backend process boots without crashing
  4. Basic round trip — client sends a test message, server responds

Implementation

Server-side (gameServer/main.js)

io.on('connection', (socket) => {
  socket.on('smoke-test-ping', () => {
    socket.emit('smoke-test-pong', { status: 'ok', uptime: process.uptime() });
  });
});

Client-side (tests/e2e/smoke.test.js)

  • Start backend as child process
  • Wait for port 8081
  • Connect with socket.io-client
  • Send ping → verify pong
  • Clean up

Run: node tests/e2e/smoke.test.js

Dependencies

  • Blocked by: #1 (jsdom crash — backend must be fixed first)
  • Blocks: None
## Goal Create an automated end-to-end smoke test that validates: 1. **Client loads** — webpack builds, game scene renders (no blank screen) 2. **Socket.IO connects** — client establishes connection to backend at port 8081 3. **Game server starts** — backend process boots without crashing 4. **Basic round trip** — client sends a test message, server responds ## Implementation ### Server-side (gameServer/main.js) ```js io.on('connection', (socket) => { socket.on('smoke-test-ping', () => { socket.emit('smoke-test-pong', { status: 'ok', uptime: process.uptime() }); }); }); ``` ### Client-side (tests/e2e/smoke.test.js) - Start backend as child process - Wait for port 8081 - Connect with socket.io-client - Send ping → verify pong - Clean up **Run:** `node tests/e2e/smoke.test.js` ## Dependencies - Blocked by: #1 (jsdom crash — backend must be fixed first) - Blocks: None
kaykayyali added the teste2eautomation labels 2026-05-29 23:46:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kaykayyali/restitution#3