Open schlessera opened 2 years ago
Based on the discussion with @westonruter & @ediamin so far, this is the current plan:
wp server
command to serve it locally, and then use ngrok
to make that server publically accessible.tests/fixtures
folder, using the URL and the versions of both PageSpeed Insights API and the embedded Lighthouse audit.ngrok
to slow down the network stack.tests/fixtures
folder, and if so, create a new pull request to add that new fixture file to the repo. This can be based on a similar workflow in the AMP toolbox repo: https://github.com/ampproject/amp-toolbox-php/blob/main/.github/workflows/sync-spec-test-suite.ymlThis will allow us to have consistent fixture files to test against, and that keep up-to-date automatically with the latest PSI/Lighthouse changes.
@schlessera Need some help for the point 3. I'm currently using the wp post create
to generate a post from a html file with some content. Could you please suggest me what content should I use to generate fixture file? What content should I use to build the "worst possible site"?
Update: Working on the GitHub workflow. It is almost finished. Tested it in a fork and it is working fine so far. After this I'll build the WordPress content against which we will run the PageSpeed Insight tests.
Feature Description
We currently have 1 single fixture file for the
https:\\amp-wp.org
page.We should extend this to have multiple pages across multiple real domains as fixture files, so that we can use the
--url
flag to choose one of multiple fixture files. These should include official pages from the AMP and/or WordPress project.Ideally, we would have enough fixture coverage to have most or all of Lighthouse's audits be triggered for producing data.
To ensure we can easily maintain this, the fixture files should be generated via a script that we can trigger at a later point to update the fixture files.