DeviceFarm App Manager Library
Biblioteca Robot Framework para reservar dispositivos, baixar aplicativos do Firebase, realizar upload e garantir a instalação no DeviceFarm.
Instalação
python -m pip install --upgrade devicefarm-app-manager-library
Import único
*** Settings ***
Library devicefarm_app_manager_library
O import unificado disponibiliza, entre outras, as seguintes keywords:
Seleciona Dispositivo Pronto Para UsoDownload APK FirebaseUpload Aplicativo para o devicefarmInstalar Aplicativo em dispositivo reservadoConsultar Aplicativo InstaladoGarantir Aplicativo InstaladoRetorna counter do aplicativo no devicefarm
Exemplo
*** Settings ***
Library devicefarm_app_manager_library
*** Variables ***
@{APP_VERSAO} 1.8.4 201 ANDROID
${PACKAGE} br.gov.caixa.fies
*** Test Cases ***
Reservar e instalar
${device_id}= Seleciona Dispositivo Pronto Para Uso
... platform=ANDROID
... preferred_devices=${DEVICES}
${resultado}= Garantir Aplicativo Instalado
... device_id=${device_id}
... app_identifier=${PACKAGE}
... version=${APP_VERSAO}[0]
... build=${APP_VERSAO}[1]
... platform=${APP_VERSAO}[2]
Configuração
Defina ENV_FILE com o caminho do .env do projeto consumidor ou disponibilize
as variáveis diretamente no ambiente:
DEVICEFARM_BASE_URL=https://seu-devicefarm/rest
DEVICEFARM_TENANT_ID=tenant-id
DEVICEFARM_WORKSPACE_ID=workspace-id
DEVICEFARM_CLIENT_ID=client-id
DEVICEFARM_CLIENT_SECRET=client-secret
DEVICEFARM_APP_FOLDER=./resources/apks
DEVICEFARM_STATE_FILE=./resources/apks/install_state.json
DEVICEFARM_UPLOAD_CACHE_FILE=./resources/apks/cache/upload_cache.json
FIREBASE_SERVICE_ACCOUNT_FILE=./credentials/firebase.json
FIREBASE_PROJECT_NUMBER=project-number
FIREBASE_APP_ID=app-id
DEVICEFARM_REQUEST_TIMEOUT=30
LOG_DIR=output
Os nomes antigos oauthClientId e oauthClientSecret ainda são aceitos na
versão 1.1.0, mas estão depreciados.
Compatibilidade
Os imports antigos continuam disponíveis durante a migração:
Library device_farm_library
Library upload_app_library
Library devicefarm_app_manager
Novos projetos devem utilizar apenas devicefarm_app_manager_library.
Desenvolvimento
python -m pip install -e .
python -m pytest -q
python -m build
python -m twine check dist/*
A publicação no PyPI é executada pelo workflow de release quando uma tag
v* é enviada ao GitHub. O workflow valida se a tag corresponde à versão do
pyproject.toml antes da publicação.
Metadata
Release files for devicefarm-app-manager-library 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| devicefarm_app_manager_library-1.1.0.tar.gz | 17.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| devicefarm_app_manager_library-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.1 kB
Release files / devicefarm_app_manager_library-1.1.0.tar.gz
| Download URL | devicefarm_app_manager_library-1.1.0.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5feb6a636b6e4470f7415ea500761d9fc1709b7e24df4848b817950e0575173e
|
|
BLAKE2b-256 checksum How to use checksums |
e516c9e24dbcb81cc0e11f671e997beb09886cb28fae5ac34efb713a2c9790f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / devicefarm_app_manager_library-1.1.0-py3-none-any.whl
| Download URL | devicefarm_app_manager_library-1.1.0-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58ee818e63a440d6a7c9f2c516c2a16f8f3683418de8d29baa54e1b48e4abc4a
|
|
BLAKE2b-256 checksum How to use checksums |
8bafa18d13c833f02f2d56212b224c4ccaddceaee393a30c2731ba13669c0ee2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|