homework_7: add dual emulator run and cleanup
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
## Инфраструктура
|
||||
`docker-compose.yml` поднимает:
|
||||
- `wiremock` для раздачи `wishlist.apk`;
|
||||
- `android-emulator` с Appium и VNC.
|
||||
- `android-emulator-1` (Android 13, Appium `:4723`, VNC `:6080`);
|
||||
- `android-emulator-2` (Android 12, Appium `:4725`, VNC `:6081`).
|
||||
|
||||
Приложение не маунтится в эмулятор и не ставится через ADB.
|
||||
APK скачивается Appium по capability `app`.
|
||||
@@ -50,7 +51,7 @@ $env:DB_PASSWORD="student"
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
2. Дождаться статуса `healthy` у `wiremock` и `android-emulator`:
|
||||
2. Дождаться статуса `healthy` у `wiremock`, `android-emulator-1`, `android-emulator-2`:
|
||||
|
||||
```bash
|
||||
docker compose ps
|
||||
@@ -64,5 +65,13 @@ docker compose ps
|
||||
mvn test
|
||||
```
|
||||
|
||||
По умолчанию тесты запускаются параллельно на уровне классов (2 потока), а сессии распределяются по эмуляторам через `BlockingQueue`.
|
||||
|
||||
Опционально можно явно задать пул эмуляторов:
|
||||
|
||||
```powershell
|
||||
$env:MOBILE_EMULATORS="android-emulator-1|http://localhost:4723|Android Emulator,android-emulator-2|http://localhost:4725|Android Emulator"
|
||||
```
|
||||
|
||||
## Логи
|
||||
После выполнения тестов logcat сохраняется в файл `logcat.txt` в корне проекта через Selenium/Appium logs API.
|
||||
|
||||
Reference in New Issue
Block a user