gitmyhub

podium

Rust ★ 0 updated 10d ago

Rust crate for interacting with mobile devices programmatically

A Rust library for writing automated Android UI tests as async code, using Maestro under the hood to tap, type, and check on-screen elements.

RustAndroidgRPCMaestrosetup: moderatecomplexity 3/5

Podium is a Rust library for writing automated tests that control an Android app running on an emulator or a real device, with iOS support planned but not yet built. Instead of asking you to write test steps in a separate configuration file, it lets you write the test directly as async Rust code that taps buttons, types text, checks whether something is visible on screen, scrolls until an element appears, and takes screenshots.

Under the hood, Podium relies on a tool called Maestro to actually talk to the device. When you start a test, Podium installs two small helper apps onto the device, opens a connection to it over USB debugging, and starts a background service on the device that Podium's code then sends commands to and reads results from. All of this setup happens automatically when your test calls the build function, so as a developer you mostly just describe the actions you want the test to take.

To use it, you add the library to a Rust project, connect to a device or emulator, launch your app, and then chain together calls like tapping an element that shows specific text, typing into a focused field, and asserting that a welcome message appears. Elements on screen can be found by their exact text, a regular expression pattern, or their internal identifier, and if there are several matching elements you can pick a specific one by its position in the list.

There is also a mock mode meant for unit-testing code that itself calls Podium, so you can test your testing logic without a real device attached. The known limitations are clearly listed: it only supports Android for now, typed text replaces a field's contents rather than simulating each keystroke, and swipe gestures are tuned for a common screen resolution and may need adjusting on unusual screen sizes.

Where it fits