@astur-mobile/test
v0.6.0-beta
Published
Playwright Test integration for Astur.
Maintainers
Readme
Astur drives real Android and iOS apps through the platforms' own automation engines — Android UIAutomator (Kotlin) and Apple XCUITest (Swift) — exposed through a Playwright-style API. No Appium server, no WebDriver bridge. @astur-mobile/test is the Playwright Test integration: the device fixture, expect, locators, auto-waiting, projects, retries, and reporters you already know.
npm install -D @astur-mobile/test astur-mobile @playwright/test
@playwright/testis a peer dependency — Astur extends the Playwright Test runner, so your project provides it.
import { test, expect } from '@astur-mobile/test';
test('login', async ({ device }) => {
await device.getByLabel('Email').fill('[email protected]');
await device.getByRole('button', { name: 'Login' }).tap();
await expect(device.getByText('Welcome')).toBeVisible();
});Because Astur is built on Playwright Test, you can run specs with the CLI or straight from the VS Code Playwright extension (the green ▶ run button) — fixtures, projects, expect, retries, and reporters all work.
Runs where your app runs
| Platform | Simulator / Emulator | Real device | | --- | :---: | :---: | | Android | ✅ | ✅ | | iOS | ✅ | ✅ |
Native locators (getByRole, getByLabel, getByText, getByTestId), gestures (tap, double-tap, long-press, swipe, drag, scroll-into-view), forms, file upload, permissions, rotation, and hybrid WebView DOM control — all through one API.
Try it in 30 seconds
A ready-to-run demo app ships with the framework; each screen exercises one capability (tap, scroll, swipe, drag, forms, upload, WebView). Drive it through the Inspector without writing a test:
# Android emulator
npx astur-mobile codegen --android --device emulator-5554 \
--app ./assets/astur.demo.android.apk --app-id com.astur.demo
# iOS simulator
npx astur-mobile codegen --ios --simulator \
--app ./assets/Astur.app --app-id com.astur.demoOr clone the astur-boilerplate starter for full Android and iOS suites.
Resources
- 📖 Documentation — guides, configuration, and platform notes
- 🚀 Getting Started — install and run your first test
- 🔎 Inspector & Codegen — stream a device, inspect locators, record flows, export specs
- 📱 Demo App — a tour of every automation capability
- 🧩 astur-boilerplate — clone-and-run example suites
Sponsor
Astur is open source and built in the open. If it saves your team time, consider supporting development:
License
Apache-2.0 © Amr Salem. "Astur" is a trademark — see the main repository.
