platform-ios: reduce XCTest agent per-tick cost on constrained hosts
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- ios, swift, typescript
- Área
- mobile-dev, performance, testing-qa
Línea de trabajo
Empieza por el bucle de tick en HarnessXCTestAgentUITests.swift y PermissionPromptWatchdog.swift; después, sigue configurePermissions y ensureStarted en xctest-agent.ts. Lee xctest-agent-capabilities.ts para entender los datos de capacidades del host y la ruta existente de HARNESS_XCTEST_AGENT_TICK_INTERVAL_MS. El trabajo estará terminado cuando el watchdog evite snapshots innecesarios, el sondeo de permisos espere a que la aplicación esté lista y los hosts con recursos limitados usen un intervalo adaptativo sin romper el flujo existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
Harness runs unreliably on small CI hosts (e.g. GitHub macos-latest: 3 vCPU / 7 GB). One constant source of load inside the simulator is the XCTest agent's tick loop.
Every tick (default 1 s, HarnessXCTestAgentUITests.swift testAgentSession) does:
observeTargetApplication()→targetApplication.statequeryPermissionPromptWatchdog.tick()→springboard.buttons.matching(NSPredicate(label IN ...)).firstMatch.exists
The SpringBoard query is a full accessibility-tree snapshot served by testmanagerd, so the sim pays for an AX snapshot every second for the whole run — including during the app's launch/connect window, which is exactly when the host is most starved. configurePermissions is sent right at ensureStarted (packages/platform-ios/src/xctest-agent.ts), so auto-accept polling is active before the app under test has even been launched.
Proposal
- Only run the watchdog query when the target app is
.runningForeground(skip while it is not running / launching). - Defer enabling
autoAcceptPermissionsuntil the app has reported ready over the bridge, rather than at agent start. - Make the tick interval host-adaptive: the CLI already forwards
HARNESS_XCTEST_AGENT_TICK_INTERVAL_MS; derive a default (e.g. 2–3 s) fromgetHostCapabilities()on constrained hosts instead of the fixed 1 s. - Cheapen the probe: check
springboard.alerts.firstMatch.existsfirst and only enumerate buttons when an alert is present.
Files
packages/platform-ios/xctest-agent/HarnessXCTestAgentUITests/HarnessXCTestAgentUITests.swiftpackages/platform-ios/xctest-agent/HarnessXCTestAgentUITests/PermissionPromptWatchdog.swiftpackages/platform-ios/src/xctest-agent.ts(getLaunchEnvironment,ensureStarted)packages/platform-ios/src/xctest-agent-capabilities.ts
Part of a broader effort to make Harness reliable on constrained CI runners.
- Lenguaje dominante
- TypeScript
- Estrellas
- 330
- Forks
- 17
- Merge medio
- 8 d 11 h
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/react-native-harness
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
Todos los issues de callstackincubator/react-native-harness
Issues similares
-
Resources: New palettes of MacaoAbiertoresources
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
railmapgen/rmg-palette#2445 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
danielmiessler/LifeOS#2242 ·
Los mantenedores suelen responder en 5 días
-
good first issue hacktoberfest help wanted translation
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
callstackincubator/appduct#129 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100