קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במסמך הזה מופיע מידע עזר על הגדרת הרשאות ותפקידים ב-Test Lab IAM. אם רוצים להגדיר תפקידים עם הרשאות ספציפיות יותר, Test Labמספק הרשאות להרצת בדיקות ולסטרימינג של מכשירים באמצעות Android Studio. להרצת בדיקות יש דרישות נוספות להגדרת הרשאות ותפקידים ב-IAM ובמכשירי הסטרימינג.
ביצוע הבדיקה
כדי להגדיר את Test Lab בצורה נכונה כך שתוכלו להריץ בדיקות ולקרוא את התוצאות שלהן, אתם צריכים להגדיר גישה למאגרי Cloud Storage. לשם כך נדרשת הגדרה ספציפית של הרשאות, שלא כולן כלולות בתפקידים המוגדרים מראש ב-Firebase. כדי להעניק גישה ל-Test Lab, אפשר לבחור באחת מהאפשרויות הבאות.
מוסיפים משתמשים שזקוקים לגישה ל-Test Lab ומקצים להם תפקידים בפרויקט מדור קודם באמצעות מסוף Firebase.
(אופציונלי) מקצים את תפקיד העורך בפרויקט כדי לאפשר למשתמש להריץ בדיקות באמצעות Test Lab.
(אופציונלי) מקצים את תפקיד הפרויקט צפייה כדי לאפשר למשתמש לצפות בתוצאות הבדיקה באמצעות Test Lab.
בדיקות באמצעות ה-CLI של gcloud
בבדיקות שהתחילו מ-gcloud CLI, מ-Testing API או מ-Gradle Managed Devices, נעשה שימוש כברירת מחדל בדלי Cloud Storage שנוצר על ידי Firebase. כדי לעשות זאת, למשתמש הראשי שמריץ את הבדיקה צריכה להיות הרשאת העריכה (roles/editor) בפרויקט Firebase.
אם אין לכם אפשרות להעניק את התפקיד הזה, או אם אתם רוצים לשמור את תוצאות הבדיקה המפורטות למשך יותר מ-90 ימים, אתם יכולים לשלוח את תוצאות הבדיקה האלה לCloud Storagebucket שבבעלותכם באמצעות האפשרות --results-bucket בשורת הפקודה של gcloud.
כשמשתמשים בדלי Cloud Storage משלכם:
מקצים צמד של תפקידים מוגדרים מראש, שמעניקים יחד את קבוצת ההרשאות הנדרשת, באמצעות מסוף Google Cloud.
כדי לאפשר למשתמש להריץ בדיקות באמצעות Test Lab, צריך להקצות לו את התפקידים הבאים: אדמין ב-Firebase Test Lab (roles/cloudtestservice.testAdmin) וצפייה ב-Firebase Analytics (roles/firebase.analyticsViewer).
כדי לאפשר למשתמש לצפות בתוצאות הבדיקה ב-Test Lab, צריך להקצות לו את שני התפקידים הבאים: צפייה ב-Firebase Test Lab (roles/cloudtestservice.testViewer) וצפייה ב-Firebase Analytics (roles/firebase.analyticsViewer).
הפעלת הרשאות בסטרימינג של מכשירים
הזרמת מכשירים היא תכונה נפרדת שמבוססת על מכשירי Test Lab. הוא מספק גישה ישירה למכשירי Test Lab. משתמשים עם הרשאות עריכה וניהול ב-Firebase יכולים להשתמש בסטרימינג של מכשירים בלי תפקידים נוספים, אבל אפשר גם להגדיר תפקידים עם הרשאות ספציפיות יותר אם צריך.
כדי לאפשר למשתמש להשתמש בהזרמת מכשירים, צריך להקצות לו תפקיד מוגדר מראש שמעניק את קבוצת ההרשאות הנדרשת יחד, באמצעות מסוף Google Cloud. התפקיד שצריך להקצות הוא אדמין עם גישה ישירה ל-Firebase Test Lab (roles/cloudtestservice.directAccessAdmin).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-09-06 (שעון UTC)."],[],[],null,["\u003cbr /\u003e\n\nThis document provides reference information about configuring Test Lab IAM\npermissions and roles. If you want to configure more granular roles, Test Lab\nprovides permissions for both executing tests and streaming devices using\nAndroid Studio. Test execution has extra requirements to properly configure\npermissions and roles for IAM and the streaming devices.\n\nTest Execution\n\nTo properly configure Test Lab so that you can execute and read the results\nof tests, you have to configure access to Cloud Storage buckets. This\nrequires a specific configuration of permissions that aren't all included in the\nstandard [Firebase predefined roles](/docs/projects/iam/roles-predefined). To\ngrant access to Test Lab, use one of the following options.\n\nTests through the Firebase console\n\nFor tests started from Firebase console or through the [Firebase Test Lab Device Matrix in Android Studio](https://developer.android.com/studio/test/test-in-android-studio#run-with-firebase-test-lab):\n\n1. Test your app in a dedicated separate Firebase project.\n2. Add users that need Test Lab access and assign them legacy project roles using the [Firebase console](//console.firebase.google.com/).\n3. (Optional) Assign the **Editor** project role to allow a user to run tests with Test Lab.\n4. (Optional) Assign the **Viewer** project role to allow a user to view test results with Test Lab.\n\nTests through gcloud CLI\n\nTests started from the [gcloud CLI](/docs/test-lab/android/command-line),\nthe [Testing API](/docs/test-lab/reference/testing/rest), or [Gradle Managed\nDevices](/docs/test-lab/android/android-studio#gmd-testlab-plugin) use a\nCloud Storage bucket created by Firebase by default. This requires the\nprincipal executing the test to have the \"roles/editor\" role for your firebase\nproject.\n\nIf you cannot grant that role, or you want to retain detailed test results for\nlonger than 90 days, you can send these test results to a Cloud Storage\nbucket that you own using the\n[**--results-bucket** gcloud command-line option](//cloud.google.com/sdk/gcloud/reference/firebase/test/android/run).\n\nWhen using your own Cloud Storage bucket:\n\n1. Assign a pair of predefined roles, which grants the required set of permissions together, using the [Google Cloud console](//cloud.google.com/iam/docs/granting-changing-revoking-access).\n2. To allow a user to run tests with Test Lab, assign both: Firebase Test Lab Admin (`roles/cloudtestservice.testAdmin`) and Firebase Analytics Viewer (`roles/firebase.analyticsViewer`)\n3. To allow a user to view test results in Test Lab, assign both: Firebase Test Lab Viewer (`roles/cloudtestservice.testViewer`) and Firebase Analytics Viewer (`roles/firebase.analyticsViewer`)\n\n| **Caution:** Users assigned these predefined roles can access *all* Cloud Storage buckets associated with the Firebase project, potentially including customer data.\n\nEnable permissions in Device Streaming\n\nDevice Streaming is a separate feature built on top of Test Lab devices. It\nprovides you with direct access to Test Lab devices. Firebase Editors and\nAdmins can use Device Streaming without any additional roles, however, you can\nalso provide more granular roles if necessary.\n\nTo allow a user to use device streaming, assign a predefined role which grants\nthe required set of permissions together, using the [Google Cloud console](//cloud.google.com/iam/docs/granting-changing-revoking-access)\n. The role to assign is Firebase Test Lab Direct Access\nAdmin (`roles/cloudtestservice.directAccessAdmin`).\n\nFor more information on Device Streaming in Android Studio, see [Device Streaming in Android Studio](https://developer.android.com/studio/preview/android-device-streaming)."]]