Test your Obsidian plugins end-to-end using WebdriverIO!
wdio-obsidian-service
can:
- Download and install Obsidian
- Test your plugin on multiple Obsidian app versions and installer/electron versions
- Download Chromedriver matching the Obsidian electron version
- Sandbox Obsidian so tests don't interfere with your system Obsidian installation or each other
- Run tests in parallel
- Open and switch between vaults during your tests
- Provide helper functions for common testing tasks
- Run tests in GitHub CI
For instructions on how to set up end-to-end tests using WDIO Obsidian Service see the service docs, or get started quickly by using the sample plugin as a template.
This project is split into several NPM packages:
- wdio-obsidian-service: A WebdriverIO service to test Obsidian plugins
- obsidian-launcher: Package for downloading and launching different versions of Obsidian
- wdio-obsidian-reporter: Wrapper around @wdio/spec-reporter that logs Obsidian version instead of Chromium version
API docs for all the packages are available here.
PRs and issues welcome! See CONTRIBUTING.md for instructions on how to setup local development.