KCMS Test Suite User's Guide

Chapter 1 KCMS Test Suite Overview

In This Chapter

This chapter explains what the KCMS test suite is, summarizes how it works, and provides the testing approach so you know what to expect from the tests. For information on the KCMS development environment, see "Development Environment Requirements" .

What is the KCMS Test Suite?

The KCMS test suite is a set of scripts that test the KCMS "C" application program interface (API). The KCMS "C" API is described in detail in the KCMS Application Developer's Guide.

In addition to enhancement scripts that support new features and fix bugs, the KCMS test suite includes one or more scripts that correspond to each of the following KCMS functions:

All the KCMS test scripts contain commands. In general, a script command corresponds to each KCMS "C"API function call. The test scripts organize the commands to be executed according to the guidelines in the KCMS Application Developer's Guide. A few commands that accept variable-length input vary slightly from the API structure. See Chapter 5, Setting Attributes ," for details on these exceptions.

All the test scripts in each functional category perform operations to confirm that subsequent KCMS API functions such as connecting profiles and evaluating the results can be performed. At the conclusion of each test, the profile(s) are freed.

Some additional commands in the KCMS test suite facilitate scripting and reading of a log file that contains the test results.

How the Test Suite Works

You use kcmstest, a script-driven utility that you run from a command shell, to test your CMM for KCMS framework interaction. kcmstest is supported on SPARC(TM) and x86 platforms.

kcmstest interprets each script command, and the corresponding KCMS framework function call is performed. Then the next script command is read and again the appropriate framework function call is made. Any data or information that needs to be maintained to make the sequence of function calls coherent is provided by kcmstest.

Various options to kcmstest allow you to run one to several test scripts. As each test script command executes, information about it is displayed to the command shell window and to a log file. If at any time during execution of a KCMS framework function call an unexpected status is returned, the test is immediately aborted.

Approach To Testing

The KCMS test scripts are organized to focus on a specific function call and exercise it through the range of its parameters. Because some functions depend upon the successful completion of previous functions, by necessity, a given test consists of several different API function calls.

To absolutely verify that a profile is loaded successfully would require examining internal framework variables for specific values. Such an approach to testing the API is too intrusive to be effective. The KCMS test scripts, instead, rely on the status returned from each of the KCMS API functions along with some inferred conclusions about the results of functions yet to be executed. For example, the status returned from connecting two profiles is one indication that a connection succeeded. Following this, the new complete profile can be used in a call to KcsEvaluate()() and the status returned from the evaluation can be used as another indication of the success of the connection. This assumes that the evaluation has no errors associated with it. If you want to further verify the connection, you can examine the image resulting from the call to KcsEvaluate()() and compare it to some expected output.

In the above testing scenario, subsequent framework calls are used to verify an initial call, and conclusions about the initial call are drawn from the results of subsequent calls.

The ultimate goal of using the KCMS framework is to evaluate the results of applying color correction to images. The test images are organized in TIFF file format. To preserve system resources, many of the test scripts do not save the resulting TIFF image (however, you have the option to save the image). The main test concern is to demonstrate that the evaluation completes successfully for a given profile.

The scripts described in this guide do not focus on the color quality of the images tested. In a few cases, the color-managed image can be displayed for verification purposes, however the primary focus of the tests is to demonstrate the software color quality. In most cases, you must visually inspect an image to verify it.

Extending Testing For Your CMM

The existing profiles use the default CMM provided with KCMS. To extend this testing for your own CMM and resulting profiles, you may choose to replace profile names in some of the tests with your own similar profiles. (That is, replace a monitor profile with your own monitor profile, a scanner profile with your scanner profile, and printer profile with your printer profile.) The CMM Id in the profile will cause your CMM to be loaded for the resulting tests. Instead of modifying existing scripts for your profiles, you may choose to create new ones. In the same manner as profiles, data for updating your profiles may be replaced with your own data, and images may be replaced with your own TIFF file images.