Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New E2E suite #64

Open
frondeus opened this issue Jan 27, 2023 · 0 comments
Open

New E2E suite #64

frondeus opened this issue Jan 27, 2023 · 0 comments
Labels
Milestone

Comments

@frondeus
Copy link
Owner

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:

  • 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.

References

@frondeus frondeus added the good first issue Good for newcomers label Jan 27, 2023
@frondeus frondeus added this to the 0.4.0 milestone Jan 27, 2023
@frondeus frondeus modified the milestones: 0.4.0, 0.5.0 Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant