Skip to content

Test a desktop app

Desktop apps are tested exactly like web apps: same steps, same selectors, same results. Only the way the app starts is different. This page uses Calculator, which every Mac has, so you can follow along without building anything.

sisyphus.yaml
sisyphus: 1
apps:
calculator:
macos: { bundle: com.apple.calculator }
defaults:
timeout: 5s

A macOS app is named by its bundle id (bundle:), its path (app: ./build/MyApp.app) or an executable (exe: ./target/debug/my-app). Not sure of the bundle id? sis apps lists the apps that are running.

Terminal window
sis inspect calculator

You get the same kind of list as on the web: button "All Clear", button "Add", text "Edit field", the menu bar items. In Studio, Inspect shows it next to a screenshot, and Pick in app lets you point at an element in the real app.

tests/adds.sis.yaml
sisyphus: 1
name: Calculator adds numbers
app: calculator
steps:
- click: button "All Clear"
- each: [7, Add, 5, Equals]
as: key
do:
- click: button "${key}"
- expect: text "Edit field"
value: "12"

each runs the steps inside do: once per item, with the item in ${key}. value: checks a field’s current value.

Menus and keyboard shortcuts work too:

- click: menubaritem "Calculator"
- click: menuitem "About Calculator"
- expect: dialog >> text "Calculator"
- press: Mod+W # ⌘W on macOS
Terminal window
sis run

Sisyphus starts Calculator, runs the steps with real mouse clicks and key presses, and quits it afterwards. Desktop tests take over the screen, so they run one at a time, and you shouldn’t use the mouse while they run.

Hybrid apps have a native shell (window, menu bar, dialogs) around web content. Sisyphus sees both as one screen, so one test covers both:

sisyphus.yaml
apps:
notes:
electron: { main: ./main.js } # or executable: ./out/Notes.app/Contents/MacOS/Notes
editor:
macos: { app: ./src-tauri/target/release/bundle/macos/Editor.app } # a Tauri app
- click: menuitem "New Note" # native menu bar
- fill: textbox "Title" = Groceries # web content
- expect: navigation "Notes list" >> button "Groceries"

If your app takes seconds to start, or needs a project opened before every test, don’t restart it for each test: add reuse and Sisyphus keeps it open, tidying up between tests. See Desktop apps that start slowly.

Next: Writing good tests.

Made by Bussin Bytes© 2026 Bussin Bytes Ltd · sisyphus.bussinbytes.io