You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,26 +58,27 @@ return {
58
58
59
59
### Manual testing using webpagetest.org website
60
60
61
-
To test a custom metric, for example [`doctype.js`](https://github.com/HTTPArchive/legacy.httparchive.org/blob/master/custom_metrics/doctype.js), you can enter the script directly on [webpagetest.org](https://webpagetest.org?debug=1) under the "Custom" tab.
61
+
To test a custom metric, for example [`doctype.js`](https://github.com/HTTPArchive/legacy.httparchive.org/blob/master/custom_metrics/doctype.js), you can enter the script directly on [webpagetest.httparchive.org](https://webpagetest.httparchive.org/?debug=1) under "Advanced" -> "Custom" tab.
Note that all WPT custom metrics must have `[metricName]` at the start of the script. This is excluded in the HTTP Archive code and generated automatically based on the file name, so you will need to manually ensure that it's set.
66
67
67
-
If you include the `debug=1` parameter on the WPT home page, for example [https://webpagetest.org?debug=1](https://webpagetest.org?debug=1), the test results will include a raw debug log from the agent including the devtools commands to run the custom metrics (and any handled exceptions).
68
+
If you include the `debug=1` parameter on the WPT home page, for example [https://webpagetest.httparchive.org?debug=1](https://webpagetest.httparchive.org?debug=1), the test results will include a raw debug log from the agent including the devtools commands to run the custom metrics (and any handled exceptions).
68
69
The log ouput can be found in the main results page to the left of the waterfall. For each run there will be a link for the "debug log" (next to the timeline and trace links).
69
70
70
71
To see the custom metric results, select a run, first click on "Details", and then on the "Custom Metrics" link in the top right corner:
For complex metrics like [almanac.js](./dist/almanac.js) you can more easily explore the results by copy/pasting the JSON into your browser console.
77
78
78
79
### Automated WPT test runs
79
80
80
-
1. WPT tests are running using [WPT API wrapper](https://github.com/webpagetest/webpagetest-api).
81
+
1. WPT tests are running using [WPT API wrapper](https://github.com/HTTPArchive/WebPageTest.api-nodejs).
81
82
2. Test runs are using a private WPT instance, set by the `WPT_HOST` environment variable.
82
83
3. By default, WebAlmanac website is used for testing in every PR.
83
84
4. PR author can define a list of websites to test additionally, by using a markdown list as shown in [PR template](https://github.com/HTTPArchive/custom-metrics/blob/main/.github/PULL_REQUEST_TEMPLATE/custom_metrics_pr_template.md).
0 commit comments