Core Concepts
- UICommandCapture - records all UI commands (SET, APPEND, REMOVE) sent during a test
- UIAssert - asserts on the captured commands
- UITestAdapter - server-side adapter that creates captures from page builds
Complete Example Suite
UICommandCapture Interface
UIAssert Methods
UITestAdapter
TheUITestAdapter on the server side bridges between your page-building code and the test capture system. It intercepts the PageManager command stream and records every command that would normally be sent to the client.
In your test code, you typically do not interact with
UITestAdapter directly. Instead, write helper methods in your test suite that invoke your page-building logic and return the captured commands.When to Test UI
UI tests are most useful when:- Your mod builds complex server-driven UI pages
- You need to verify page structure without a connected client
- You want regression tests for UI layout changes
- You implement data-binding where server values populate UI fields
Next Steps
- Networking - packet round-trip testing
- Command Testing - test commands with mock senders
- Event Testing - capture and verify events