mitmedialab / prg-raise-playground

Boilerplate for playing with and deploying Scratch 3.0 modifications!
https://mitmedialab.github.io/prg-extension-boilerplate/main/
MIT License
19 stars 40 forks source link

Automated version testing #360

Open pmalacho-mit opened 5 months ago

pmalacho-mit commented 5 months ago

As we scale up RAISE Playground extension development (enabling not only the development of new extensions, but also the improvement and expansion of existing extensions), we need a way to ensure our updates to existing extensions don't break already saved projects.

In order to do this, we need two distinct automated workflows (which can eventually be joined into a single workflow that runs via a github action):

  1. On a given branch, generate an sb3 project that sufficiently utilizes the blocks of an extension.
    • The definition of sufficiently might change over time, but at least to begin with it can simply be that all blocks are included in the saved project
  2. On a given branch (likely one that branches off from dev), load in ansb3` project that is assumed to be the output of workflow (1) based on a previous version of the extension under test. Assert that no errors in loading occur, and thus no 'breaking' changes have occurred as far as project loading is concerned.

In order to accomplish the above workflows, we should use something like playwright so that we can fully leverage the actual scratch-gui / scratch-vm saving and loading mechanisms.

To implement the above tests, you'll likely have a node script coordinate the following activities: