wp-media / wp-rocket-e2e

Playwright E2E testing repo
GNU General Public License v3.0
0 stars 0 forks source link

As a QA engineer, I want the plugin versions to be automatically handled so that I can easily run tests on a selected version #6

Open MathieuLamiot opened 1 year ago

MathieuLamiot commented 1 year ago

Context

As described in the readme.md, manual actions are currently needed to provide the right plugin archives with a specific name. Those tasks are error-prone and time consuming. They also prevent further automatization on e2e testing.

Expected behavior

jeawhanlee commented 8 months ago

Scope a solution ✅

As the test requires 2 different archives(Previous stable & New release), We will create a plugin config file to hold the branch names of the desired Previous stable and New release versions. we can have something like this:

const Plugins = {
    previousStable: 'branch_name',
    newRelease: 'branch_name',
} 

Then we will create a bash script to clone the wp-rocket repo into a temp folder and switch to the configured branches and further adapt the rest of the process in the script here

Lastly in this hook we will add a condition to check for the archives and bail out of the bash process else we will update the bash script with the values from the plugin config and run the bash process with shelljs.

We can also add a by-pass arg that will be passed from the CLI, so that if when used, the bash process would run regardless of the existence of the archives, This would be useful for times when plugin config has been updated and cached archives need to be re-added.

Estimate the effort ✅

[S]