RADE

Java Unit Test Manager

mkodt

Runs test objects
Quick Reference

Name

mkodt Runs java test objects

Synopsis

mkodt can be run in contextual or descriptive mode:

[Top]

Description

Runs java test objects, that is, shell scripts that launch java applications delivered in test frameworks. Using its options, mkodt gives the choice of running one test object or all the test objects found either in a given framework or workspace.

mkodt is available with mkmk commands, and can be accessed after running the mkmk_profile or adl_profile command.

[Top]

Options

mkodt accepts the following options:

-a Replays all tests objects for a workspace, a framework, or a directory TestCases or SwitchTestCases
-D Sets the display mode for debug purposes, that is, opens a window ("xterm" or "DOS") for interactive testing. This window is opened in the same environment that the one used by the test object, thus it is possible to check for the value of environment variables. Available in contextual mode only
-d wsabspath Specifies the workspace root directory using an absolute path
-F framework Specifies a framework directory or a list of framework directories of the workspace
-h Displays the mkodt help
-k Keeps the temporary directory set using ADL_ODT_TMP
-L scriptlist1 Reads the file scriptlist1 to get a list of shell scripts to execute. These shell scripts can be in different frameworks of the workspace. scriptlist1 must have the following format:
  FW1   Type   ODTName1
  FW2   Type   ODTName2
  FW3   Type   ODTName3

where Type can be either TestCases or SwitchTestCases. If the path of the scriptfile is not specified, this file must be in the current directory or in the workspace root directory

-l scriptlist2 Reads the file scriptlist2 to get a list of shell scripts to execute. scriptlist2 must have the following format
  ODTName1
  ODTName2
  ODTName3

If the path of the scriptfile is not specified, this file must be in the current directory or in the workspace root directory

-NOMaxTime Disables the supervision of the ODT's execution time
-NoPert Disables the pertinence measure for an ODT
-o output Specifies an output directory and sets the ADL_ODT_OUT variable. Results of mkodt ( .traces and .mkodt_results files) are generated in the directory Output/Framework.tst/FunctionTests/Output/OS, where OS is a directory the name of which is an acronym that depends on the operating system. Refer to [1] to get the current list of operating systems supported and associated acronyms.

-p path Specifies the directory pathname concatenation where the module or EXE are searched for, and initializes ADL_ODT_CONCATENATION (used by the WhichDir command). Directory pathnames are separated by a : (colon) with Unix and a ; (semicolon) with Windows
-q Quiet mode : no user information
-r rtpath Specifies the directory pathname concatenation where the module or EXE are searched for without changing the ADL_ODT_CONCATENATION value. Directory pathnames are separated by a : (colon) with Unix and a ; (semicolon) with Windows
-S Searches test objects in SwitchTestCases instead of TestCases
-s shell Lists the shell script names to run
-t Reports the time spent for the execution
-UpdateInit Deletes the directory generated by ODTInit
-W wsrelpath Specifies the workspace root directory using a relative path from the $HOME directory. Valid with UNIX only
-X Forces output display. By default, program's outputs are not displayed, and this option forces them to be displayed

[Top]

Examples

To run the ODTs whose shells are listed in the shell file in contextual mode.
mkodt -D -s shell
To run, with Unix only, all ODTs in a given workspace by specifying a relative directory
mkodt -a -W CAAWorkspace
To run, with Unix only, all ODTs of a given framework of a given workspace by specifying a relative directory
mkodt -a -W CAAWorkspace -F fwname
To run all ODTs in a given workspace by specifying an absolute directory
Unix
mkodt -a -d /u/users/psr/CAAWorkspace
Windows
mkodt -a -d e:\users\psr\CAAWorkspace
To run all ODTs in a given workspace by specifying an absolute directory, and generate output in a given directory
Unix
mkodt -a -d /u/users/psr/CAAWorkspace -o /u/users/psr/output
Windows
mkodt -a -d e:\users\psr\CAAWorkspace -o e:\users\psr\output
To run all ODTs in a given workspace by specifying the workspace absolute directory, and generate output in a given directory, using the programs located in a local directory and resetting the ADL_ODT_CONCATENATION variable to this directory
Unix
mkodt -d /u/lego/CXR4/BSF -a -o /u/users/psr/output -p /u/users/psr/steplib/CXR4/LocalWS
Windows
mkodt -d \\renoir\CXR4\BSF -a -o E:\users\psr\output -p e:\steplib\CXR4\LocalWS

The common content of the ADL_ODT_CONCATENATION and of the runtime concatenation used is either /u/users/psr/steplib/CXR4/LocalWS with Unix or e:\steplib\CXR4\LocalWS with Windows.

To run all ODTs in a given workspace by specifying the workspace absolute directory, and generate output in a given directory, using the programs located in a local directory without resetting the ADL_ODT_CONCATENATION variable
Unix
mkodt -d /u/lego/CXR4/BSF -a -o /u/users/psr/output -r /u/users/psr/steplib/CXR4/LocalWS
Windows
mkodt -d \\renoir\CXR4\BSF -a -o E:\users\psr\output -r e:\steplib\CXR4\LocalWS
The content of the ADL_ODT_CONCATENATION variable is unchanged and the directory in which the programs are searched for is either /u/users/psr/steplib/CXR4/LocalWS with Unix or e:\steplib\CXR4\LocalWS with Windows.

[Top]

Environment Variables

mkodt uses the following environment variables:

ADL_ODT_CONCATENATION Contains a directory concatenation used by the WhichDir command
ADL_ODT_JRE References the JRE (Java RunTime Environment) where the ODT is going to be replayed:

ADL_ODT_JRE can be set to:

  1. msjre_a (Windows) (Microsoft's JRE available on Windows)
  2. sunjre_a (Windows and SunOS) (SUN's JRE available on Windows and SunOS)
  3. ibmjre_a (AIX) (IBM's JRE available on AIX)
  4. hpjre_a (HP) (HP's JRE available on HP)

If this variable is not set before launching mkodt, it will be set by default to:

  1. Replay on Windows: sunjre_a
  2. Replay on SunOS: sunjre_a
  3. Replay on AIX: ibmjre_a
  4. Replay on HP: hpjre_a
ADL_ODT_IN Contains a directory where all data needed as input for a program is stored
ADL_ODT_NULL Contains a special file name that can be used to redirect outputs from a program (/dev/null with Unix or NUL with Windows)
ADL_ODT_OUT Contains an output directory where any output data can be stored
ADL_ODT_REF Contains a directory where reference data is stored. Reference data is used as a reference to compare program output
ADL_ODT_TMP Contains a temporary directory, for instance /tmp with Unix and C:\TEMP with Windows
MKMK_LST_RTV Contains a runtime path concatenation. Corresponds to -r option
MKODT_SUPENV Contains a shell script path that will be run before the ODT shell script. Use this variable to set an environment extension. By default, if this variable is not set, mkodt looks for MKODT_SUPENV_($ADL_FR_CATIA) file in $PATH
ODT_MAX_TIME_COEFF Contains a percentage to apply to the max_time value:
max_time = max_time*$ODT_MAX_TIME_COEFF/100
ODT_MAX_TIME Contains the maximum time that the ODT can run before being stopped, expressed in xxx (max_time)
ODT_PERTINENCE Contains the pertinence measure ability. Valid values are:
Yes Enables the pertinence measure
No Disables the pertinence measure
ODT_PERTINENCE=No corresponds to the -NoPert option
OPTION_FOR_SETCATENV Contains additional options for setcatenv (set the CATIA environment)
WSROOT Contains the workspace directory containing the test objects to run

[Top]

Diagnostics

Possible exit status values are:

0 Successful completion
>0 Failure because any of the following

[Top]


References

[1] Building and Launching a CAA V5 Use Case
[Top]

History

Version: 1 [March 2001] Document created
[Top]

Copyright © 2000, Dassault Systèmes. All rights reserved.