1111| ` --port ` | | Override URL port (useful for local) |
1212| ` --test ` | | Comma-separated list of test categories to run (runs all if omitted) |
1313| ` --json ` | | Output results as JSON to stdout (all other output goes to stderr) |
14+ | ` --url ` | | Override project URL (e.g. ` http://127.0.0.1:54321 ` ) |
15+ | ` --db-url ` | | Override database URL (e.g. ` postgresql://postgres:postgres@127.0.0.1:54322/postgres ` ) |
16+ | ` --otel ` | ` OTEL_EXPORTER_OTLP_ENDPOINT ` | OTLP HTTP endpoint for tracing (e.g. ` http://localhost:4318 ` ) |
17+ | | ` OTEL_API_TOKEN ` | Bearer token for authenticated OTLP endpoints |
1418
1519Sensitive credentials (` --secret-key ` , ` SUPABASE_DB_PASSWORD ` ) should be set as environment variables to avoid them appearing in shell history.
1620
1721A random test user is created at the start of each run and deleted automatically when it finishes.
1822
1923## Test categories
2024
21- Pass any combination to ` --test ` as a comma-separated list:
25+ Pass any combination to ` --test ` as a comma-separated list. Use ` functional ` to run all non-load suites, or ` load ` to run all load suites.
2226
23- | Category | Description |
24- | ---| ---|
25- | ` connection ` | WebSocket connect latency and broadcast throughput |
26- | ` load ` | Postgres changes and presence throughput (INSERT / UPDATE / DELETE) |
27- | ` broadcast ` | Self-broadcast and REST broadcast API |
28- | ` presence ` | Presence join on public and private channels |
29- | ` authorization ` | Private channel allow/deny checks |
30- | ` postgres-changes ` | Filtered INSERT, UPDATE, DELETE events and concurrent changes |
31- | ` broadcast-changes ` | Database-triggered broadcast INSERT, UPDATE, DELETE events |
27+ | Category | Suites | Tests |
28+ | ---| ---| ---|
29+ | ` connection ` | connection | First connect latency; broadcast message throughput |
30+ | ` load ` | load-postgres-changes | Postgres system message latency; INSERT / UPDATE / DELETE throughput via postgres changes |
31+ | | load-presence | Presence join throughput |
32+ | | load-broadcast-from-db | Broadcast-from-database throughput |
33+ | | load-broadcast | Self-broadcast throughput; REST broadcast API throughput |
34+ | | load-broadcast-replay | Broadcast replay throughput on channel join |
35+ | ` broadcast ` | broadcast extension | Self-broadcast receive; REST broadcast API send-and-receive |
36+ | ` presence ` | presence extension | Presence join on public channels; presence join on private channels |
37+ | ` authorization ` | authorization check | Private channel denied without permissions; private channel allowed with permissions |
38+ | ` postgres-changes ` | postgres changes extension | Filtered INSERT, UPDATE, DELETE events; concurrent INSERT + UPDATE + DELETE |
39+ | ` broadcast-changes ` | broadcast changes | DB-triggered broadcast for INSERT, UPDATE, DELETE |
40+ | ` broadcast-replay ` | broadcast replay | Replayed messages delivered on join; ` meta.replayed ` flag set; messages before ` since ` not replayed |
3241
3342``` bash
3443# Run only connection and broadcast tests
3544./realtime-check --env local --publishable-key < key> --secret-key < key> --test connection,broadcast
45+
46+ # Run all load tests
47+ ./realtime-check --env local --publishable-key < key> --secret-key < key> --test load
48+
49+ # Run all functional (non-load) tests
50+ ./realtime-check --env local --publishable-key < key> --secret-key < key> --test functional
3651```
3752
3853## JSON output
@@ -51,12 +66,31 @@ The pre-built binary requires no runtime — just run it directly.
5166
5267### Local project
5368
69+ A ` supabase/config.toml ` is included, so ` supabase start ` works out of the box.
70+
5471``` bash
5572supabase start
5673SUPABASE_SERVICE_ROLE_KEY=< service-role-key> \
5774 ./realtime-check --env local --publishable-key < anon-key>
5875```
5976
77+ ### Local project with tracing
78+
79+ ``` bash
80+ supabase start
81+ docker compose up -d # starts Jaeger at http://localhost:16686
82+ SUPABASE_SERVICE_ROLE_KEY=< service-role-key> \
83+ ./realtime-check --env local --publishable-key < anon-key> --otel http://localhost:4318
84+ ```
85+
86+ For authenticated OTLP endpoints, set ` OTEL_API_TOKEN ` and it will be sent as a ` Bearer ` token:
87+
88+ ``` bash
89+ SUPABASE_SERVICE_ROLE_KEY=< service-role-key> \
90+ OTEL_API_TOKEN=< token> \
91+ ./realtime-check --env local --publishable-key < anon-key> --otel https://otlp.example.com
92+ ```
93+
6094### Remote project
6195
6296``` bash
@@ -102,7 +136,7 @@ SUPABASE_SERVICE_ROLE_KEY=<key> SUPABASE_DB_PASSWORD=<pw> \
102136 ./result/bin/realtime-check --project < ref> --publishable-key < key>
103137```
104138
105- > ** Note: ** The nix build locks the dependency hash in ` flake.nix ` . If you update ` package.json ` or ` bun.lock ` , run ` nix build ` once — it will fail with the new hash in the error output — then update ` outputHash ` in ` flake.nix ` accordingly .
139+ ` bun run nix` calls ` nix- build.sh ` , which automatically updates the ` outputHash ` in ` flake.nix ` when ` package.json ` or ` bun.lock ` change — no manual hash update needed .
106140
107141---
108142
0 commit comments