cb6d9e61d1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.7 KiB
1.7 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, params, output, notes
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | params | output | notes | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gradle_instrumented_test | function | bash | infra | 1.0.0 | impure | gradle_instrumented_test(project_dir: string, module: string) -> int | Corre instrumented tests Compose en emulador/device Android conectado. |
|
|
false | error_go_core | false | bash/functions/infra/gradle_instrumented_test.sh |
|
Stdout con resultados. Linea final 'REPORT: <path>'. Exit: 0=OK, 3=no device, otro=fallos tests. | Requiere emulador corriendo. Lanzar antes con android_emulator_start. connectedAndroidTest corre en TODOS los devices conectados. |
Ejemplo
# Correr instrumented tests del modulo app
gradle_instrumented_test /home/user/MyAndroidProject
# Correr instrumented tests de un modulo especifico
gradle_instrumented_test /home/user/MyAndroidProject feature_login
Notas
Requiere emulador corriendo. Lanzar antes con android_emulator_start. connectedAndroidTest corre en TODOS los devices conectados.
El script verifica que haya al menos un emulador o device conectado antes de lanzar Gradle. Si no hay ninguno, imprime un mensaje descriptivo a stderr y sale con exit code 3, permitiendo al llamador distinguir "no device" de "tests fallaron".
La linea REPORT: <path> se imprime siempre al final (incluso si los tests fallan), para que el llamador pueda abrir el reporte HTML independientemente del resultado.