Get started with Optics

Learn what Optics does, what it tests, and the fastest way to see it run.

Optics is open-source test automation for apps on Android, iOS, the web and TV. You describe what a person does in your app, such as signing in or adding a product to the cart. Optics repeats it on a real device, an emulator or a browser, and tells you when the app stops behaving.

Four ways to create a test. Each one writes the same plain-text suite, which runs the same way on every build.

How a test works#

A test is a short list of steps in a file, one action per row. A step reads like a sentence: Press Element Sign in, Enter Text email field [email protected].

You don't write code to find things on screen. Optics looks for each element several ways, cheapest first: by its position in the app's UI tree, by its visible text, by reading a screenshot, and by matching a picture of it. When a redesign breaks one way, the next one takes over, so tests break less often.

When a run finishes, you get a pass or fail for every step, screenshots of what Optics saw, and a JUnit report that any CI system can read.

What you can test#

TargetHow Optics drives it
Android and iOS appsThrough Appium, on emulators, simulators and real phones
WebsitesThrough Playwright or Selenium, no device needed
Android TV, Samsung Tizen, LG webOSThrough Appium, with the remote's arrow keys. See TV
Locked-down production devicesAs a Bluetooth mouse and keyboard, with a camera watching the screen. See Production devices

Optics runs on macOS, Linux and Windows with Python 3.12 or newer. There is no account, cloud service or API key. Everything runs on your machine or in your CI.

When Optics is not the right tool#

Optics tests what a person does through the interface. Reach for something else for unit tests, load testing, API-only contract tests, or pixel-by-pixel visual comparison.

Start here#