Cuando un agente corre pruebas con pantalla, Charly las muestra en el panel En vivo del Chat: las páginas web, el simulador de iOS y el emulador de Android, en vídeo. Para que se vean, el proyecto tiene que correrlas de cierta forma. Esta guía dice cuál, y trae un texto para que tu agente lo deje listo solo.
Lo rápido: pídeselo al agente
En un proyecto nuevo, o en uno donde el panel no muestra lo que esperas, copia este texto y envíaselo al agente del proyecto. Revisa qué pruebas hay, cambia lo necesario, las corre una vez en cada plataforma y te cuenta qué hizo.
Prepara este proyecto para que sus pruebas con pantalla se vean en el panel «En vivo» de Charly. Sigue la guía https://getcharly.dev/docs/live-tests y aplica solo lo que corresponda a este proyecto:
1. Mira qué pruebas de UI tiene (Playwright, XCUITest, Compose/Espresso, Robolectric, Maestro) y cómo se lanzan hoy.
2. Charly reconoce la prueba por el INICIO del comando. Usa estas formas (pueden ir tras «cd … &&»):
- Web: «npx playwright test …» o «pnpm test:e2e».
- iOS: «xcodebuild test …», «pnpm test:ios» o un script llamado «test-ios.sh».
- Android en el emulador: «./gradlew … connectedDebugAndroidTest» directamente, nunca dentro de un script.
- Android en la JVM (Robolectric): «./gradlew … testDebugUnitTest» o un script llamado «test-android.sh».
- Maestro: «maestro test …».
3. iOS: corre las pruebas en un simulador; no abras Simulator.app (no hace falta verlo: Charly lo muestra).
4. Android: si las pruebas de pantallas son Robolectric, hazlas correr TAMBIÉN en el emulador sin reescribirlas: muévelas a src/sharedTest (añadida a los source sets test y androidTest), usa @RunWith(AndroidJUnit4::class), ApplicationProvider en lugar de RuntimeEnvironment, lleva @Config/@GraphicsMode a robolectric.properties, y añade testInstrumentationRunner y las dependencias androidTest. Arranca el emulador sin ventana y con vídeo:
emulator -avd <AVD> -no-window -grpc 8554 -grpc-use-token -no-boot-anim
5. Que las pruebas no dependan de un servidor real: un backend falso dentro de la prueba (en Android, con HTTP a 127.0.0.1 permitido en debug).
6. Deja los comandos en el README y córrelas una vez por plataforma (una clase basta) para comprobarlo. Cuéntame qué cambiaste y qué no se pudo.
Funciona con Claude Code, OpenCode o cualquier agente que pueda leer una web. Si tu agente no navega, el texto ya trae lo esencial.
Qué se ve en el panel
Pruebas
Qué ves
Necesita
Web (Playwright)
Cada página, en vídeo
Nada: Charly lo prepara al abrir el agente
iOS (XCUITest)
El simulador en vídeo, y sus copias si corren en paralelo
Un simulador (no un iPhone conectado)
Android instrumentadas
El emulador en vídeo
Un emulador abierto con -grpc
Android con Robolectric
Las pantallas a medida que se dibujan, como imágenes
Nada; no hay emulador que grabar
Maestro
El simulador o el emulador que esté encendido
Lo mismo que iOS o Android
Un teléfono conectado por cable no tiene vídeo en directo: solo simuladores y emuladores. Detox y las pruebas de integración de Flutter todavía no se muestran en el panel.
Todo esto se ajusta en Ajustes → Pruebas en vivo: calidad, qué pasa cuando nadie mira y cuánto le cuesta al Mac.
Web (Playwright)
No hay que cambiar nada. Cada agente que abre Charly arranca preparado: mientras Playwright corre, cada página se ve en el panel, en vídeo y con su nombre. Solo cuenta cómo empieza el comando:
npx playwright test
pnpm test:e2e
En un servidor por SSH también se ve, por la conexión del proyecto, con imágenes más pequeñas. Se elige por servidor en Ajustes → Pruebas en vivo → Servidores remotos.
iOS (XCUITest)
Las pruebas de UI corren en un simulador. Charly lee su pantalla directamente y la muestra en vídeo.
No abras Simulator.app.xcodebuild test enciende el simulador sin ventana; Charly ya lo muestra, y una ventana más solo duplica.
Con pruebas en paralelo, Charly muestra cada copia del simulador lado a lado.
xcodebuild test -scheme MiApp -destination 'platform=iOS Simulator,name=iPhone 17 Pro'
Android
Con vídeo: pruebas instrumentadas en el emulador
Abre el emulador sin ventana y con vídeo. Solo se ve en Charly, no aparece en el Dock:
Si el agente abrió el emulador sin -grpc, el Chat lo dice y ofrece «Reabrir con vídeo»: lo reinicia sin ventana y con vídeo, en segundos.
En Linux (Fedora, Ubuntu…)
Lo mismo: Android y web con Playwright (iOS solo existe en el Mac). El SDK va donde lo pone Android Studio, ~/Android/Sdk, y el emulador necesita KVM (/dev/kvm). En un equipo sin pantalla, o si el emulador se cierra solo al arrancar, ábrelo con -gpu guest:
En Linux el panel muestra la pantalla como imágenes seguidas (unas 12 por segundo del emulador, hasta 40 de una página) en vez de vídeo H.264: no hace falta instalar nada más.
Si tus pruebas son Robolectric
Robolectric dibuja las pantallas dentro de la JVM: es rápido, pero no hay pantalla que grabar, así que el panel muestra imágenes. No hace falta reescribirlas para verlas en vídeo: las mismas pruebas de Compose pueden correr también en el emulador.
Mueve las pruebas de pantallas y su código de apoyo a src/sharedTest/java (y sus recursos a src/sharedTest/resources). Las de lógica pura se quedan en src/test.
En app/build.gradle.kts, añade esa carpeta a los dos tipos de prueba y el runner del emulador:
android {
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
listOf("test", "androidTest").forEach {
getByName(it) {
kotlin.directories.add("src/sharedTest/java")
resources.directories.add("src/sharedTest/resources")
}
}
}
}
dependencies {
testImplementation("androidx.test.ext:junit:1.3.0")
androidTestImplementation("androidx.test:runner:1.7.0")
androidTestImplementation("androidx.test.ext:junit:1.3.0")
androidTestImplementation(platform("androidx.compose:compose-bom:2026.09.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
// y lo que ya usen tus pruebas: junit, mockwebserver…
}
En la clase base de las pruebas: @RunWith(AndroidJUnit4::class) (sirve para los dos), ApplicationProvider.getApplicationContext() en lugar de RuntimeEnvironment, y lo que iba en @Config o @GraphicsMode, a src/test/resources/robolectric.properties:
sdk=35
qualifiers=w402dp-h874dp-xxhdpi
Si las pruebas usan un backend falso local, permite HTTP a 127.0.0.1 en debug (network_security_config).
Así tienes las dos: testDebugUnitTest en segundos y sin emulador para el día a día, y connectedDebugAndroidTest cuando quieras verlas.
Con AGP 9, usa kotlin.directories: con java.directories las pruebas en Kotlin no se compilan. Y si mueves archivos, borra app/build/intermediates/built_in_kotlinc una vez: la compilación incremental puede seguir usando las clases viejas.
Progreso: «12 de 40»
Charly sabe que hay pruebas corriendo y cómo acabaron por el comando. Para mostrar también cuántas van (en la pestaña, en el iPhone y en la pantalla bloqueada), el proyecto puede escribir .aiko/progress.json mientras corren, como mucho cada 300 ms:
When an agent runs tests with a screen, Charly shows them in the Chat's Live panel: web pages, the iOS Simulator and the Android emulator, as video. For them to show, the project has to run them a certain way. This guide says which, and has a prompt so your agent can set it up by itself.
The quick way: ask your agent
In a new project, or one where the panel doesn't show what you expect, copy this and send it to the project's agent. It looks at the tests there, changes what's needed, runs them once on each platform and tells you what it did.
Get this project ready so its tests with a screen show in Charly's “Live” panel. Follow the guide https://getcharly.dev/docs/live-tests and apply only what fits this project:
1. Find its UI tests (Playwright, XCUITest, Compose/Espresso, Robolectric, Maestro) and how they're run today.
2. Charly recognizes a test run by the START of its command. Use these forms (they may follow “cd … &&”):
- Web: “npx playwright test …” or “pnpm test:e2e”.
- iOS: “xcodebuild test …”, “pnpm test:ios” or a script named “test-ios.sh”.
- Android on the emulator: “./gradlew … connectedDebugAndroidTest” itself, never inside a script.
- Android in the JVM (Robolectric): “./gradlew … testDebugUnitTest” or a script named “test-android.sh”.
- Maestro: “maestro test …”.
3. iOS: run the tests on a simulator; don't open Simulator.app (no need to see it: Charly shows it).
4. Android: if the screen tests are Robolectric, make them ALSO run on the emulator without rewriting them: move them to src/sharedTest (added to both the test and androidTest source sets), use @RunWith(AndroidJUnit4::class), ApplicationProvider instead of RuntimeEnvironment, move @Config/@GraphicsMode into robolectric.properties, and add testInstrumentationRunner and the androidTest dependencies. Start the emulator without a window and with video:
emulator -avd <AVD> -no-window -grpc 8554 -grpc-use-token -no-boot-anim
5. Tests shouldn't depend on a real server: a fake backend inside the test (on Android, with HTTP to 127.0.0.1 allowed in debug).
6. Put the commands in the README and run them once per platform (one class is enough) to check. Tell me what you changed and what couldn't be done.
It works with Claude Code, OpenCode or any agent that can read a web page. If yours can't browse, the prompt already has what matters.
What the panel shows
Tests
What you see
Needs
Web (Playwright)
Each page, as video
Nothing: Charly sets it up when it opens the agent
iOS (XCUITest)
The simulator as video, and its copies when they run in parallel
A simulator (not a plugged-in iPhone)
Android instrumented
The emulator as video
An emulator started with -grpc
Android with Robolectric
The screens as they're drawn, as images
Nothing; there's no emulator to record
Maestro
Whichever simulator or emulator is up
The same as iOS or Android
A phone plugged in by cable has no live video: only simulators and emulators. Detox and Flutter integration tests don't show in the panel yet.
All of it is tuned in Settings → Live tests: quality, what happens when nobody's looking, and how hard the Mac works.
Web (Playwright)
Nothing to change. Every agent Charly opens starts ready: while Playwright runs, each page shows in the panel, as video and with its name. Only how the command starts matters:
npx playwright test
pnpm test:e2e
On a server over SSH it shows too, over the project's connection, with smaller images. Pick it per server in Settings → Live tests → Remote servers.
iOS (XCUITest)
UI tests run on a simulator. Charly reads its screen directly and shows it as video.
Don't open Simulator.app.xcodebuild test boots the simulator without a window; Charly already shows it, and another window only doubles it.
With parallel testing, Charly shows each copy of the simulator side by side.
xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 17 Pro'
Android
With video: instrumented tests on the emulator
Start the emulator without a window and with video. It shows only in Charly, not in the Dock:
If the agent started the emulator without -grpc, the Chat says so and offers “Reopen with video”: it restarts it without a window and with video, in seconds.
On Linux (Fedora, Ubuntu…)
The same: Android and web with Playwright (iOS only exists on the Mac). The SDK goes where Android Studio puts it, ~/Android/Sdk, and the emulator needs KVM (/dev/kvm). On a machine with no screen, or if the emulator closes as it starts, open it with -gpu guest:
On Linux the panel shows the screen as images in a row (about 12 a second from the emulator, up to 40 from a page) instead of H.264 video: nothing else to install.
If your tests are Robolectric
Robolectric draws screens inside the JVM: it's fast, but there's no screen to record, so the panel shows images. You don't have to rewrite them to see them as video: the same Compose tests can also run on the emulator.
Move the screen tests and their support code to src/sharedTest/java (and their resources to src/sharedTest/resources). Pure-logic tests stay in src/test.
In app/build.gradle.kts, add that folder to both kinds of tests, and the emulator's runner:
In the tests' base class: @RunWith(AndroidJUnit4::class) (it works for both), ApplicationProvider.getApplicationContext() instead of RuntimeEnvironment, and what was in @Config or @GraphicsMode goes to src/test/resources/robolectric.properties:
sdk=35
qualifiers=w402dp-h874dp-xxhdpi
If the tests use a local fake backend, allow HTTP to 127.0.0.1 in debug (network_security_config).
Now you have both: testDebugUnitTest in seconds and without an emulator for every day, and connectedDebugAndroidTest when you want to watch them.
With AGP 9, use kotlin.directories: with java.directories Kotlin tests aren't compiled. And after moving files, delete app/build/intermediates/built_in_kotlinc once: incremental compilation may keep using the old classes.
Progress: “12 of 40”
Charly knows tests are running, and how they ended, from the command. To also show how far along they are (on the tab, the iPhone and the lock screen), the project can write .aiko/progress.json while they run, at most every 300 ms: