Metrics: Add a new e2e/metrics folder to start writing some test to collect performance metrics #97780
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The ultimate goal is to have a wp.com or calypso dashboard in https://www.codevitals.run
This needs to be done in three steps (like we did before for woo, Gutenberg and core):
1- Add a script to be able to run and connect performance metrics on a given calypso instance.
2- Add a CI job to be able to run these metrics tests (and compare two different commits on that same run)
3- Log the results of that job result in codevitals.run
This PR attempts to address the first step here. It is based on this similar PR from Woo. woocommerce/woocommerce#42005 but it also uses the exact same setup as the calypso e2e tests (using these as a basis)
The PR is not ready yet because I want to add the "performance reporter" to the playwright config of the "metrics" test runner. The performance reporter class can be copy/pasted from the Woo PR but I'm having trouble finding the right way to add it to the playwright config. Help from someone familiar with calypso-e2e is needed.
For now I added a test that loads a large post on the post editor in Calypso and collects some basic loading metrics (the same one we use in woo and Gutenberg editor tests)
Testing instructions
cd test/e2e && yarn build && yarn metrics