Guiless smoke test design
Source: docs/smoke-guiless-design.md · DEV
Reusable design for comprehensive pChat/WebChat smoke testing without opening a manual browser session.
Goal
Prove the app is usable end-to-end from APIs, CLI, local files, and service health checks.
Smoke Layers
-
Service health - Relay
/health- Web app URL - Landing page - Docs links - Watchdog running/recovery check -
Auth/session - Request email code in dev mode - Verify code - Session token works - Logout/session replacement - Multiple sessions without port collision
-
Directory/presence - Create two users - Create AI session - Verify public network visibility - Search by name/address - Hide/show self - Verify public relay text hides server address; private relay may show URL to allowed operators
-
Messaging - Direct pChat user A to user B - AI CLI to user - User to AI watcher - Inbox poll receives - Receipts/status - Hebrew/RTL text - Mixed English/Hebrew - Emoji/GIF marker text
-
Attachments - Upload/download text file - Image preview - GIF attachment - Audio/voice attachment - Video attachment - Invalid/oversized file rejection if limits exist
-
Groups - Create public group - Create private group - Join/request flow - Admin add/remove - Stream group: admin can write, observer is read-only - Group message delivery
-
Calls/signaling - Call signal offer/answer/ICE path - Incoming/outgoing call event history - Missed/ended call state - No real WebRTC media required for smoke; validate signaling API
-
AI integration - CLI creates persona - Watcher stays online - Watcher receives message - CLI sends reply - CLI sends attachment - Docs contain copy-paste watcher command
-
PhoneRelay channels - SMS route validation - WhatsApp route validation - Telegram route validation - Email route validation - Notify route validation - Inbound callback/event appears in pChat/inbound activity
-
Persistence/history
- Sent messages archived
- Incoming messages archived
- Saved messages area
- Local DB/file exists
- Restart relay and verify data remains available
-
Stats/reporting
- Count messages by user/channel
- Count calls
- Longest call
- Average call duration
- Group by caller
Implemented Runner
The design is implemented at:
scripts/smoke_guiless.py
Default safe run:
scripts/smoke_guiless.py \
--relay http://127.0.0.1:5110 \
--site http://127.0.0.1:8091 \
--web http://127.0.0.1:8027/app/webchat/chat.html
Implemented checks currently cover required smoke coverage for health, site/docs,
auth/session, directory/presence, direct messaging, attachments, groups, call
signaling, AI session receive/reply, persistence, and stats. External PhoneRelay
channels remain skipped by default and must be enabled intentionally with
--live-channels.
Use --json for machine-readable output and --verbose for detailed pass
messages.
Proposed Runner
scripts/smoke_guiless.py \
--relay http://127.0.0.1:5110 \
--site http://127.0.0.1:8091 \
--web http://127.0.0.1:8027
Expected Output
PASS health
PASS auth
PASS directory
PASS direct messages
PASS ai watcher
PASS files
PASS groups
PASS calls
PASS docs
PASS persistence
FAIL phone-relay-wa: missing configured bridge
Exit Codes
0: all required checks pass1: required check failed2: environment missing or optional config skipped
Safety
Real external channels must be optional. The default smoke test must not send real SMS, WhatsApp, Telegram, email, or phone notifications.
Use --live-channels only when an operator intentionally wants live channel
testing.