以下是我们在 I/O 大会上宣布的所有内容,从新的 Firebase Studio 功能到集成 AI 的更多方式,内容非常丰富。
阅读博客。
設定本機模擬器套件
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Firebase 模擬器可協助您輕鬆完整驗證應用程式的行為,並確認 Firebase Security Rules 設定。使用 Firebase 模擬器在本機環境中執行及自動化單元測試。
安裝 Firebase 模擬器
開始之前,請確認您已安裝 Firebase CLI,並設定 Firebase 本機模擬器套件
使用下列指令啟動模擬器。模擬器會在所有測試期間執行。
Cloud Firestore
firebase emulators:start --only firestore
Realtime Database
firebase emulators:start --only database
Cloud Storage
firebase emulators:start --only storage
設定測試並執行模擬器
安裝模擬器後,請設定測試並產生報表,在將規則部署至實際工作環境前,先驗證規則的行為。
快速入門導覽課程
如要瞭解簡單規則的幾個基本測試案例,請參閱測試快速入門。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["\u003cbr /\u003e\n\nThe Firebase Emulators make it easier to fully validate your app's behavior and\nverify your Firebase Security Rules configurations. Use the Firebase Emulators to\nrun and automate unit tests in a local environment.\n| **Beta**\n|\n| Some of the Firebase Emulators are currently in Beta. These\n| products might be changed in backward-incompatible ways and are not subject to\n| any SLA or deprecation policy. As always, feedback is greatly appreciated.\n| Let us know what you think!\n\nInstall the Firebase Emulators\n\nBefore you begin make sure you have installed the [Firebase CLI](/docs/cli)\nand configured the [Firebase Local Emulator Suite](/docs/emulator-suite/install_and_configure)\n\nStart the emulator using the following command. The emulator runs during\nall your tests. \n\nCloud Firestore \n\n```text\n firebase emulators:start --only firestore\n \n```\n\nRealtime Database \n\n```text\n firebase emulators:start --only database\n \n```\n\nCloud Storage \n\n```text\n firebase emulators:start --only storage\n \n```\n\nSet up tests and run the emulator\n\nNow that you've installed the emulator, [set up tests](/docs/rules/unit-tests) and\n[generate reports](/docs/rules/emulator-reports) to validate your rules' behavior before\nyou deploy them to production.\n\nQuickstart\n\nFor a few basic test cases with simple rules,\ntry out the [testing quickstart](https://github.com/firebase/quickstart-testing)."]]