You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyrinControl grows in new features every release. It means it's getting harder and harder to test it manually with all the edge cases in mind.
Because I want a stable and trouble-free module, E2E (end-to-end) tests are necessary. By automating the test suite, we can ensure some quality control.
Moreover, good E2E tests can be used as a learning tool for newcomers, and if we could record them - as free documentation on how to run this module :)
Specs
I chose Cypress.io as my E2E framework. It does support WebGL (used by pixi.js), and runs directly in the target browser.
Let's prepare a cypress suite per feature:
Setting Auth key
Searching for a mood
Playing mood from importer dialog
Importing soundset
Creating a macro with a mood
Playing a mood from a playlist
Setting a link between a mood and a scene
Playing an element via macro
Creating an ambient sound
Triggering ambient sound
Requesting mood change by non-GM player.
A test suite should intercept the HTTP requests to Syrinscape API and stub the responses. First of all, we do not want to overload already slow Syrinscape servers, but we do not want to entirely depend on an external API that might have an outage.
All tests should be isolated. Each test should clear the world before it starts.
By clearing the world, I mean removing ambient sounds, and playlists, clearing cache, removing scenes, etc. Each test should have only a blank slate and not be interfered with by another.
Tests should run in one thread.
Acceptance criteria
Tests should work on a local developer machine and be easy to setup
Tests should work in many browsers
Tests should not send a request to Syrinscape API
(optionally if possible) Tests should be easily recorded.
(optionally if possible) There should be one additional test that acts as a "demo" for all core functions of the module.
Context
SyrinControl grows in new features every release. It means it's getting harder and harder to test it manually with all the edge cases in mind.
Because I want a stable and trouble-free module, E2E (end-to-end) tests are necessary. By automating the test suite, we can ensure some quality control.
Moreover, good E2E tests can be used as a learning tool for newcomers, and if we could record them - as free documentation on how to run this module :)
Specs
I chose Cypress.io as my E2E framework. It does support WebGL (used by pixi.js), and runs directly in the target browser.
Let's prepare a cypress suite per feature:
A test suite should intercept the HTTP requests to Syrinscape API and stub the responses. First of all, we do not want to overload already slow Syrinscape servers, but we do not want to entirely depend on an external API that might have an outage.
All tests should be isolated. Each test should clear the world before it starts.
By clearing the world, I mean removing ambient sounds, and playlists, clearing cache, removing scenes, etc. Each test should have only a blank slate and not be interfered with by another.
Tests should run in one thread.
Acceptance criteria
References
The text was updated successfully, but these errors were encountered: