Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Executing UI Tests

No-Jun Park edited this page Apr 15, 2019 · 4 revisions

Prerequisite

  1. Connect Fire TV device via USB or IP, and adb devices should show the device
  2. For safety, remove the existing Firefox apk and test runner apk by: adb uninstall org.mozilla.tv.firefox.debug adb uninstall org.mozilla.tv.firefox.debug.test

Using Gradle (Recommended)

  1. Go into the firefox-tv folder, and run ./gradlew clean
  2. Build apk and execute test by ./gradlew connectedAndroidTest
  3. After the test execution, collect the test report from firefox-tv/app/build/reports/androidTests/connected folder.

Using Android Studio

  1. Open firefox-tv, set the tree view to Project
  2. Go to App -> src -> androidTest -> java, right click, and select Run All Tests

Using Bitbar (for Bitbar account holders only)

  1. Login to https://mozilla.testdroid.com/#
  2. Under Project, you can either create your own project, or create a new run in our default ‘Firefox for Fire TV (master)’ project by pressing the green + button. Now you’re in the Test Run Creator.
  3. For framework, select Android Orchestrator. That one is customized for our UI test execution.
  4. Under Choose files, click ‘Click to choose or upload file’ and upload app apk and test runner apk, which can be built via ./gradlew assembleAndroidTest assembleSystemDebug. Select both app, and click ‘Use Selected'
  5. Under ‘Choose devices’, the ‘Amazon’ device group you can find under ‘Use Existing Device Group’ pulldown is what we use for master branch test. (4K and Gen 2) You can also hand pick devices if you wish. No need to mess with Additional settings.
  6. Click ‘Create new test run’ and the test will run.