KCMS Test Suite User's Guide

Using Automated Script Files To Run Test Scripts

The kcmstest directory includes two automated scripts: auto-kcmstest and auto-kcmstest-root.


Note -

See "Tips on Running the Automated Test Scripts" before using this testing method.


Using auto-kcmstest

The auto-kcmstest script allows you to run the complete test suite in icc.ini, including scripts in the icc.ini file list that access a remote host. This script is located in the kcmstest directory.


Note -

You may need to edit the script to change path information.


To run this script, do not set the environment variable KCMSROOT with the setenv command. Instead, provide two arguments: the KCMSROOT environment variable as the first argument and the remote host name as the second, for example

%auto-kcmstest
/opt/SUNWddk/kcms dusk

In this example, /opt/SUNWddk/kcms is the KCMSROOT environment variable and dusk is the remote host name. Note that if you are in the directory where auto-kcmstest() is located, only the host argument is needed, for example

%auto-kcmstest
dusk

Using auto-kcmstest-root

Certain test scripts require that you be root to run them. You would use these tests if, for example, you wanted to create an X Window System profile in a root-owned directory. To run these scripts, a second automated script called auto-kcmstest-root is provided.

To run the auto-kcmstest-root script,

  1. Become superuser.

    %su
    
  2. Provide one argument: the KCMSROOT environment variable, for example

    #./auto-kcmstest-root /opt/SUNWddk/kcms

    Note that if you are in the directory containing auto-kcmstest-root, no argument is required.

Getting a Failure and Performance Report

After you have run the complete test suite using auto-kcmstest and auto-kcmstest-root, you can get an automated failure and performance report by running the kcms-testreport command. This command takes two arguments: the name of the test log and the report title. Very likely, you would redirect output to a file of the same name as the report title, for example

%kcms-testreport
log/testall.log my_test_1 > my_test_2

In this example, my_test_1 is the report title and my_test_2 is the output filename.

Tips on Running the Automated Test Scripts

The following is a suggested sequence for running a complete test suite using the automated script files:

  1. Run the auto-kcmstest script, for example

    %auto-kcmstest
    /opt/SUNWddk/kcms dusk
    
  2. Become root, for example

    %su
    
  3. Run the auto-kcmstest-root script, for example

    #./auto-kcmstest-root
    /opt/SUNWddk/kcms 
    
  4. Run kcms-testreport and redirect output to a file, for example

    #kcms_testreport
    log/testall.log my_test_1 > my_test_2 
    

    Note -

    auto-kcmstest-root must be run after auto-kcmstest because it appends its resulting logs to the auto-kcmstest log file.


    You may want to redirect the automated-test-script output to a file, as it is quite lengthy.