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.
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.
Progress |
To output the progress of a test to a JavaScript function use the <param> tag below.
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.
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|