Skip to content

Commit b39a4cd

Browse files
authored
Merge pull request #155 from Siddhantshukla814/runTestAndWait
Added TestAndWait for CLI & runTestAndWait for Script
2 parents 9c85865 + c6090c0 commit b39a4cd

File tree

6 files changed

+730
-5
lines changed

6 files changed

+730
-5
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ $ webpagetest --help
6363
- **locations** _[options]_: list locations and the number of pending tests
6464
- **testers** _[options]_: list testers status and details
6565
- **test** _[options] \<url_or_script\>_: run test, _\<url_or_script\>_ can also be a path to a script file
66+
- **testAndWait** _[options] \<url_or_script\>_: run test and waits for the result, _\<url_or_script\>_ can also be a path to a script file
6667
- **testBalance** _[options]_: get remaining tests for the account
6768
- **restart** _\<id\>_: restart test
6869
- **cancel** _\<id\>_: cancel running/pending test
@@ -448,6 +449,7 @@ Methods and options (including the one letter shorthands) are the same when usin
448449
- `getTesters(options, callback)`
449450
- `getTestBalance(options, callback)`
450451
- `runTest(url_or_script, options, callback)`
452+
- `runTestAndWait(url_or_script, options, callback)`
451453
- `restartTest(id, options, callback)`
452454
- `cancelTest(id, options, callback)`
453455
- `getHARData(id, options, callback)`
@@ -516,7 +518,7 @@ wpt.runTest(script, (err, data) => {
516518
- **dryRun**: _Boolean_, if `true`, method does not make an actual request to the API Server but rather returns an object with `url` which contains the actual URL to make the GET request to WebPageTest API Server
517519
- **server**: _String_, if specified, overrides the WebPageTest server informed in the constructor only for that method call
518520

519-
#### Test (works for `runTest` method only)
521+
#### Test (works with `runTest` and `runTestAndWait`)
520522

521523
- **location**: _String_, location to test from
522524
- **connectivity**: _String_, connectivity profile -- requires location to be specified -- (Cable|DSL|3GSlow|3G|3GFast|4G|LTE|Edge|2G|Dial|FIOS|Native|custom) [Cable]
@@ -590,15 +592,15 @@ wpt.runTest(script, (err, data) => {
590592
- **lighthouse**: _Boolean_, perform lighthouse test (Chrome only, Linux agent only)
591593
- **throttleCPU**: _Number_, custom cpu throttling
592594

593-
#### API Key (works for `runTest`, `restartTest` and `cancelTest` methods)
595+
#### API Key (works for `runTest`, `runTestAndWait`, `restartTest` and `cancelTest` methods)
594596

595597
- **key**: _String_, API key (if assigned). Contact the WebPageTest server administrator for a key if required
596598

597-
#### Request (works for `getTestStatus` `getResults` `getLocations` `getTesters` and `runTest` methods)
599+
#### Request (works for `getTestStatus` `getResults` `getLocations` `getTesters` `runTest` and `runTestAndWait` methods)
598600

599601
- **requestId**: _String_, echo request ID, useful to track asynchronous requests
600602

601-
#### Results (works for `getResults` and `runTest` methods)
603+
#### Results (works for `getResults` `runTest` and `runTestAndWait` methods)
602604

603605
- **breakDown**: _Boolean_, include the breakdown of requests and bytes by mime type
604606
- **domains**: _Boolean_, include the breakdown of requests and bytes by domain

0 commit comments

Comments
 (0)