Standard approach for writing automated end-to-end tests for plugins?

As the plugins I’ve authored have gotten more complex, I’ve been wondering more and more about how best to write automated tests for them.

@trashhalo wrote an amazingly helpful example repo using Spectron for end-to-end tests. However, Spectron is now (as of next week) deprecated, and I’ve been having trouble porting the examples to an alternative such as Playwright – Specifically, the hardest part has been just getting a version of Obsidian running in the correct vault, and with my plugin enabled. (@trashhalo, if you see this, would you be willing to talk more through the details of how you figured out the vaultOpen and enablePlugin steps, whether here or in the repo?)

Could anyone here speak to whether there are any existing plans for an “official” or central set of mocks, or an updated example for end-to-end tests from the Obsidian developers or from elsewhere in the community?

1 Like

For anyone reading this in the future, I’ve gotten automated tests working using without Spectron in a plugin here.

1 Like