Overview
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 · Test Configuration · Result Manipulation
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 runs 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">
If the value does not include the leading asterisk (*) then the test will prompt the user to enter their own Session ID. For example, setting
value="Enter your name" would pop up an input field to solicit user input, which is then used as the Session ID.
Autostart
By default a test will present the user with a start button. 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
Set the starting bandwidth for the upload and download capacity test. The value is in bits, so a 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
Set the max bandwidth for the upload and download capacity test. The value is in bits, so a value of 10000 will cap the test at 80 Mbps.
<param name="capacity_udpmaxubandwidth" value="10000">
<param name="capacity_udpmaxbandwidth" value="10000">
UDP Packet Size
Set the packet size for the test. For example, if the goal is to uncover the capacity for VoIP calls using the G.711 codec, set the packet size to 172.
<param name="capacity_udppacketsize" value="172">
VoIP Test
Calls to Simulate
Set the number of simultaneous calls the VoIP test will simulate. For example, the test page could let users choose how many calls to test before the test starts.
<param name="voip_lines" value="5">
Result Manipulation
Test Complete
Pass results from the test to a JavaScript function. This function is called once all tests have completed. Valid test result parameters (dollar variables) can be found here.
<param name="js" value="doThis($VOIP.JITTER$, $VOIP.DJITTER$)">
Test Specific
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. These functions can also 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()">

