Diagnostic SCO for SCORM runtime
by Claude Ostyn
© 2007 Claude Ostyn

Overview

The diagnostic SCO is a HTML file that can be launched as a SCO to inspect and diagnose a SCORM runtime environment. It works with SCORM 1.2 and SCORM 2004. It is a single file, completely self-contained. This document describes the Diagnostic SCO and includes a live demo as well as basic documentation and a download link.

Description

Thumbnail of a screen capture of the Diagnostic SCO in actionThis diagnostic SCO consists of a single HTML file that, when launched, recognizes whether it is running in a SCORM environment. It looks first for a SCORM 2004 API object, and if that fails it looks for a SCORM 1.2 API object. It also displays information about the configuration and relationship of the windows that were inspected by the API discovery algorithm. You can initialize and terminate a communication session with the SCORM API and you can exercise the API by trying SetValue and GetValue with the parameters appropriate for the version of SCORM that was detected. You can also "play" batch test scripts that make a predefined series of API calls and log the results. Online help is embedded in the Diagnostic SCO.

There is nothing to install. No Java, no ActiveX, no Flash, no server-side component to activate. No nagging and no expiration date. Works offline as well as online. Subject to the usual browser security constraints; therefore this utility does not create, modify or delete anything on your system, with the exception of a "first party" cookie to keep track of a couple of settings.

Live demo

The interactive demo below launches the diagnostic SCO in a test wrapper that simulates a SCORM runtime environment. The diagnostic SCO is played in a frame of the wrapper, and has some frames of its own. The diagnostic SCO uses an ugly green background to distinguish it from the runtime environment in which it is being launched. Look at the RTE info: It shows you where the Diagnostic SCO found a SCORM API object and which SCORM version it detected. Then try to communicate with that API object. You might want to click on the Help tab first before trying out the diagnostic features. For example, you can click the Scripted test tab, then click the demo button to load a predefined test script. Then click Step to make one API call at a time from the script, or Play to run through the script automatically. As each call is made, notice the result in the log at the bottome of the window. The log in the test wrapper, which plays the role of a SCORM RTE, also shows what calls it received from the Diagnostic SCO. You can resize the frames as needed for a better view. If you terminate the communication session, you need to unload and reload the Diagnostic SCO using the buttons in the test wrapper before you can start a new communication session. For more information about the test wrapper, see SCORM Test Wrap for SCOs.

How to use the Diagnostic SCO

The diagnostic SCO is designed to be used with a LMS. You can also use it as a learning tool, for example with the LMS test suite or with a test harness to try out your SCORM API commands. The demo on this page allows you to use the actual diagnostic SCO with such a test harness.

Using the Diagnostic SCO with a LMS

Download the package appropriate for your LMS and install the SCO in your LMS just as you would any SCORM 2004 or SCORM 1.2 package. When you launch the package, the SCO will automatically explore the runtime environment and show you a summary of what it found. Change the view to the API Prodder to initialize and conduct a communication session with the API. A summary status is shown by flags at the bottom left of the window. Note that GetLastError is called automatically after each test of a feature, in order to update the error flag. Click Terminate to terminate the session. As per the SCORM specification, once you click Terminate you will not be able to reinitialize the session without relaunching the SCO in the SCORM runtime.

For convenience, if you select a data element name in the rolling log at the bottom of the test window, the selected text will automatically get copied into the form used to exercise the API.

Using the Diagnostic SCO with the SCORM test suite

Run the SCORM test suite for a SCO and launch the proddingsco.htm file as the SCO. Once launched, the diagnostic SCO will behave just as described above for use in a LMS. If you make any error in playing with the diagnostic features, the test suite log will obviously report a problem. Hint: When the test suite prompts for an initialization time-out, set it to a very high value, like 240, so you will have time to answer any browser security feature before working with the SCO to initialize the API session.

You can also use the packaged version (PIF) appropriate for the version of the test suite you are using (2004 or 1.2). If you make any error in playing with the diagnostic features, the test suite log will obviously report a problem.

Using the Diagnostic SCO right now without downloading anything

See the live demo above.

Using a test script

To run an automated API test, enter or paste one or more API calls in the Script box, one call per line. The calls will be executed one at a time, with the delay you specify between each call. The results will be displayed in the log below. The calls must be in the same format as if they were in a JavaScript statement, one per line. Do not use a semi-colon at the end of the line. You can add comments by marking the beginning of each comment line with a // (double slash). The example below uses SCORM 2004 syntax, but you would of course use SCORM 1.2 syntax when running in a SCORM 1.2 environment.

// This is a very short test script
Initialize()
SetValue("cmi.completion_status","incomplete")
Terminate()

For systematic testing, it may be more convenient to download the script as a text file. You can save any number of scripts on your server and download them as needed. To enable this option, click the Options tab and check Enable download button for test scripts. This will add a button to the Scripted test tab to allow you to download test scripts. This button is normally hidden to help protect the clueless.

Known issues and limitations

Downloading a test script from a "foreign" server is subject to browser security restrictions. IE should warn you when you do this. Firefox will simply refuse to do it. To avoid this problem, put the text file with your test script on the same server as the Diagnostic SCO. You might also be able to get around the limitation by putting the source of your scripts in your Trusted zone, but of course you do that at your own risk.

There is no way to capture and use variable data using test scripts. For example, if you get cmi.objectives._count, there is no way to make the text script use the value that was returned by the call. You can however use the value in new calls you type into a script, or in calls you set up manually by using the API Prodder tab. Note that you can go back and forth between scripts and the API prodder, in fact between all the tabs, without interrupting the communication session with the SCORM API.

Download

Please read the no nonsense License and terms of use below before downloading or using this tool.

Right-click here to download the diagnostic SCO only (.htm file).
Right-click here to download the diagnostic SCO as a complete SCORM 2004 package (.zip file).
Right-click here to download the diagnostic SCO as a complete SCORM 1.2 package (.zip file).

License and terms of use

Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike2.5 License.
USE AT YOUR OWN RISK
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR OR COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.