VSCode extension

in Japanese(日本語)

The vscode-fleetest extension surfaces scenarios in the Test Explorer (VSCode's Testing view), and adds device control, live inspection and result review around them. It works by spawning the same fleetest CLI used from the terminal, so behavior matches the CLI and MCP entry points.

Test Explorer

Scenarios appear in the Test Explorer as a folder → class → @Test method tree, built from TestProjects/<project>/scenarios/**/*.swift. The target <project> comes from the fleetest.project setting; when it is empty the extension auto-resolves it, creating TestProjects/project1/ on startup with fleetest project create project1 if it is missing and selecting that project1 project initially (see Creating a project). Each test item can be run in three ways:

Setting fleetest.profile routes Run/Run (dry-run)/Debug through fleetest api run --profile <name> instead of the raw fleetest.platform/fleetest.port/fleetest.serial settings — devices are provisioned (a Simulator / Emulator that is not running is booted; a physical device cannot be booted, so connect and prepare it yourself) and the app is auto-installed by the run profile; Run (dry-run) needs no device at all.

Run and Debug need a run profile (Run (dry-run) does not). If none is selected and the project has exactly one run profile, that one is saved to fleetest.profile and the run proceeds; with two or more, the run does not start and shows an error with a "Select run profile" button.

Steps View

A read-only fleetest Steps tree view (in the Test Explorer) follows the cursor: put the cursor inside a @Test method and it lists that scenario's scene groups and steps. Clicking a step jumps to the matching source line. It also opens from a scenario's right-click menu ("fleetest: Show Step List").

Device Monitor

Command "fleetest: Show Device Monitor" (or fleetest in the status bar at the bottom of VSCode) opens a webview panel of device tiles (one panel per workspace). Each tile shows the device name, a platform badge (iOS/Android), a status badge, and the current screen — streamed live by default via a headless helper (fleetest-simstream/fleetest-androidstream), falling back to periodic screenshots if streaming is unavailable. Turning on Use polling mode in the Settings tab switches from streaming back to the classic polling (screenshots at a fixed interval); the choice is remembered per workspace.

Live Control

Touching a device directly from its screenshot. It lives in the Grid View when exactly one device is selected (see above). Selecting a device does not connect to it; the first operation or Refresh does.

If the device's bridge isn't running yet, it is started automatically. An operation made while it starts shows a brief "The device is still getting ready — try again once the screen appears" notice instead of an error — normally this is tens of seconds (reusing an existing build); only the very first build for that device takes longer.

Gesture Action
Click Tap
Hold ~500ms without moving Long press (after 500ms the start point turns orange and shows "Long press"; moving on from there is a long-press-then-drag. Not shown while Command (⌘) is held, since releasing double-taps)
Drag Swipe (direction inferred from the drag vector)
Option (⌥) + drag Trace the exact finger path (the toolbar's Trace indicator lights up while Option is held; one continuous touch that never lifts; stopping and then moving while held is a long-press-then-drag (after 500ms still, the "Long press" mark appears; Maps on iOS then drops a pin instead of panning); it replays at the speed you traced; once a trace passes 60 seconds it is cancelled on the spot with an error, and nothing is sent when you release. After you release, while the device replays it, the traced line turns faint and a thick line grows over the part already replayed)
Command (⌘) + click Double tap (the toolbar's Double tap indicator lights up while Command is held)
Toolbar zoom in/out Pinch (whole screen)

On iOS, double tap (Command (⌘) + click) does not register in a Compose app on a physical device or in xcuitest mode. To zoom in, use the toolbar's zoom (a pinch) instead (gestures).

The element list next to the screenshot is for reading: clicking a row does not touch the device. Hovering over a row highlights that element's frame on the screenshot. The text field sends input to whatever the device has focused (tap the field on the screenshot first, then type).

After an operation it waits for the screen to settle, then re-reads the element tree and redraws the frames (it does not re-read while the device is running a test).

You can keep driving the device after the app under test leaves the foreground (iOS). When the home screen, the app switcher, another app or a system dialog comes to the front, Live Control follows whatever is on screen — gestures land on it and the element list shows it. It switches back on its own once the app returns to the front (if it does not, launch the app again).

Results Dashboard

Command "fleetest: Open Results Dashboard" shows, in the Device Monitor's Dashboard tab, a summary of fleetest api results for the project. Sections, top to bottom:

A toolbar control switches the aggregation period (last 5/10 minutes, 1/3/8/16 hours, or 1/2/3/7/30/90 days; the default is the last 16 hours, and the period you pick is remembered). Machine health and device health are always shown, even when the period has no runs. Refreshing keeps the current view visible while it re-fetches in the background.

Rerunning Failures and Reports

Self-healing

Selector self-healing (fingerprint matching) follows the run profile's heal (on by default). Setting fleetest.heal to true adds --set heal=true to Run (not Run (dry-run)) and Debug, turning it on even when the profile says heal: false. When a run produces fix suggestions, it writes the fixed selectors back to the scenario sources at the end and shows a notification. "Show Changes" opens VSCode's Source Control view; review the git diff and commit. Anything that could not be written back is listed in the execution log (see Self-healing).

Update Check

The Settings tab's "Updates" section is the one place updates are checked and applied:

fleetest.updateCheck (auto/off) controls the automatic once-a-day startup check, which only reads git ls-remote and never modifies the repository.

Display Language

fleetest.language (auto/ja/en) controls the extension's own UI text. auto follows VS Code's display language. You can also switch it from "Display Language" in the Settings tab.

The installer (Scripts/install.sh) writes ja to your VSCode user settings when the macOS language is Japanese, and en otherwise. It leaves fleetest.language untouched if you have already set it.

Cleaning Up Logs and Recordings

Recordings, reports, and logs pile up with every run, so each category has a size limit and the oldest files are deleted first. The controls are in the Settings tab's "Logs & recordings" section. They are stored as this Mac's settings (fleetest api retention), not VSCode settings, so they also apply to tests you run directly from a terminal.

iOS Simulator wallpaper cache (CLI only)

iOS 27 Simulators accumulate cache with repeated boots, and a single Simulator can reach tens of GB. fleetest purges a Simulator's cache automatically right before it boots that Simulator (wallpaper settings and other data are left untouched).

To purge the Simulators that are not running in one go, run fleetest clean --simulator-poster-cache from a terminal (--dry-run shows the amount without deleting). It purges every stopped Simulator on this Mac and skips booted ones, naming them in the output. This isn't part of the categories above or the Settings tab.

Key Settings

Setting Default Description
fleetest.binaryPath .build/debug/fleetest Path to the fleetest binary; falls back to PATH if not found
fleetest.project "" Test project name; auto-resolved when empty (the only project, or project1 when there are several)
fleetest.profile "" Run profile name; when set, it decides devices/app instead of fleetest.platform/port/serial
fleetest.heal false true forces self-healing on regardless of the profile (false follows the profile's heal, which defaults to on; fixed selectors are written back to the scenarios)
fleetest.buildBeforeRun true Build the Swift project before each run
fleetest.lptScheduling true Schedule longer-running scenarios first (LPT), using recent run history
fleetest.monitorInterval 2 Device Monitor polling interval, in seconds
fleetest.language "auto" Extension UI display language
fleetest.updateCheck "auto" Automatic once-a-day update check on startup