Overview

Classes

  • LoadTestingPageResponse
  • LoadTestingSession
  • LoadTestingSinglePage
  • LoadTestingTest

Exceptions

  • LoadTestingTestException

Functions

  • recordDownloadSize
  • recordError
  • recordPageTime
  • recordProgress
  • recordURLPageLoad
  • recordUserStart
  • recordUserStop
  • sendMessage
  • Overview
  • Class

Class LoadTestingSession

Load Testing Session is the CURL wrapper. This is not required but does provide some easy calling and managing of web requests.

CURL Options Set by Default include CURLOPT_RETURNTRANSFER (1) CURLOPT_HEADER (0) - Do not include headers in output CURLOPT_FOLLOWLOCATION (1) - Follow Redirects CURLOPT_FRESH_CONNECT (0) - Do not use persist connections. CURLOPT_ENCODING ('') - Enable compression CURLOPT_CONNECTTIMEOUT (30) - 30 second time out CURLOPT_TIMEOUT (120) - Overall timeout CURLOPT_COOKIEJAR - Setup location for cookie jar. CURLOPT_SSL_VERIFYPEER (0) - Don't validate SSL

Located at LoadTestingSession.class.php
Methods summary
public
# __construct( integer $testNum, string $rand, string $cookieDir = 'cookies', string $outputDir = 'output' )

Constructor

Constructor

Parameters

$testNum
Test number
$rand
Random token for test
$cookieDir
Cookie directory (default: 'cookies')
$outputDir
Output directory (default: 'output')
public
# __get( $name )

__get

__get

public
# enableResourceLoading( )

Enable resource loading

Enable resource loading

public
# disableResourceLoading( )

Disable resource loading

Disable resource loading

public
# verbose( )

Verbose

Verbose

public
# nonVerbose( )

Non-verbose

Non-verbose

public
# setDelay( integer $minDelay, integer $maxDelay )

Set delay (in ms) on page load.

Set delay (in ms) on page load.

Parameters

$minDelay
Min. artificial delay (in ms) on page load.
$maxDelay
Max. artificial delay (in ms) on page load.
public
# getDelay( )

Send back recently used delay value.

Send back recently used delay value.

public
# cleanup( )

Cleanup

Cleanup

public
# getLastCurlRespHeaders( $ch, $header )

Set last curl response headers

Set last curl response headers

public string
# fetchRawDataFromUrl( string $url, mixed $post = null, array $headers = array(), boolean $saveData = false )

Fetch raw data form a URL with no delays or output

Fetch raw data form a URL with no delays or output

Parameters

$url
URL to go to
$post
POST data, or null
$headers
HTTP headers to send
$saveData
True to save data to file system

Returns

string
Raw response

Throws

Exception
public string
# removeQueryStringAndFragmentFromUrl( string $url )

Remove query string and fragment from URL

Remove query string and fragment from URL

Parameters

$url
URL

Returns

string
URL without query string and fragment
public LoadTestingPageResponse
# goToUrl( string $url, mixed $post = null, array $headers = array(), boolean $saveData = false, $isUser = true )

Go to a url.

Go to a url.

Parameters

$url
URL to go to
$post
POST data, or null
$headers
HTTP headers to send
$saveData
writing it to file.
$isUser

Returns

LoadTestingPageResponse

Throws

Exception
public
# loadResources( LoadTestingPageResponse $page )

Parse page and request other resources

Parse page and request other resources

Parameters

$page
Page object
public string
# getFormAutoValue( string $name )

Get automatic value for form field

Get automatic value for form field

Parameters

$name
Field name

Returns

string
Value, or null
Constants summary
integer LOAD_RESOURCES

Load Resources Flag

Load Resources Flag

# 0x00000001
integer VERBOSE

Verbose Flag

Verbose Flag

# 0x00000002
Properties summary
public $loadableResourceBaseUrl

Base URL that resources will be loaded for

Base URL that resources will be loaded for

# null
RedLine13 Documentation API documentation generated by ApiGen