Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Run Android Tests on Real Phones in GitHub Actions

Описание и применение

Автоматизированный workflow GitHub Actions подключается к реальному Android‑устройству, устанавливает APK, запускает тесты и корректно отключает устройство, обеспечивая надёжную проверку аппаратных особенностей.

Задача

CI pipelines using emulators fail to detect hardware‑specific issues, leading to green builds that miss real‑device bugs.

Результат

The workflow reliably runs Android tests on real devices, handling flaky connections, ensuring clean device state, and preventing test collisions via concurrency groups.

Рабочий процесс

  • Checkout repository
  • Set up Android SDK and platform‑tools
  • Build debug APK
  • Connect to device with retry loop
  • Install APK on device
  • Run instrumented tests
  • Disconnect device (always)

Доказательства

Emulators in CI are fine until your app cares about being on a real device.

Источник

The loop in the first block handles that: connect, wait, check that the state is device, and only then move on.

Источник

A concurrency group makes device jobs queue instead of colliding.

Источник

  • Дата записи: 2026-10-06T09:55:56.412Z