기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
2단계: AWS Device Farm Gradle 플러그인 설정
아직 리포지토리를 복제하고 플러그인을 설치하지 않았다면 Device Farm Gradle 플러그인 구축 절차를 따르세요.
AWS Device Farm Gradle 플러그인 구성
-
build.gradle
의 종속성 목록에 플러그인 아티팩트를 추가하세요.buildscript { repositories { mavenLocal() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' classpath 'com.amazonaws:aws-devicefarm-gradle-plugin:1.0' } }
-
build.gradle
파일에 플러그인을 구성하세요. 다음에 제시되는 테스트별 구성이 안내서 역할을 합니다.apply plugin: 'devicefarm' devicefarm { // Required. The project must already exist. You can create a project in the AWS Device Farm console. projectName "My Project" // required: Must already exist. // Optional. Defaults to "Top Devices" // devicePool "My Device Pool Name" // Optional. Default is 150 minutes // executionTimeoutMinutes 150 // Optional. Set to "off" if you want to disable device video recording during a run. Default is "on" // videoRecording "on" // Optional. Set to "off" if you want to disable device performance monitoring during a run. Default is "on" // performanceMonitoring "on" // Optional. Add this if you have a subscription and want to use your unmetered slots // useUnmeteredDevices() // Required. You must specify either accessKey and secretKey OR roleArn. roleArn takes precedence. authentication { accessKey "AKIAIOSFODNN7EXAMPLE" secretKey "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" // OR roleArn "arn:aws:iam::111122223333:role/DeviceFarmRole" } // Optionally, you can // - enable or disable Wi-Fi, Bluetooth, GPS, NFC radios // - set the GPS coordinates // - specify files and applications that must be on the device when your test runs devicestate { // Extra files to include on the device. // extraDataZipFile file("path/to/zip") // Other applications that must be installed in addition to yours. // auxiliaryApps files(file("path/to/app"), file("path/to/app2")) // By default, Wi-Fi, Bluetooth, GPS, and NFC are turned on. // wifi "off" // bluetooth "off" // gps "off" // nfc "off" // You can specify GPS location. By default, this location is 47.6204, -122.3491 // latitude 44.97005 // longitude -93.28872 } // By default, the Instrumentation test is used. // If you want to use a different test type, configure it here. // You can set only one test type (for example, Calabash, Fuzz, and so on) // Fuzz // fuzz { } // Calabash // calabash { tests file("path-to-features.zip") } }
-
gradle devicefarmUpload
의 태스크를 사용하여 Device Farm 테스트를 실행하세요.빌드 출력은 테스트 실행 모니터링이 가능한 Device Farm 콘솔로의 링크를 출력합니다.
다음 단계: IAM 사용자 생성