KCMS Test Suite User's Guide

KCMS Test Script Commands

In general, a KCMS test script command corresponds to each of the KCMS "C" API functions. Additionally, there are some commands that are necessary to facilitate scripting and reading the test results log. See Chapter 3, KCMS Test Suite Commands ," for a detailed description of each command. Table 2-1 lists each of the script commands and the KCMS "C" API function to which it corresponds.

Table 2-1 Test Script Commands and "C" API Functions

Test Script Command 

KCMS "C" API Function 

CONNECT:

KcsConnectProfile()()

CREATE:

KcsCreateProfile()()

EVAL:

KcsEvaluate()()

FREE:

KcsFreeProfile()()

GETATTR:

KcsGetAttribute()()

LOAD:

KcsLoadProfile()()

LOG:

No specific function. It writes to a log file.  

MODIFYLH:

KcsModifyLoadHints()()

OPTIMIZE:

KcsOptimizeProfile()()

SAVE:

KcsSaveProfile()()

SETATTR:

KcsSetAttribute()()

UPDATE:

KcsUpdateProfile()()

Script Command Format

A single script command consists of the command name (including the colon), followed by one or more keyword/value pairs. A keyword is separated from its value by an equal sign (=). Each keyword/value pair ends with a semicolon(;).

The basic script command format is shown below:

COMMAND_NAME:keyword=value; keyword=value;

You can free-format test scripts. That is, you can insert any whitespace character into any script command.

Example 2-2 shows an actual test script that demonstrates some of the script commands and their associated keywords and values.


Example 2-2 Sample Test Script Showing Commands

LOAD:Reference=scanner;
Profile=mtk600zs.inp; Handling=File; LoadHint=AllNow; LOAD:Reference=monitor;

Profile=sony16.mon; Handling=File; LoadHint=AllNow; CONNECT:NAME=scan-mon;    

 Count=2;      Reference=scanner;      Reference=monitor;     

Operation=FORWARD; EVAL:Reference=scan-mon;     

SourcePixLayout=RGBInterLeaved;      DestPixLayout=RGBInterLeaved;     

Callbacks=;      ImageIn=rhg_mtek600;      ImageOut=rhg_mon.tst;     

Operation=Forward; FREE:Reference=scanner; FREE:Reference=monitor;

FREE:Reference=scan-mon;