java.lang.Object
   |
   +----TET.TestSession
  -  public final class TestSession
  -  extends Object
TheTestSession class provides TETware API services to Java
 test cases.
Variable Index
  -   TET_ER_2BIG TET_ER_2BIG
-   tet_errnovalue for argument list too long.
-   TET_ER_ABORT TET_ER_ABORT
-   tet_errnovalue for abort TCM on TP end.
-   TET_ER_CONTEXT TET_ER_CONTEXT
-   tet_errnovalue for request out of context.
-   TET_ER_DONE TET_ER_DONE
-   tet_errnovalue for event finished or already happened.
-   TET_ER_DUPS TET_ER_DUPS
-   tet_errnovalue for request contained duplicate IDs.
-   TET_ER_ERR TET_ER_ERR
-   tet_errnovalue for general error code.
-   TET_ER_FID TET_ER_FID
-   tet_errnovalue for a bad file id.
-   TET_ER_FORK TET_ER_FORK
-   tet_errnovalue for can't fork.
-   TET_ER_INPROGRESS TET_ER_INPROGRESS
-   tet_errnovalue for event in progress.
-   TET_ER_INTERN TET_ER_INTERN
-   tet_errnovalue for a server internal error.
-   TET_ER_INVAL TET_ER_INVAL
-   tet_errnovalue for invalid request parameter.
-   TET_ER_LOGON TET_ER_LOGON
-   tet_errnovalue for not logged on.
-   TET_ER_MAGIC TET_ER_MAGIC
-   tet_errnovalue for a bad magic number.
-   TET_ER_NOENT TET_ER_NOENT
-   tet_errnovalue for no such file or directory.
-   TET_ER_OK TET_ER_OK
-   tet_errnovalue for ok, success.
-   TET_ER_PERM TET_ER_PERM
-   tet_errnovalue for priv request/kill error.
-   TET_ER_PID TET_ER_PID
-   tet_errnovalue for no such process.
-   TET_ER_RCVERR TET_ER_RCVERR
-   tet_errnovalue for a receive message error.
-   TET_ER_REQ TET_ER_REQ
-   tet_errnovalue for an unknown request code.
-   TET_ER_SIGNUM TET_ER_SIGNUM
-   tet_errnovalue for a bad signal number.
-   TET_ER_SNID TET_ER_SNID
-   tet_errnovalue for bad snid in syncd request.
-   TET_ER_SYNCERR TET_ER_SYNCERR
-   tet_errnovalue for sync completed unsuccessfully.
-   TET_ER_SYSID TET_ER_SYSID
-   tet_errnovalue for sysid not in system name list.
-   TET_ER_TIMEDOUT TET_ER_TIMEDOUT
-   tet_errnovalue for request timed out.
-   TET_ER_TRACE TET_ER_TRACE
-   tet_errnovalue for tracing not configured.
-   TET_ER_WAIT TET_ER_WAIT
-   tet_errnovalue for process not terminated.
-   TET_ER_XRID TET_ER_XRID
-   tet_errnovalue for bad xrid in xresd request.
-   TET_FAIL TET_FAIL
-   Result code for FAIL result.
  
-   TET_NORESULT TET_NORESULT
-   Result code for NORESULT result.
  
-   TET_NOTINUSE TET_NOTINUSE
-   Result code for NOTINUSE result.
  
-   TET_PASS TET_PASS
-   Result code for PASS result.
  
-   TET_SV_NO TET_SV_NO
-   Synchronisation "no" vote.
  
-   TET_SV_YES TET_SV_YES
-   Synchronisation "yes" vote.
  
-   TET_UNINITIATED TET_UNINITIATED
-   Result code for UNINITIATED result.
  
-   TET_UNRESOLVED TET_UNRESOLVED
-   Result code for UNRESOLVED result.
  
-   TET_UNSUPPORTED TET_UNSUPPORTED
-   Result code for UNSUPPORTED result.
  
-   TET_UNTESTED TET_UNTESTED
-   Result code for UNTESTED result.
Method Index
  -   tet_delete(int, String) tet_delete(int, String)
-   Mark the test purpose specified by testno as cancelled.
  
-   tet_errlist() tet_errlist()
-   Retrieves the list of error strings which describe each value of
 tet_errno.
-   tet_exit(int) tet_exit(int)
-   Exit function for child process.
  
-   tet_getblock() tet_getblock()
-   Retrieves the current TET block number.
Deprecated.
  
-   tet_getsysbyid(int) tet_getsysbyid(int)
-   Retrieves information about a system participating in the test.
  
-   tet_getvar(String) tet_getvar(String)
-   Gets the value of a configuration variable.
  
-   tet_infoline(String) tet_infoline(String)
-   Prints a line to the execution results file.
  
-   tet_jspawn(String, String[], String[]) tet_jspawn(String, String[], String[])
-   Creates a new subprogram using a Java class.
  
-   tet_kill(long, int) tet_kill(long, int)
-   Sends a signal to a process.
  
-   tet_logoff() tet_logoff()
-   Log off TETware.
  
-   tet_minfoline(String[]) tet_minfoline(String[])
-   Prints a group of lines to the execution results file.
  
-   tet_pname() tet_pname()
-   Retrieves the test case name.
  
-   tet_reason(int) tet_reason(int)
-   Retrieves the reason for test purpose cancellation.
  
-   tet_remgetlist() tet_remgetlist()
-   Gets a list of the other systems participating in the test case.
  
-   tet_remgetsys() tet_remgetsys()
-   Gets the system ID of the system on which the calling process is
 executing.
  
-   tet_remsync(long, int[], int, int, SyncMessage) tet_remsync(long, int[], int, int, SyncMessage)
-   Synchronises with one or more of the other systems in a distributed
 test case.
  
-   tet_remtime(int) tet_remtime(int)
-   Obtains the system time on another system.
  
-   tet_result(int) tet_result(int)
-   Informs the API of the result of the current test purpose.
  
-   tet_setblock() tet_setblock()
-   Increments the current block ID.
  
-   tet_setcontext() tet_setcontext()
-   Sets the current context to the value of the current process ID, and
 resets the block and sequence numbers to 1.
  
-   tet_spawn(String, String[], String[]) tet_spawn(String, String[], String[])
-   Creates a new subprogram.
  
-   tet_thistest() tet_thistest()
-   Retrieves the absolute test number for the currently executing test
 purpose.
  
-   tet_wait(long) tet_wait(long)
-   Waits for a process to terminate.
Variables
 TET_PASS
TET_PASS
 public static final int TET_PASS
  -  Result code for PASS result.
 
 TET_FAIL
TET_FAIL
 public static final int TET_FAIL
  -  Result code for FAIL result.
 
 TET_UNRESOLVED
TET_UNRESOLVED
 public static final int TET_UNRESOLVED
  -  Result code for UNRESOLVED result.
 
 TET_NOTINUSE
TET_NOTINUSE
 public static final int TET_NOTINUSE
  -  Result code for NOTINUSE result.
 
 TET_UNSUPPORTED
TET_UNSUPPORTED
 public static final int TET_UNSUPPORTED
  -  Result code for UNSUPPORTED result.
 
 TET_UNTESTED
TET_UNTESTED
 public static final int TET_UNTESTED
  -  Result code for UNTESTED result.
 
 TET_UNINITIATED
TET_UNINITIATED
 public static final int TET_UNINITIATED
  -  Result code for UNINITIATED result.
 
 TET_NORESULT
TET_NORESULT
 public static final int TET_NORESULT
  -  Result code for NORESULT result.
 
 TET_SV_YES
TET_SV_YES
 public static final int TET_SV_YES
  -  Synchronisation "yes" vote.
 
 TET_SV_NO
TET_SV_NO
 public static final int TET_SV_NO
  -  Synchronisation "no" vote.
 
 TET_ER_OK
TET_ER_OK
 public static final int TET_ER_OK
  -  tet_errnovalue for ok, success.
 
 TET_ER_ERR
TET_ER_ERR
 public static final int TET_ER_ERR
  -  tet_errnovalue for general error code.
 
 TET_ER_MAGIC
TET_ER_MAGIC
 public static final int TET_ER_MAGIC
  -  tet_errnovalue for a bad magic number.
 
 TET_ER_LOGON
TET_ER_LOGON
 public static final int TET_ER_LOGON
  -  tet_errnovalue for not logged on.
 
 TET_ER_RCVERR
TET_ER_RCVERR
 public static final int TET_ER_RCVERR
  -  tet_errnovalue for a receive message error.
 
 TET_ER_REQ
TET_ER_REQ
 public static final int TET_ER_REQ
  -  tet_errnovalue for an unknown request code.
 
 TET_ER_TIMEDOUT
TET_ER_TIMEDOUT
 public static final int TET_ER_TIMEDOUT
  -  tet_errnovalue for request timed out.
 
 TET_ER_DUPS
TET_ER_DUPS
 public static final int TET_ER_DUPS
  -  tet_errnovalue for request contained duplicate IDs.
 
 TET_ER_SYNCERR
TET_ER_SYNCERR
 public static final int TET_ER_SYNCERR
  -  tet_errnovalue for sync completed unsuccessfully.
 
 TET_ER_INVAL
TET_ER_INVAL
 public static final int TET_ER_INVAL
  -  tet_errnovalue for invalid request parameter.
 
 TET_ER_TRACE
TET_ER_TRACE
 public static final int TET_ER_TRACE
  -  tet_errnovalue for tracing not configured.
 
 TET_ER_WAIT
TET_ER_WAIT
 public static final int TET_ER_WAIT
  -  tet_errnovalue for process not terminated.
 
 TET_ER_XRID
TET_ER_XRID
 public static final int TET_ER_XRID
  -  tet_errnovalue for bad xrid in xresd request.
 
 TET_ER_SNID
TET_ER_SNID
 public static final int TET_ER_SNID
  -  tet_errnovalue for bad snid in syncd request.
 
 TET_ER_SYSID
TET_ER_SYSID
 public static final int TET_ER_SYSID
  -  tet_errnovalue for sysid not in system name list.
 
 TET_ER_INPROGRESS
TET_ER_INPROGRESS
 public static final int TET_ER_INPROGRESS
  -  tet_errnovalue for event in progress.
 
 TET_ER_DONE
TET_ER_DONE
 public static final int TET_ER_DONE
  -  tet_errnovalue for event finished or already happened.
 
 TET_ER_CONTEXT
TET_ER_CONTEXT
 public static final int TET_ER_CONTEXT
  -  tet_errnovalue for request out of context.
 
 TET_ER_PERM
TET_ER_PERM
 public static final int TET_ER_PERM
  -  tet_errnovalue for priv request/kill error.
 
 TET_ER_FORK
TET_ER_FORK
 public static final int TET_ER_FORK
  -  tet_errnovalue for can't fork.
 
 TET_ER_NOENT
TET_ER_NOENT
 public static final int TET_ER_NOENT
  -  tet_errnovalue for no such file or directory.
 
 TET_ER_PID
TET_ER_PID
 public static final int TET_ER_PID
  -  tet_errnovalue for no such process.
 
 TET_ER_SIGNUM
TET_ER_SIGNUM
 public static final int TET_ER_SIGNUM
  -  tet_errnovalue for a bad signal number.
 
 TET_ER_FID
TET_ER_FID
 public static final int TET_ER_FID
  -  tet_errnovalue for a bad file id.
 
 TET_ER_INTERN
TET_ER_INTERN
 public static final int TET_ER_INTERN
  -  tet_errnovalue for a server internal error.
 
 TET_ER_ABORT
TET_ER_ABORT
 public static final int TET_ER_ABORT
  -  tet_errnovalue for abort TCM on TP end.
 
 TET_ER_2BIG
TET_ER_2BIG
 public static final int TET_ER_2BIG
  -  tet_errnovalue for argument list too long.
 
Methods
 tet_thistest
tet_thistest
 public native int tet_thistest()
  -  Retrieves the absolute test number for the currently executing test
 purpose. This is 0 when in the startup and cleanup routines.
   
- 
    -  Returns:
    
-  the current test number.
  
 
 tet_pname
tet_pname
 public String tet_pname()
  -  Retrieves the test case name.
   
- 
    -  Returns:
    
-  the test case name.
  
 
 tet_errlist
tet_errlist
 public String[] tet_errlist()
  -  Retrieves the list of error strings which describe each value of
 tet_errno.
   
- 
    -  Returns:
    
-  the list of error strings.
  
 
 tet_setcontext
tet_setcontext
 public native synchronized void tet_setcontext()
  -  Sets the current context to the value of the current process ID, and
 resets the block and sequence numbers to 1.
 
 tet_setblock
tet_setblock
 public void tet_setblock()
  -  Increments the current block ID.
 
 tet_getblock
tet_getblock
 public int tet_getblock()
-  Note: tet_getblock() is deprecated.
Not part of the published API.
   
-  Retrieves the current TET block number.
   
- 
    -  Returns:
    
-  the current TET block number.
  
 
 tet_infoline
tet_infoline
 public native synchronized void tet_infoline(String line)
  -  Prints a line to the execution results file.
   
- 
    -  Parameters:
    
-  line - line to print to the results file.
  
 
 tet_minfoline
tet_minfoline
 public native synchronized void tet_minfoline(String lines[]) throws TetException
  -  Prints a group of lines to the execution results file. In
 Distributed TETware these lines are printed using a single operation
 which guarantees that lines from other test case parts do not appear
 in between lines printed by one call to this function.
   
- 
    -  Parameters:
    
-  lines - group of lines to print to the results file.
    
-  Throws: TetException
    
-  if there was an error printing the
 				lines.
  
 
 tet_result
tet_result
 public native synchronized void tet_result(int result)
  -  Informs the API of the result of the current test purpose.
   
- 
    -  Parameters:
    
-  result - the result code.
  
 
 tet_delete
tet_delete
 public native synchronized void tet_delete(int testno,
                                            String reason)
  -  Mark the test purpose specified by testno as cancelled.
   
- 
    -  Parameters:
    
-  testno - absolute test number of the test purpose to be
			cancelled.
    -  reason - text describing the reason why the test purpose
			is to be marked as cancelled. May be NULL, in
 			which case the specified test purpose is
			reactivated if it has previously been marked as
			cancelled.
  
 
 tet_reason
tet_reason
 public native synchronized String tet_reason(int testno)
  -  Retrieves the reason for test purpose cancellation.
   
- 
    -  Parameters:
    
-  testno - absolute test number of the test purpose.
    
-  Returns:
    
-  a string describing the reason for test purpose
 		cancellation, or nullif this test purpose
		is not marked as cancelled.
 
 tet_getvar
tet_getvar
 public native synchronized String tet_getvar(String name)
  -  Gets the value of a configuration variable.
   
- 
    -  Parameters:
    
-  name - name of the configuration variable.
    
-  Returns:
    
-  the value of the specified configuration variable. If
		the variable specified is defined but has no setting,
 		a Stringobject of zero length is
		returned. If the variable is undefined,nullis returned.
 
 tet_spawn
tet_spawn
 public long tet_spawn(String file,
                       String argv[],
                       String envp[]) throws TetException
  -  Creates a new subprogram. The subprogram launched must be built with
 the child process controller.
   
- 
    -  Parameters:
    
-  file - path of the subprogram to execute.
    -  argv - argument array to pass to new process.
    -  envp - environment data to pass to new process. If
			this is nullor has length 0, the
			current environment is used.
-  Returns:
    
-  the process ID of the newly created process.
    
-  Throws: TetException
    
-  if there is an error launching the
				child process.
  
 
 tet_jspawn
tet_jspawn
 public long tet_jspawn(String classname,
                        String args[],
                        String envp[]) throws TetException
  -  Creates a new subprogram using a Java class. The class must be a
 subclass of ChildTestCase.
   
- 
    -  Parameters:
    
-  classname - name of the Java class to execute in a
				new process.
    -  args - argument array to pass to
				main()method of the class
				N.B.args[0]is the first
				actual argument, not the name of the
				interpreter or the name of the class.
-  envp - environment data to pass to new
				process. If this is nullor has length 0, the current
				environment is used.
-  Returns:
    
-  the process ID of the newly created process.
    
-  Throws: TetException
    
-  if there is an error launching the
				child process.
  
 
 tet_wait
tet_wait
 public native synchronized int tet_wait(long pid) throws TetException
  -  Waits for a process to terminate.
   
- 
    -  Parameters:
    
-  pid - process ID of the process to wait for.
    
-  Returns:
    
-  the exit status of the process.
    
-  Throws: TetException
    
-  if the wait is unsuccessful.
  
 
 tet_kill
tet_kill
 public native synchronized void tet_kill(long pid,
                                          int sig) throws TetException
  -  Sends a signal to a process.
   
- 
    -  Parameters:
    
-  pid - process ID of the victim process.
    -  sig - number of the signal to send. Note that this is
 			ignored on a Windows NT system.
    
-  Throws: TetException
    
-  the kill was unsuccessful.
  
 
 tet_remsync
tet_remsync
 public native synchronized void tet_remsync(long syncptno,
                                             int sysnames[],
                                             int waittime,
                                             int vote,
                                             SyncMessage msg) throws TetException
  -  Synchronises with one or more of the other systems in a distributed
 test case.
   
- 
    -  Parameters:
    
-  syncptno - the sync point number to which the
				calling system wishes to synchronise.
				If syncptno is zero, a successful call
				to tet_remsync()returns
				as soon as all participating systems
				have synchronised to the next sync
				point.
-  sysnames - a list of IDs of the other systems with
				which to synchronise. The system ID of
				the calling system is ignored if it
				appears in the list.
    -  waittime - the number of seconds that may elapse
				between synchronisation requests from
				other participating systems before the
				calling system times out.
    -  vote - how the calling system wishes to vote
				in the synchronisation event. This
				should be TET_SV_YES or TET_SV_NO.
    -  msg - used to exchange sync message data with
				other participating systems.
    
-  Throws: TetException
    
-  if this is TETware-Lite, or if an error
 				occurs during the sync.
    
-  See Also:
    
-  SyncMessage
  
 
 tet_remgetlist
tet_remgetlist
 public native synchronized int[] tet_remgetlist()
  -  Gets a list of the other systems participating in the test case.
   
- 
    -  Returns:
    
-  list of IDs of the other systems participating in the
		test case. Returns nullin TETware-Lite or
		for a test case in which no other systems are
		participating.
 
 tet_remgetsys
tet_remgetsys
 public native synchronized int tet_remgetsys()
  -  Gets the system ID of the system on which the calling process is
 executing.
   
- 
    -  Returns:
    
-  the system ID of the current system.
  
 
 tet_getsysbyid
tet_getsysbyid
 public SystemEntry tet_getsysbyid(int sysid) throws TetException
  -  Retrieves information about a system participating in the test.
   
- 
    -  Parameters:
    
-  sysid - ID of the system of interest.
    
-  Returns:
    
-  the entry for the requested system.
    
-  Throws: TetException
    
-  if this is TETware-Lite, or if an error
 				occurs retrieving the entry for the
				specified system.
    
-  See Also:
    
-  SystemEntry
  
 
 tet_remtime
tet_remtime
 public Date tet_remtime(int sysid) throws TetException
  -  Obtains the system time on another system.
   
- 
    -  Parameters:
    
-  sysid - ID of the system of interest.
    
-  Returns:
    
-  the system time on the system of interest.
    
-  Throws: TetException
    
-  if this is TETware-Lite, or if an error
 				occurs retrieving the system time of
				the specified system.
  
 
 tet_exit
tet_exit
 public native synchronized void tet_exit(int status)
  -  Exit function for child process. This should be used instead of
 java.lang.System.exit()by child processes created bytet_spawn(). In Distribute TETware this method logs off
 all TETware servers, then exits with the specified status.
   
- 
    -  Parameters:
    
-  status - exit status.
  
 
 tet_logoff
tet_logoff
 public native synchronized void tet_logoff()
  -  Log off TETware. This may be called by a child process that is
 started by a call to tet_spawn()which does not need to
 make any further TETware API calls and is not able to calltet_exit()at process termination. This should only be
 called once from the child process. In Distributed TETware, the
 results are undefined if a process or any of its descendents makes
 any TETware API calls after tet_logoff() is called.