ChrisPenny\WebPageTest\Submission\Request
Class RunTest
Synopsis
class Request
extends Request
{
- // members
- private string|null $affinity;
- private string|null $appendUserAgent;
- private int|null $authType;
- private string|null $block;
- private int|null $browserHeight;
- private int|null $browserWidth;
- private int|null $bandwidthDown;
- private int|null $bandwidthUp;
- private int|null $clearCerts;
- private string|null $cmdLine;
- private int|null $connections;
- private string|null $custom;
- private string|int|null $devicePixelRatio;
- private string|null $domElement;
- private int|null $firstViewOnly;
- private string|null $format;
- private int|null $height;
- private int|null $htmlBody;
- private int|null $ignoreSsl;
- private int|null $iq;
- private int|null $keepUserAgent;
- private string|null $key;
- private string|null $label;
- private string|int|null $latency;
- private int|null $lighthouse;
- private string|null $location;
- private string|null $login;
- private string|null $medianMetric;
- private int|null $medianVideo;
- private int|null $mobile;
- private string|null $mobileDevice;
- private string|null $notify;
- private int|null $noHeaders;
- private int|null $noImages;
- private int|null $noOpt;
- private int|null $noScript;
- private string|int|null $packetLossRate;
- private string|null $password;
- private string|null $pingBack;
- private int|null $pngScreenShot;
- private int|null $private;
- private string|null $return;
- private int|null $runs;
- private string|null $script;
- private int|null $tcpDump;
- private string|null $tsViewId;
- private string|null $tester;
- private int|null $timeline;
- private int|null $timelineStack;
- private string|null $type;
- private string|null $userAgentString;
- private string|null $url;
- private int|null $video;
- private int|null $web10;
- private int|null $width;
- // methods
- public void __construct()
- public Request hydrateFromConfiguration()
- public string|null getRequestTarget()
- public string|null getUri()
- protected array getMap()
- protected array getRequestParams()
- public string|null getAffinity()
- public Request setAffinity()
- public string|null getAppendUserAgent()
- public Request setAppendUserAgent()
- public int|null getAuthType()
- public Request setAuthType()
- public string|null getBlock()
- public Request setBlock()
- public int|null getBrowserHeight()
- public Request setBrowserHeight()
- public int|null getBrowserWidth()
- public Request setBrowserWidth()
- public int|null getBandwidthDown()
- public Request setBandwidthDown()
- public int|null getBandwidthUp()
- public Request setBandwidthUp()
- public int|null getClearCerts()
- public Request setClearCerts()
- public string|null getCmdLine()
- public Request setCmdLine()
- public int|null getConnections()
- public Request setConnections()
- public string|null getCustom()
- public Request setCustom()
- public int|string|null getDevicePixelRatio()
- public Request setDevicePixelRatio()
- public string|null getDomElement()
- public Request setDomElement()
- public int|null getFirstViewOnly()
- public Request setFirstViewOnly()
- public string|null getFormat()
- public Request setFormat()
- public int|null getHeight()
- public Request setHeight()
- public int|null getHtmlBody()
- public Request setHtmlBody()
- public int|null getIgnoreSsl()
- public Request setIgnoreSsl()
- public int|null getIq()
- public Request setIq()
- public int|null getKeepUserAgent()
- public Request setKeepUserAgent()
- public string|null getKey()
- public Request setKey()
- public string|null getLabel()
- public Request setLabel()
- public int|string|null getLatency()
- public Request setLatency()
- public int|null getLighthouse()
- public Request setLighthouse()
- public string|null getLocation()
- public Request setLocation()
- public string|null getLogin()
- public Request setLogin()
- public string|null getMedianMetric()
- public Request setMedianMetric()
- public int|null getMedianVideo()
- public Request setMedianVideo()
- public int|null getMobile()
- public Request setMobile()
- public string|null getMobileDevice()
- public Request setMobileDevice()
- public string|null getNotify()
- public Request setNotify()
- public int|null getNoHeaders()
- public Request setNoHeaders()
- public int|null getNoImages()
- public Request setNoImages()
- public int|null getNoOpt()
- public Request setNoOpt()
- public int|null getNoScript()
- public Request setNoScript()
- public int|string|null getPacketLossRate()
- public Request setPacketLossRate()
- public string|null getPassword()
- public Request setPassword()
- public string|null getPingBack()
- public Request setPingBack()
- public int|null getPngScreenShot()
- public Request setPngScreenShot()
- public int|null getPrivate()
- public Request setPrivate()
- public string|null getReturn()
- public Request setReturn()
- public int|null getRuns()
- public Request setRuns()
- public string|null getScript()
- public Request setScript()
- public int|null getTcpDump()
- public Request setTcpDump()
- public string|null getTsViewId()
- public Request setTsViewId()
- public string|null getTester()
- public Request setTester()
- public int|null getTimeline()
- public Request setTimeline()
- public int|null getTimelineStack()
- public Request setTimelineStack()
- public string|null getType()
- public Request setType()
- public string|null getUserAgentString()
- public Request setUserAgentString()
- public string|null getUrl()
- public Request setUrl()
- public int|null getVideo()
- public Request setVideo()
- public int|null getWeb10()
- public Request setWeb10()
- public int|null getWidth()
- public Request setWidth()
Hierarchy
Extends
- GuzzleHttp\Psr7\Request
Uses
- SilverStripe\Core\Injector\Injectable
- SilverStripe\Core\Extensible
- SilverStripe\Core\Config\Configurable
Members
private
- $affinity
—
ChrisPenny\WebPageTest\Submission\string|null
Specify a string that will be used to hash the test to a specific test agent. The tester will be picked by index among the available testers. If the number of testers changes then the tests will be distributed to different machines but if the counts remain consistent then the same string will always run the tests on the same test machine. This can be useful for controlling variability when comparing a given URL over time or different parameters against each other (using the URL as the hash string) - $appendUserAgent
—
ChrisPenny\WebPageTest\Submission\string|null
String to append to the user agent string. This is in addition to the default PTST/ver string. If "keepua" is also specified it will still append. Allows for substitution with some test parameters: %TESTID% - Replaces with the test ID for the current test %RUN% - Replaces with the current run number %CACHED% - Replaces with 1 for repeat view tests and 0 for initial view %VERSION% - Replaces with the current wptdriver version number - $authType
—
ChrisPenny\WebPageTest\Submission\int|null
Type of authentication to use: 0 = Basic Auth, 1 = SNS Default: 0 - $bandwidthDown
—
ChrisPenny\WebPageTest\Submission\int|null
Download bandwidth in Kbps (used when specifying a custom connectivity profile) - $bandwidthUp
—
ChrisPenny\WebPageTest\Submission\int|null
Upload bandwidth in Kbps (used when specifying a custom connectivity profile) - $block
—
ChrisPenny\WebPageTest\Submission\string|null
Space-delimited list of urls to block (substring match) - $browserHeight
—
ChrisPenny\WebPageTest\Submission\int|null
Browser window height (in display pixels) - $browserWidth
—
ChrisPenny\WebPageTest\Submission\int|null
Browser window width (in display pixels) - $clearCerts
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to clear the OS certificate caches (causes IE to do OCSP/CRL checks during SSL negotiation if the certificates are not already cached) Default: 0 - $cmdLine
—
ChrisPenny\WebPageTest\Submission\string|null
Custom command-line options (Chrome only) - $connections
—
ChrisPenny\WebPageTest\Submission\int|null
Override the number of concurrent connections IE uses (0 to not override) Default: 0 - $custom
—
ChrisPenny\WebPageTest\Submission\string|null
Custom metrics to collect at the end of a test https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/custom-metrics - $devicePixelRatio
—
ChrisPenny\WebPageTest\Submission\string|int|null
Device Pixel Ratio to use when emulating mobile - $domElement
—
ChrisPenny\WebPageTest\Submission\string|null
DOM Element to record for sub-measurement - $firstViewOnly
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to skip the Repeat View test Default: 0 - $format
—
ChrisPenny\WebPageTest\Submission\string|null
Format: Set to "xml" to request an XML response Set to "json" for JSON-encoded response - $height
—
ChrisPenny\WebPageTest\Submission\int|null
Viewport Height in css pixels - $htmlBody
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to save the content of the first response (base page) instead of all of the text responses (bodies=1) - $ignoreSsl
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to Ignore SSL Certificate Errors e.g. Name mismatch, Self-signed certificates, etc Default: 0 - $iq
—
ChrisPenny\WebPageTest\Submission\int|null
Specify a jpeg compression level (30-100) for the screen shots and video capture - $keepUserAgent
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to preserve the original browser User Agent string (don't append PTST to it) Default: 0 - $key
—
ChrisPenny\WebPageTest\Submission\string|null
API Key (if assigned) - applies only to runtest.php calls. Contact the site owner for a key if required (http://www.webpagetest.org/getkey.php for the public instance) - $label
—
ChrisPenny\WebPageTest\Submission\string|null
Label for the test - $latency
—
ChrisPenny\WebPageTest\Submission\string|int|null
First-hop Round Trip Time in ms (used when specifying a custom connectivity profile) - $lighthouse
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to have a lighthouse test also performed (Chrome-only, wptagent agents only) Default: 0 - $location
—
ChrisPenny\WebPageTest\Submission\string|null
Location to test from - $login
—
ChrisPenny\WebPageTest\Submission\string|null
User name to use for authenticated tests (http authentication) - $medianMetric
—
ChrisPenny\WebPageTest\Submission\string|null
Default metric to use when calculating the median run Default: loadTime - $medianVideo
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 when capturing video to only store the video from the median run Default: 0 - $mobile
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to have Chrome emulate a mobile browser (screen resolution, UA string, fixed viewport) Default: 0 - $mobileDevice
—
ChrisPenny\WebPageTest\Submission\string|null
Device name from mobile_devices.ini to use for mobile emulation (only when mobile=1 is specified to enable emulation and only for Chrome) - $noHeaders
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to disable saving of the http headers (as well as browser status messages and CPU utilization) Default: 0 - $noImages
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to disable screen shot capturing Default: 0 - $noOpt
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to disable optimization checks (for faster testing) Default: 0 - $noScript
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to disable javascript (IE, Chrome, Firefox) Default: 0 - $notify
—
ChrisPenny\WebPageTest\Submission\string|null
E-mail address to notify with the test results - $packetLossRate
—
ChrisPenny\WebPageTest\Submission\string|int|null
Packet loss rate - percent of packets to drop (used when specifying a custom connectivity profile) - $password
—
ChrisPenny\WebPageTest\Submission\string|null
Password to use for authenticated tests (http authentication) - $pingBack
—
ChrisPenny\WebPageTest\Submission\string|null
URL to ping when the test is complete (the test ID will be passed as an "id" parameter) - $pngScreenShot
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to save a full-resolution version of the fully loaded screen shot as a png Default: 0 - $private
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 0 to make the test visible in the history log (defaults to private) Default: 1 - $return
—
ChrisPenny\WebPageTest\Submission\string|null
When using the xml interface, will echo back in the response - $runs
—
ChrisPenny\WebPageTest\Submission\int|null
Number of test runs (1-10 on the public instance) Default: 1 - $script
—
ChrisPenny\WebPageTest\Submission\string|null
Scripted test to execute - $tcpDump
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to enable tcpdump capture Default: 0 - $tester
—
ChrisPenny\WebPageTest\Submission\string|null
Specify a specific tester that the test should run on (must match the PC name in /getTesters.php). If the tester is not available the job will never run. - $timeline
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to have Chrome capture the Dev Tools timeline Default: 0 - $timelineStack
—
ChrisPenny\WebPageTest\Submission\int|null
Set to between 1 - 5 to have Chrome include the Javascript call stack. Must be used in conjunction with "timeline" Default: 0 - $tsViewId
—
ChrisPenny\WebPageTest\Submission\string|null
Test name to use when submitting results to tsviewdb (for private instances that have integrated with tsviewdb) - $type
—
ChrisPenny\WebPageTest\Submission\string|null
For running alternative test types, can specify 'traceroute' or 'lighthouse' (lighthouse as a test type is only supported on wptagent agents) - $url
—
ChrisPenny\WebPageTest\Submission\string|null
The URL to be tested - $userAgentString
—
ChrisPenny\WebPageTest\Submission\string|null
Custom User Agent String to use - $video
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to capture video (video is required for calculating Speed Index) Default: 0 - $web10
—
ChrisPenny\WebPageTest\Submission\int|null
Set to 1 to force the test to stop at Document Complete (onLoad) Default: 0 - $width
—
ChrisPenny\WebPageTest\Submission\int|null
Viewport Width in css pixels
Methods
protected
- getMap() — Map the fields used by WebPageTest to our getter methods
- getRequestParams() — Loop through our map and remove any values that have not been explicitly set
public
- __construct()
- getAffinity()
- getAppendUserAgent()
- getAuthType()
- getBandwidthDown()
- getBandwidthUp()
- getBlock()
- getBrowserHeight()
- getBrowserWidth()
- getClearCerts()
- getCmdLine()
- getConnections()
- getCustom()
- getDevicePixelRatio()
- getDomElement()
- getFirstViewOnly()
- getFormat()
- getHeight()
- getHtmlBody()
- getIgnoreSsl()
- getIq()
- getKeepUserAgent()
- getKey()
- getLabel()
- getLatency()
- getLighthouse()
- getLocation()
- getLogin()
- getMedianMetric()
- getMedianVideo()
- getMobile()
- getMobileDevice()
- getNoHeaders()
- getNoImages()
- getNoOpt()
- getNoScript()
- getNotify()
- getPacketLossRate()
- getPassword()
- getPingBack()
- getPngScreenShot()
- getPrivate()
- getRequestTarget()
- getReturn()
- getRuns()
- getScript()
- getTcpDump()
- getTester()
- getTimeline()
- getTimelineStack()
- getTsViewId()
- getType()
- getUri() — Override the base method, as our Uri will not be generated when you instantiate the class, it will be generated at the time of request, after you have set all of the settings you wish
- getUrl()
- getUserAgentString()
- getVideo()
- getWeb10()
- getWidth()
- hydrateFromConfiguration()
- setAffinity()
- setAppendUserAgent()
- setAuthType()
- setBandwidthDown()
- setBandwidthUp()
- setBlock()
- setBrowserHeight()
- setBrowserWidth()
- setClearCerts()
- setCmdLine()
- setConnections()
- setCustom()
- setDevicePixelRatio()
- setDomElement()
- setFirstViewOnly()
- setFormat()
- setHeight()
- setHtmlBody()
- setIgnoreSsl()
- setIq()
- setKeepUserAgent()
- setKey()
- setLabel()
- setLatency()
- setLighthouse()
- setLocation()
- setLogin()
- setMedianMetric()
- setMedianVideo()
- setMobile()
- setMobileDevice()
- setNoHeaders()
- setNoImages()
- setNoOpt()
- setNoScript()
- setNotify()
- setPacketLossRate()
- setPassword()
- setPingBack()
- setPngScreenShot()
- setPrivate()
- setReturn()
- setRuns()
- setScript()
- setTcpDump()
- setTester()
- setTimeline()
- setTimelineStack()
- setTsViewId()
- setType()
- setUrl()
- setUserAgentString()
- setVideo()
- setWeb10()
- setWidth()