이 문서에서는 Test Lab IAM 권한 및 역할에 대한 참조 정보를 제공합니다. 보다 세분화된 역할을 구성하려면 Test Lab에서 Android 스튜디오 사용하여 테스트 실행 및 스트리밍 기기 모두에 대한 권한을 제공합니다. 테스트 실행에는 IAM 및 스트리밍 기기에 대한 권한 및 역할을 올바르게 구성하기 위한 추가 요구사항이 있습니다.
테스트 실행
테스트를 실행하고 테스트 결과를 읽을 수 있도록 Test Lab을 올바르게 구성하기 위해 Cloud Storage 버킷에 대한 액세스를 구성해야 합니다. 이를 위해 표준 Firebase 사전 정의된 역할에 모두 포함되지 않은 특정 권한 구성이 필요합니다. Test Lab에 대한 액세스 권한을 부여하려면 다음 옵션 중 하나를 사용하세요.
Test Lab 액세스 권한이 필요한 사용자를 추가하고 Firebase Console을 사용하여 기존 프로젝트 역할을 할당하세요.
(선택사항) 사용자가 Test Lab에서 테스트를 실행할 수 있도록 편집자 프로젝트 역할을 할당합니다.
(선택사항) 사용자가 Test Lab에서 테스트 결과를 볼 수 있도록 뷰어 프로젝트 역할을 할당합니다.
gcloud CLI를 통한 테스트
gcloud CLI, Testing API 또는 Gradle 관리 기기에서 시작된 테스트는 기본적으로 Firebase에서 만든 Cloud Storage 버킷을 사용합니다. 이렇게 하려면 테스트를 실행하는 주 구성원에게 Firebase 프로젝트의 'roles/editor' 역할이 있어야 합니다.
이 역할을 부여할 수 없거나 자세한 테스트 결과를 90일 이상 보관하려면 --results-bucket gcloud 명령줄 옵션을 사용하여 테스트 결과를 자신이 소유한 Cloud Storage 버킷으로 전송하면 됩니다.
사용자가 Test Lab으로 테스트를 실행할 수 있도록 허용하려면 Firebase Test Lab 관리자(roles/cloudtestservice.testAdmin)와 Firebase 애널리틱스 뷰어(roles/firebase.analyticsViewer)를 둘 다 할당합니다.
사용자가 Test Lab에서 테스트 결과를 볼 수 있도록 허용하려면 Firebase Test Lab 뷰어(roles/cloudtestservice.testViewer)와 Firebase 애널리틱스 뷰어(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-04(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)."]]