Is there an E2E test suite we can run to verify a plugin doesn't break Obsidian core functionality?

TLDR: Does the Obsidian team expose an e2e test suite that plugin developers can run to validate that none of the core Obsidian functionality has broken?

I recently started working on some plugins for Obsidian. I spotted that an unpublished, in-flight plugin I’m working on broke Obsidian Canvas functionality (the plugin was stealing the space keydown event from Canvas, due to a UI library I’m using). I added an e2e test and fixed it (to be more precise I directed Claude Code to add e2e test and fix it).

But it made me wonder: does the Obsidian team have an e2e suite for core functionality, or could they expose one, so plugin developers can take a dependency on it when publishing a plugin? Preferably with extension points exposed to activate a particular state prior to running the suite. In my case, that would be making the plugin pane visible before the suite runs.

I’m not aware of an official core suite either, but you can drive the real Obsidian app from Playwright. My plugins (Snipsy and Dashy) have run its E2E this way for a while. The setup that ended up stable:

  1. Launch through a local Electron. Add electron as a devDependency and pass Obsidian’s app.asar to _electron.launch({ args: [asarPath, "--user-data-dir=" + tmpDir] }). The shipped Obsidian binary has the Node inspect fuse disabled, so Playwright can’t attach to it directly.
  2. Skip the vault picker. Before launch, write an obsidian.json into that user-data dir with your test vault marked open: true. Obsidian then opens straight into the workspace.
  3. Fresh vault per test. Keep a pristine vault in the repo (with .obsidian/community-plugins.json listing your plugin) and copy it to a temp dir for each test, so one spec’s edits never leak into the next.
  4. Get past the trust dialog without clicking it. Both buttons open Settings afterwards, and closing that modal from tests is flaky. Press Escape, then call app.plugins.setEnable(true) via page.evaluate.
  5. Assert through window.app, not the DOM. Read the active editor’s text or the workspace state in page.evaluate. CSS classes change between Obsidian versions, the API changes less often.

For “my plugin didn’t break core”, I’d write a few canary specs for the areas your plugin can plausibly touch (Canvas keyboard handling in your case) and run them with the plugin enabled. They’ll catch the next “stole the space key” bug in CI instead of in a user’s vault.

You can use the Obsidian CLI. It can do quite a lot. You need an open Obsidian window and the CLI then has access to Electro runtime and the vault which has currently the focus (active window). When the LLM is starting testing you can’t work on the same time with Obsidian or some tests might fail.

It can …

  • reload the plugin and check if its loaded
  • make screenshots
  • eval JS code inside the plugin
  • simulate mouse events
  • read the DOM
  • read the console

I hope this helps

Kai