Screenshot 2026-06-10 115739

Automated Performance Testing for React Native with agent-device

Von am 10.06.2026

Recently I started testing an idea I saw on X: using Agent Device from Callstack for automated performance testing.

I had already seen Agent Device before, because I also use Callstack’s React Native on-device AI package and follow some of their work. But the performance testing use case really caught my attention. The idea was simple but powerful: let an AI agent click through a mobile app, collect snapshots of performance numbers and check where frame drops or slow interactions happen. So I wanted to try it myself with one of my React Native builds.

What is Agent Device?

Agent Device is a CLI tool that lets AI agents control mobile apps. It can work with iOS and Android apps, including React Native apps, native apps and apps running on real devices, simulators or emulators.

Instead of only looking at code, the agent can actually interact with the app. It can inspect the UI, understand what is currently on the screen, tap elements, scroll, type into inputs, take screenshots, collect logs and repeat actions. That makes it useful for mobile testing, because the agent can behave more like a real user. It does not only follow a fixed script. It can look at the current app state and decide what to do next based on the UI.

Why performance testing?

Performance problems in mobile apps are not always obvious in the code. Sometimes a screen looks completely fine, but when you use it on a real phone, it feels slow. Maybe an animation drops frames. Maybe a list scrolls badly. Maybe opening a modal causes a short freeze.

That is why I thought Agent Device could be interesting for performance testing. My idea was not to replace proper profiling tools. You still need real profiling when you want detailed information about the JS thread, native rendering, memory usage or expensive renders. But Agent Device can help with the first layer of testing. It can go through the app automatically and collect signals about where the app feels slower or where frame drops happen.

My setup

For my test, I created a build and installed it on a real Android device. Of course, this could also work with emulators. But for performance testing, I think real devices make more sense. A real device gives you more realistic performance behavior. It has real hardware limits, real touch input and real rendering conditions.

After installing the app, I installed the Agent Device CLI. Then I used Antigravity with Gemini 3.5 Flash to control the agent. I used this model because the task was not really about deep reasoning. It mostly needed to follow instructions, use the allowed Agent Device commands and document what happened. Also, the free token limits were good enough for testing this kind of workflow.

Then I wrote a prompt that explained the use case. The agent should open the app, navigate through all screens, interact with different UI elements and take snapshots of the performance numbers. It should also watch out for frame drops, slow transitions and screens that feel less smooth. I also allowed the agent to use all the Agent Device commands it needed, so it could inspect the UI, tap elements, scroll and move through the app without asking every time.

Why this is useful

The biggest benefit for me is that the agent can do the boring part. Normally, performance testing often starts with manually opening the app, clicking around and trying to notice where something feels bad. This works, but it is easy to forget screens or to test in a different way every time.

With Agent Device, the agent can go through a defined flow again and again. It can collect snapshots, describe problems and give a first overview of possible performance issues.

This could be especially useful before releases. You could let the agent run through the main flows and check if there are obvious frame drops or slow interactions before shipping a new version.

What I learned

The most important thing is to see this as an extra testing layer, not as a replacement for proper profiling. Agent Device can help you detect where something might be wrong. But after that, you still need to investigate why it happens. Maybe the issue is caused by too many re-renders, heavy images, expensive calculations, navigation transitions or something happening on the native side.

Still, I think this workflow is really promising. It connects AI agents with real mobile app usage, not just code generation. The agent does not only write or review code. It actually uses the app and checks how it behaves.

I tested this workflow with my own app, Swiva. It is a React Native app for saving activities, places and ideas, and then swiping through them when you need inspiration. If you want to check it out, you can find it here: swiva.app

Final thoughts

I first saw the idea for performance testing with Agent Device on X/Twitter, and after trying it myself, I think it is a very practical use case. There are probably many more possibilities for this kind of mobile automation. QA flows, regression testing, onboarding checks, accessibility testing or release checks could all be interesting.

For me, performance testing was just the first thing that made the tool click. Letting an AI agent move through a real app, collect snapshots and point out possible slow parts feels like a small but useful step towards more automated mobile testing.

Beitrag kommentieren

(*) Pflichtfeld