Skip to content

Several apps in one test

Some behaviour only exists between apps: the copy that lands in a document, the export that opens in Preview, the file dragged in from Finder. Sisyphus can drive several apps in one test, and the test still reads like a one-app test.

name: The result copies into TextEdit
app: calculator
steps:
- type: 6*7=
- press: Mod+C
- expect: { equals: ["${clipboard()}", "42"] }
- in: TextEdit # these steps work in TextEdit…
do:
- press: Mod+N
- press: Mod+V
- expect: textbox
text: "42"
- expect: text "Edit field" # …and this one is back in Calculator
value: "42"

After the in: block, steps are back in the test’s own app. There’s no “current app” to keep track of.

Start a selector with app "…" >>:

- expect: app "Preview" >> window ~"report.pdf"
- click: app "Finder" >> button "Back"
  • An app from your sisyphus.yaml, with its launch settings.
  • A system app: Finder, Dock, menu bar, or frontmost (whatever app is in front: for “clicking this opens some app”).
  • Any installed app, by name (TextEdit, Preview) or bundle id (com.apple.TextEdit).

Most other apps need no configuration at all. sis validate catches a misspelt name and suggests the closest one.

- expect: { app: Preview, running: true }
- expect: { app: Preview, frontmost: true }
- wait: { app: Preview, running: false } # it quit
- drag: { from: app "Finder" >> ~"data.csv", to: list "Imports" }
- drag: { file: ./fixtures/data.csv, to: list "Imports" } # a file, as if dropped from the desktop

${clipboard()} reads it; set: { clipboard: some text } fills it before a paste.

At the end, Sisyphus quits the apps the test started. Apps that were already running are never quit; Sisyphus only closes the windows the test opened in them. What it did is listed in the result.

Test each app’s own behaviour in single-app tests: they’re faster and fail for one reason. Keep cross-app tests for the interaction itself.

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