E2E testing of plugins with WebdriverIO

Hello, community!

I’ve always been tired of manually verifying important user scenarios before releasing a new version of my plugin.

Being initially inspired by old forum post from @trashhalo (For plugin developers: Write test cases that interact with a running obsidian instance!), I began exploring WebdriverIO and wdio-electron-service (which is a successor of now deprecated spectron) to automate the process of end-to-end user scenarios verification.

Even though now, in 2025, there is a dedicated package by @jesse-r-s-hines for testing Obsidian with WebdriverIO (Package for end-to-end testing Obsidian plugins!), in reality there are still just a few plugin repositories doing some sort of E2E-testing.

That’s why I decided to collect all my experience with WebdriverIO and wrote an article covering the following topics:

  • Initial bootstrap of WebdriverIO for testing an Electron-based app
  • Preparing a clean Obsidian vault with your plugin for each E2E test execution
  • Interacting with Obsidian UI elements to emulate user’s behaviour
  • Writing and debugging test scenarios
  • Isolating tests from non-deterministic external factors (like network)
  • Collecting code coverage from E2E tests
  • Running tests in Docker container both locally and in CI
  • Building detailed Allure reports with screenshots and video recordings

I hope this will inspire you to integrate WebdriverIO into your plugin’s repos and start testing your plugins end-to-end.

:backhand_index_pointing_right:Read the article here
:light_bulb: Or check out how I use WebdriverIO in a real plugin project: obsidian-timecodes-plugin

1 Like