Files
Kacper Kapuściak bb1fc00aaf chore(examples): upgrade examples to e2e 0.23.1 (#1838)
Moves every example to e2e 0.23.1, @e2e-dev/web 0.16.0, and @e2e-dev/mobile 0.12.7, and records the web check in the four web examples' READMEs.
2026-11-16 12:36:01 +00:00
..

e2e with Jetpack Compose

A Jetpack Compose greeting app for Android with three locator tests and two agent tests. The test project is in e2e/, next to the Gradle project.

Compose app with the greeting hello, Ada! Compose app with the error enter a name first.

Run

Install Android Studio with an Android emulator. Start the emulator, open this folder in Android Studio, and press Run.

To build from a terminal instead, point Gradle at a JDK 17+ and the Android SDK. On macOS, Android Studio's defaults are:

export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
export ANDROID_HOME="$HOME/Library/Android/sdk"
./gradlew installDebug

Use Node 22.22.3+, 24.8+, or 26+ for the tests. From this folder:

cd e2e
npm install
npx agent-device doctor
npm run test:e2e

After app changes, build and install again before you run the tests.

Agent tests

Set a Vercel AI Gateway key. From e2e/:

AI_GATEWAY_API_KEY="your-key" npm run test:e2e

Without the key, the agent tests skip. Add -- --no-cache to use fresh model calls. Results are in e2e/.e2e/report.json.

getByTestId finds a Compose testTag once the screen sets testTagsAsResourceId; see GreetingScreen.kt. See e2e/e2e.config.ts and e2e/tests/ for the setup. For device setup and CI, see the Mobile guide.

The bundled fonts use the SIL Open Font License.

Last checked on 2026-11-04 with e2e 0.22.0, @e2e-dev/mobile 0.12.5, Kotlin 2.4.20, AGP 9.4.1, and Compose BOM 2026.09.00 on an Android 16 emulator. The three locator tests and the two agent tests passed.