-
Notifications
You must be signed in to change notification settings - Fork 51
Testing
aevien@hotmail.com edited this page Aug 25, 2026
·
1 revision
MST uses Unity EditMode tests for deterministic framework, module, lifecycle, networking, and persistence contracts. Automated tests do not replace real process and browser verification.
In Unity:
- Open
Window > General > Test Runner. - Select EditMode.
- Run the
MasterServerToolkit.Tests.EditModeassembly.
The latest test report is written to:
Logs/MstTests/latest.txtLogs/MstTests/latest.xml
The suite covers authentication, permissions, profiles, rooms, spawners, module lifecycle, concurrency, WebSocket failure handling, timers, persistence adapters, and platform validation.
Run real process tests for behavior that cannot be proven by isolated EditMode tests:
- master socket bind and restart;
- client connect, disconnect, timeout, and reconnect;
- valid and invalid permission challenges;
- room registration and join-token validation;
- spawner process launch, watchdog, and kill flow;
- real database connectivity and persistence;
- WSS through the production TLS path;
- WebGL platform detection, storage, ads, and authentication;
- controlled duplicate login while the previous session is in a room.
At minimum, verify:
- Unity Editor client to Editor master;
- built client to built master;
- built room and spawner to master;
- WebGL client to WSS master endpoint;
- each enabled database provider;
- each released platform service.
- Run focused tests after a local change and the full EditMode suite before publishing MST.
- Keep tests compatible with Unity 2022.3.62f3 and its bundled Unity Test Framework/NUnit version.
- Do not rely on test ordering or global Console filters.
- Clean up static events, sockets, timers, files, and temporary databases in teardown.
- Test with Domain Reload enabled and disabled when mutable static state is involved.
- Treat expected error logs as assertions, not as unexamined Console noise.
See the test-suite README.
Master Server Toolkit 5 documentation | Repository | Issues