mobile menu

Runtime Parameters

You are here
Runtime Parameters

Runtime Parameters

Runtime parameters are defined as parameters that can be set in the browser code (JavaScript/HTML) that either override test defaults or provide access to test information, like progress and results.

Access to test information is crucial when creating a custom user interface.

What does a default test definition look like?

The code below is what would be seen in the HTML if a standard speed test was published in MCS. The test definitions are held in a JavaScript parameter named m_applet_params. The test engine interprets these parameters in order to run the test.

var m_applet_params = '<applet codebase="" width="600" height="400">\
	<param name="permissions" value="all-permissions">\
	<param name="config" value="default">\
	<param name="testspecid" value="-1">';

Below are some of the <param> tags that can be used to further define the test.

Test Feedback & Information

Progress

To output the progress of a test to a JavaScript function use the <param> tag below.

<param name="js-prog" value="doProgress($PROGRESS$)">

Note, each test will run from 0-100. So, if the test is set up to perform a VoIP and a Speed test the progress will be 0-100 for VoIP and then 0-100 for Speed.

Session ID

The session ID can be used to assign an identifier to test results making it easy to separate data.

<param name="sid" value="*Visualware">

Note, if the value of a session ID does not include the leading star (*) then the test will prompt the user to enter their own Session ID. So setting value="Enter your name" would pop up an input field to solicit for user input. This input would then be used for the Session ID.

Autostart

By default a test will present the user with a start button, which needs to be clicked to begin the test. The tag below can be used to auto start the test as soon as the page loads.

<param name="autostart" value="yes">

Test Configuration

Capacity Test

Starting Bandwidth

The param tags below set the starting bandwidth for the upload and download capacity test. The value is in bits, so the value of 1500 will begin the first cycle by attempting a capacity of 12 Mbps.

<param name="capacity_udpinitialubandwidth" value="1500">
<param name="capacity_udpinitialbandwidth" value="1500">

Max Bandwidth

The param tags below set the max bandwidth for the upload and download capacity test. The value is in bits, so the value of 10000 will begin the first cycle by attempting a capacity of 80 Mbps.

<param name="capacity_udpmaxubandwidth" value="10000">
<param name="capacity_udpmaxbandwidth" value="10000">

UDP Packet Size

The param tags below set the packet size for the test. So, if the goal of the capacity test was to uncover the capacity for VoIP calls using the G711 codec the test can be set to use a packet size of 172.

<param name="capacity_udppacketsize" value="172">

VoIP Test

Calls to Simulate

The param tags below sets the number of simultaneous calls that the VoIP test will simulate. For example, the test page could be set up to let users choose how many calls to test for before the test is started.

<param name="voip_lines" value="5">

Result Manipulation

Test Complete

The param tag below is used to pass results from the test to a JavaScript function. This function is called once ALL tests have completed. Valid test result parameters, known as dollar variables, can be found here.

<param name="js" value="doThis($VOIP.JITTER$, $VOIP.DJITTER$)">

Test Specific

The param tags below are used to call a JavaScript function at the end of a specific test. For example, the function defined for js-voip will be called when the VoIP test finishes. The functions can also be used to pass results for that test, as explained in the Test Complete section above.

<param name="js-firewall" value="firewallTestEnded()">
<param name="js-voip" value="voipTestEnded()">
<param name="js-speed" value="speedTestEnded()">
<param name="js-capacity" value="capacityTestEnded()">
<param name="js-dhcp" value="dhcpTestEnded()">