Skip to content

Commit ce36c60

Browse files
committed
updated readme with alias info and request options
1 parent 69a7cf0 commit ce36c60

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ $ webpagetest --help
3737
```
3838

3939
### Commands
40-
* **status** _\<id\>_: check test status
41-
* **results** _\<id\>_: get test results
42-
* **locations**: list locations and the number of pending tests
43-
* **testers**: list testers status and details
40+
* **status** _[options] \<id\>_: check test status
41+
* **results** _[options] \<id\>_: get test results
42+
* **locations** _[options]_: list locations and the number of pending tests
43+
* **testers** _[options]_: list testers status and details
4444
* **test** _[options] \<url_or_script\>_: run test, _\<url_or_script\>_ can also be a path to a script file
4545
* **cancel** _\<id\>_: cancel running/pending test
4646
* **har** _\<id\>_: get the HTTPS Archive (HAR) from test
@@ -81,7 +81,6 @@ _The default WPT server can also be specified via environment variable `WEBPAGET
8181
* **-g, --login** _\<username\>_: username for authenticating tests (http authentication)
8282
* **-w, --password** _\<password\>_: password for authenticating tests (http authentication)
8383
* **-a, --authtype** _\<type\>_: type of authentication: 0 = Basic, 1 = SNS [0]
84-
* **-e, --request** _\<id\>_: echo request ID, useful to track asynchronous requests
8584
* **-n, --notify** _\<e-mail\>_: e-mail address to notify with the test results
8685
* **-B, --pingback** _\<url\>_: URL to ping when the test is complete (the test ID will be passed as an "id" parameter)
8786
* **-D, --bwdown** _\<bandwidth\>_: download bandwidth in Kbps (used when specifying a custom connectivity profile)
@@ -113,7 +112,10 @@ _The default WPT server can also be specified via environment variable `WEBPAGET
113112
* **--wait** _[hostname:port]_: wait for test results informed by agent once complete listening on <hostname>:<port> [hostname:first port available above 8000]
114113
* **--timeout** _\<seconds\>_: timeout for polling and waiting results [no timeout]
115114

116-
#### Results (works for **results** only)
115+
#### Request (works for **status**, **results**, **locations**, **testers** and **test** commands)
116+
* **-e, --request** _\<id\>_: echo request ID, useful to track asynchronous requests
117+
118+
#### Results (works for **results** and **test** commands)
117119
* **-m, --median** _\<metric\>_: set the metric used to calculate median for multiple runs tests [loadTime]
118120

119121
#### Run (works for **pagespeed**, **utilization**, **request**, **timeline**, **netlog**, **console**, **waterfall** and **screenshot** commands)
@@ -285,6 +287,7 @@ _\* hostname and port are optional, defaults to \<system hostname\>:\<8000\>_
285287
_\** localhost and port must be reacheable from WebPageTest server_
286288

287289
## Module
290+
Methods and options (including the one letter shorthands) are the same when using as a Node module, however a more verbose version of both commands (methods) and options (parameters) are available and encouraged to use for code clarity.
288291

289292
### Methods
290293
* `getTestStatus(id, options, callback)`
@@ -366,7 +369,6 @@ wpt.runTest(script, function(err, data) {
366369
* **login**: _String_, username for authenticating tests (http authentication)
367370
* **password**: _String_, password for authenticating tests (http authentication)
368371
* **authenticationType**: _Number_, type of authentication: 0 = Basic, 1 = SNS [0]
369-
* **requestId**: _String_, echo request ID, useful to track asynchronous requests
370372
* **notifyEmail**: _String_, e-mail address to notify with the test results
371373
* **pingback**: _String_, URL to ping when the test is complete (the test ID will be passed as an "id" parameter)
372374
* **bandwidthDown**: _String_, download bandwidth in Kbps (used when specifying a custom connectivity profile)
@@ -398,7 +400,10 @@ wpt.runTest(script, function(err, data) {
398400
* **waitResults**: _String_, wait for test results informed by agent once complete listening on <hostname>:<port> [hostname:first port available above 8000]
399401
* **timeout**: _Number_, timeout (in seconds) for pollResults and waitResults [no timeout]
400402

401-
#### Results (works for **getResults** only)
403+
#### Request (works for **getTestStatus**, **getResults**, **getLocations**, **getTesters** and **runTest** methods)
404+
* **requestId**: _String_, echo request ID, useful to track asynchronous requests
405+
406+
#### Results (works for **getResults** and **runTest** methods)
402407
* **medianMetric**: _String_, set the metric used to calculate median for multiple runs tests (default: loadTime)
403408

404409
#### Run (works for `getPageSpeedData`, `getUtilizationData`, `getRequestData`, `getTimelineData`, `getNetLogData`, `getConsoleLogData`, `getWaterfallImage` and `getScreenshotImage` methods)

0 commit comments

Comments
 (0)