Support Overview

Tutorials

Client API Usage Examples

Upgrade Information

FAQ

New Release History

You are here:   Visualware >   MyConnection Server >   Support >   Online Manual Overview >   JavaScript Reporting

JavaScript Reporting

JavaScript reporting is a very powerful feature within MyConnection Server that allows the results to be automatically passed from the applet to a JavaScript function, such as:

- dynamically updating the page content based on the test results
- redirecting to a new URL with content based on the test results

For instance, if you are conducting a VoIP pre-qualification test, based on a good test result the web page content could be automatically updated with the next steps for placing an order.

A test result of poor connection quality could automatically redirect the end-user to a web page with content explaining the test result and recommended next steps.

The available parameters are shown on the right and some examples are shown below.

Global Variables - View Example
  • $URL$ - URL of the test server
  • $DATETIME$ - Date and Time of the test
  • $<plugin>.ANALYSISLINK$ - The connection analysis link
  • $IP$ - The IP address of the test
  • $MSSID$ - The ID number of the test
  • $DETAILLINK$ - The detail report URL
  • $SID$ - The session ID for the test
  • $JAVAVERSION$ - The Java Version used for the test
  • $JAVAVENDOR$ - The Java vendor used for the test

MyCapacity test
  • $CAPACITY.DCAPACITY$ - download capacity in bps
  • $CAPACITY.CDCAPACITY$ - download capacity in bps (with commas)
  • $CAPACITY.DPACKETS$ - download capacity in packets per second
  • $CAPACITY.UCAPACITY$ - upload capacity in bps
  • $CAPACITY.CUCAPACITY$ - upload capacity in bps (with commas)
  • $CAPACITY.UPACKETS$ - upload capacity in packets per second
  • $CAPACITY.PACKETSIZE$ - packet size used in test (bytes)
  • $CAPACITY.QOS$ - quality of service percentage

MyConference test - View Example
  • $CONFERENCE.JITTER1$ - The jitter for the video stream
  • $CONFERENCE.JITTERMAX1$ - The maximum jitter for the video stream
  • $CONFERENCE.LOSS1$ - The packet loss for the video stream
  • $CONFERENCE.DLOSS1$ - Max Video loss distrubution window (% of window)
  • $CONFERENCE.DISCARDS1$ - Packets discarded from the video stream
  • $CONFERENCE.JITTER2$ - The jitter for the left audio stream
  • $CONFERENCE.JITTERMAX2$ - The maximum jitter for the left audio stream
  • $CONFERENCE.LOSS2$ - The packet loss for the left audio stream
  • $CONFERENCE.DLOSS2$ - Max left audio loss distrubution window (% of window)
  • $CONFERENCE.DISCARDS2$ - Packets discarded from the left audio stream
  • $CONFERENCE.JITTER3$ - The jitter for the right audio stream
  • $CONFERENCE.JITTERMAX3$ - The maximum jitter for the right audio stream
  • $CONFERENCE.LOSS3$ - The packet loss for the right audio stream
  • $CONFERENCE.DLOSS3$ - Max right audio loss distrubution window (% of window)
  • $CONFERENCE.DISCARDS3 - Packets discarded from the right audio stream
  • $CONFERENCE.RTTMIN$ - The minimum round-trip time to the server
  • $CONFERENCE.RTTAVG$ - The average round-trip time to the server
  • $CONFERENCE.RTTMAX$ - The maximum round-trip time to the server
  • $CONFERENCE.RTTCONSISTENCY$ - The consistency of the round-trip time to the server
  • $CONFERENCE.AVGRESPONSE$ - Average response time
  • $CONFERENCE.PASS$ - Number of ports passed
  • $CONFERENCE.FAIL$ - Number of ports failed

MyFirewall test
  • $FIREWALL.PORT$ - the ports connected to (eg: "80-90" or "8080")
  • $FIREWALL.LOWPORT$ - the lowest port in the range tested
  • $FIREWALL.HIGHPORT$ - the highest port in the range tested
  • $FIREWALL.PROTOCOL$ - the protocol used (UDP/TCP)
  • $FIREWALL.AVGRESPONSE$ - the average response time (ms)
  • $FIREWALL.MINRESPONSE$ - the minimum response time (ms)
  • $FIREWALL.MAXRESPONSE$ - the maximum response time (ms)
  • $FIREWALL.TESTSPERPORT$ - the number of tests performed per port
  • $FIREWALL.RESPONSETIMES$ - all the response times (ms), as a Javascript array. -1 indicates no response. The array elements are arranged by port, and then by test. For example, if performing 2 tests to ports 80 and 81, the array would be arranged:
    (port80_test1, port80_test2, port81_test1, port81_test2).

MyHiSpeed test
  • $HISPEED.DSPEED$ - download speed in bps
  • $HISPEED.CDSPEED$ - download speed in bps (with commas)
  • $HISPEED.USPEED$ - upload speed in bps
  • $HISPEED.CUSPEED$ - upload speed in bps (with commas)
  • $HISPEED.QOS$ - download consistency of service percentage
  • $HISPEED.UQOS$ - upload consistency of service percentage
  • $HISPEED.RTT$ - min round trip time in ms
  • $HISPEED.AVGRTT$ - average round trip time in ms
  • $HISPEED.MAXRTT$ - max round trip time in ms
  • $HISPEED.RTTCONSISTENCY$ - the consistency of the round-trip time to the server
  • $HISPEED.MAXPAUSE$ - maximum pause between data transfers in ms
  • $HISPEED.AVGPAUSE$ - average pause between data transfers in ms
  • $HISPEED.BANDWIDTH$ - estimated max bandwidth capacity
  • $HISPEED.ROUTESPEED$ - max route speed
  • $HISPEED.FORCEDIDLE$ - TCP forced idle percentage
  • $HISPEED.ROUTECONC$ - TCP route concurrency

MyIPTV test
  • $IPTV.JITTER1$ - jitter for video stream
  • $IPTV.LOSS1$ - percentage of packets lost in video stream
  • $IPTV.ORDER1$ - ordering percentage for video stream (metric showing how well ordered the packets were)
  • $IPTV.JITTER2$ - jitter for left audio stream
  • $IPTV.LOSS2$ - percentage of packets lost in left audio stream
  • $IPTV.ORDER2$ - ordering percentage for left audio stream
  • $IPTV.JITTER3$ - jitter for right audio stream
  • $IPTV.LOSS3$ - percentage of packets lost in right audio stream
  • $IPTV.ORDER3$ - ordering percentage for right audio stream

MyRoute test
  • $ROUTE.HOPNUMARRAY$ - Hop numbers (JavaScript Array)
  • $ROUTE.IPARRAY$ - IPs (JavaScript Array)
  • $ROUTE.DNSARRAY$ - Names for the IPs (JavaScript Array)
  • $ROUTE.MSARRAY$ - Average response times (JavaScript Array)
  • $ROUTE.MSMAXARRAY$ - Maximum response times (JavaScript Array)
  • $ROUTE.MSMINARRAY$ - Minimum response times (JavaScript Array)
  • $ROUTE.PROBARRAY$ - Probabilities (JavaScript Array)
  • $ROUTE.LOSSARRAY$ - Packet losses (JavaScript Array)
  • $ROUTE.LOCATIONARRAY$ - Locations (JavaScript Array)
  • $ROUTE.NETWORKARRAY$ - Network Names (JavaScript Array)

MySpeed test
  • $SPEED.DSPEED$ - download speed in bps
  • $SPEED.CDSPEED$ - download speed in bps (with commas)
  • $SPEED.DTESTTYPE$ - download test type (socket or http)
  • $SPEED.USPEED$ - upload speed in bps
  • $SPEED.CUSPEED$ - upload speed in bps (with commas)
  • $SPEED.UTESTTYPE$ - upload test type (socket or http)
  • $SPEED.QOS$ - download consistency of service percentage
  • $SPEED.UQOS$ - upload consistency of service percentage
  • $SPEED.RTT$ - min round trip time in ms
  • $SPEED.AVGRTT$ - average round trip time in ms
  • $SPEED.RTTCONSISTENCY$ - consistency of RTT (%)
  • $SPEED.MAXPAUSE$ - maximum pause between data transfers in ms
  • $SPEED.AVGPAUSE$ - average pause between data transfers in ms
  • $SPEED.BANDWIDTH$ - estimated max bandwidth capacity
  • $SPEED.ROUTESPEED$ - max route speed
  • $SPEED.FORCEDIDLE$ - TCP forced idle percentage
  • $SPEED.ROUTECONC$ - TCP route concurrency

MyVideo test
  • $VIDEO.VJITTER$ - jitter in video stream
  • $VIDEO.VPACKETLOSS$ - percentage of packets lost in video stream
  • $VIDEO.VDISCARDS$ - percentage of video packets discarded by protocol
  • $VIDEO.AJITTER$ - jitter in audio stream
  • $VIDEO.APACKETLOSS$ - percentage of packets lost in audio stream
  • $VIDEO.ADISCARDS$ - percentage of audio packets discarded by protocol
  • $VIDEO.VSJITTER$ - The server jitter affecting the video stream
  • $VIDEO.ASJITTER$ - The server jitter affecting the audio stream
  • $VIDEO.RTT$ - Round trip time to server
  • $VIDEO.MAXDELAY$ - Max Delay (ms) between packets in stream
  • $VIDEO.SETUPTIME$ - Time taken to perform a SETUP request
  • $VIDEO.DESCRIBETIME$ - Time taken to perform a DESCRIBE request
  • $VIDEO.PLAYTIME$ - Time taken to action a PLAY request

MyVoIP test
  • $VOIP.JITTER$ - jitter
  • $VOIP.PACKETLOSS$ - percentage of packets lost in transmission
  • $VOIP.DJITTER$ - jitter suffered during download
  • $VOIP.DPACKETLOSS$ - percentage of packets lost in download transmission
  • $VOIP.DISCARDS$ - percentage of packets discarded by protocol
  • $VOIP.ORDER$ - ordering percentage (metric showing how well ordered the packets were) of the upstream
  • $VOIP.DORDER$ - ordering percentage (metric showing how well ordered the packets were) of the downstream
  • $VOIP.RTTMIN$ - minimum RTT (Round trip time)
  • $VOIP.RTTAVG$ - average RTT (Round trip time)
  • $VOIP.RTTMAX$ - maximum RTT (Round trip time)
  • $VOIP.RTTCONSISTENCY$ - RTT (Round trip time) consistency
  • $VOIP.UPDISTLOSS$ - upload distribution loss
  • $VOIP.DOWNDISTLOSS$ - download distibution loss
  • $VOIP.MAXJITTER$ - maximum jitter during upload
  • $VOIP.DMAXJITTER$ - maximum jitter during download
  • $VOIP.MOS$ - MOS (Mean Opinion Score) estimated from above data
  • $VOIP.REGISTER$ -Time taken to perform SIP REGISTER
  • $VOIP.INVITE$ - Time taken to perform SIP INVITE
  • $VOIP.BYE$ - Time taken to perform SIP BYE
  • $VOIP.SIPALGFW$ - SIP Application Layer Gateway

Example 1

Utilizing the feature is as simple as adding a param tag to the applet code in the HTML page.

Standard applet code for a standard speed test looks like this:

<applet mayscript name="mcs" code="myspeedserver/applet/myspeed.class" archive="/myspeed/myspeed_s_8.jar,/myspeed/plugins_s_8.jar" codebase="http://mcssjc.visualware.com/myspeed" width=600 height=400>
<param name="testspecid" value="-2">
<param name="permissions" value="all-permissions">
</applet>

Adding the line below as a param tag would output the download and upload speed to the "results()" JavaScript method (you can see this in the source of the page).

<param name="js" value="results($SPEED.DSPEED$,$SPEED.USPEED$)">

Running the speed test below will show this in action.

Click here to load the test.

Example 2

It's also possible to call a JavaScript function after an individual test. So, if the test is set up to do a speed and a VoIP test it's possible to call a function after each individual test has finished.

They follow the same principals as the example above:

<param name=”js-speed” value=”[javascript function]”>
<param name=”js-voip” value=”[javascript function]”>
<param name=”js-video” value=”[javascript function]”>
<param name=”js-firewall” value=”[javascript function]”>
<param name=”js-hispeed” value=”[javascript function]”>
<param name=”js-iptv” value=”[javascript function]”>
<param name=”js-capacity” value=”[javascript function]”>

These test specific functions are called when (and only when) that specific test finishes. So for example if the applet's firewall test performs tests to three different ranges of ports, this function will be called three times.

These parameters are explained in more details below:

js-speed
Description Runs a JavaScript function with the results of the Speed test, immediately after the test has taken place.
Example Code <param name="js-speed" value="setSpeedResults($SPEED.DSPEED$, $SPEED.USPEED$)">
Outcome Calls the setSpeedResult Javascript function with the download and upload speeds as parameters. Further parameters are shown in the list above.

js-voip
Description Runs a JavaScript function with the results of the VoIP test, immediately after the test has taken place.
Example Code <param name="js-voip" value="setSpeedResults($VOIP.JITTER$, $VOIP.MOS$)">
Outcome Calls the setSpeedResult Javascript function with the jitter and MOS readings as parameters. Further parameters are shown in the list above.

js-video
Description Runs a JavaScript function with the results of the Video test, immediately after the test has taken place.
Example Code <param name="js-video" value="setSpeedResults($VIDEO.VJITTER$, $VIDEO.MOS$)">
Outcome Calls the setSpeedResult Javascript function with the jitter and MOS score as parameters. Further parameters are shown in the list above.

js-firewall
Description Runs a JavaScript function with the results of the Firewall test, immediately after the test has taken place.
Example Code <param name="js-firewall" value="setSpeedResults($FIREWALL.PORT$, $FIREWALL.PROTOCOL$)">
Outcome Calls the setSpeedResult Javascript function with the ports connected to and the protocol used as parameters. Further parameters are shown in the list above.

js-hispeed
Description Runs a JavaScript function with the results of the HiSpeed test, immediately after the test has taken place.
Example Code <param name="js-hispeed" value="setSpeedResults($HISPEED.DSPEED$, $HISPEED.USPEED$)">
Outcome Calls the setSpeedResult Javascript function with the download and upload speeds as parameters. Further parameters are shown in the list above.

js-iptv
Description Runs a JavaScript function with the results of the IPTV test, immediately after the test has taken place.
Example Code <param name="js-iptv" value="setSpeedResults($IPTV.JITTER1$, $IPTV.LOSS1$)">
Outcome Calls the setSpeedResult Javascript function with the video stream jitter and video stream packet loss as parameters. Further parameters are shown in the list above.

js-capacity
Description Runs a JavaScript function with the results of the Capacity test, immediately after the test has taken place.
Example Code <param name="js-capacity" value="setSpeedResults($CAPACITY.DCAPACITY$, $CAPACITY.UCAPACITY$)">
Outcome Calls the setSpeedResult Javascript function with the download and upload capacity as parameters. Further parameters are shown in the list above.

Blow is an example using a Speed and a VoIP test.

The applet code for this test looks like:

<applet mayscript name="mcs" code="myspeedserver/applet/myspeed.class" archive="/myspeed/myspeed_s_8.jar,/myspeed/plugins_s_8.jar" codebase="http://mcssjc.visualware.com/myspeed" width=600 height=400>
<param name="testspecid" value="457">
<param name="permissions" value="all-permissions">
<param name="js-speed" value="speed($SPEED.DSPEED$,$SPEED.USPEED$)">
<param name="js-voip" value="voip($VOIP.JITTER$,$VOIP.DJITTER$)">
</applet>

Click here to load the test.

 

MyConnection Server

Home
Online Testing Portal
Download
Purchase
Resources
Support

Visualware Products

VisualRoute
eMailTrackerPro
Visual IP Trace

   

© Visualware Inc. 2017 - All Rights Reserved