Testing & Edit Mode¶
Testing in Studio safely¶
A handful of options let you play-test without touching (or corrupting) live data:
| Option | Effect |
|---|---|
UseMock = true |
Full in-memory mock store: profiles AND leaderboards. Nothing is read from or written to real DataStores; every profile loads as fresh template defaults. |
DontSave = true |
Same as UseMock for profiles: a full in-memory mock. It does not load real data -- to inspect real profiles without writing, use ViewedUserId. |
ResetData = true |
Destructive: every profile loads as template defaults. Development only. |
ViewedUserId = <id> |
Load that user's REAL profile read-only (never saves). This is the option for validating real data safely. |
Banner = false |
Silence the one-line load banner. |
Edit mode & storybooks¶
When RunService:IsRunning() is false (a UI Labs / Hoarcekat storybook, or the command bar), the client module skips the transport and handshake entirely and initializes instantly to template defaults. Observe and Changed work normally, so Scribe-backed components render and live-update without a running server.
Seed realistic state with the mock helpers (edit mode only):
Data.Mock({
Coins = 1250,
Inventory = { Sword = { Health = 100, Dmg = 5 } },
}, {
Perks = { "VIP" },
Leaderboards = { TopCoins = { { Rank = 1, UserId = 1, Name = "You", Score = 1250 } } },
})
Data.MockCommand("EquipItem", function(itemId) return true end)
Both Mock and MockCommand error outside edit mode, so they can't leak into a real session.
Scribe Studio¶
For interactive testing, the Scribe Studio companion plugin renders the whole diagnostics layer as a live dock: inspect sessions, replay the change feed, simulate outages, invoke commands, and even edit production profiles. It's the fastest way to exercise everything without writing throwaway scripts.
Headless tests¶
Scribe's own suite runs both in Studio (TestEZ) and headless via Lune, against a deterministic fake ProfileStore and a stub transport. The same Server.build(options, compiled) entry point that the harness uses lets you construct isolated instances and drive the player lifecycle manually. That is useful if you want to unit-test your own game logic against Scribe without a live DataStore.