Testing & Debugging Security Rules
Gain confidence in your Realtime Database rules by simulating requests, using the Rules Playground, writing automated tests with the emulator, and reading denial messages.
Why Test Your Rules
Security Rules are the only thing standing between your data and the open internet. A single mistake can expose private data or block legitimate users.
Testing rules is as important as testing code, and Firebase gives you several tools to do it.
The Rules Playground
The Firebase console includes a Rules Playground where you simulate a single read or write without touching real data.
- Pick read or write
- Set a path and auth state
- See instantly whether it is allowed or denied
All lessons in this course
- Understanding Security Rules Syntax
- User-Based Access Control
- Validating Data with Rules
- Testing & Debugging Security Rules