Home Corporate Contacts

TETware Java API Overview


Products
Solutions

Information

Datasheet
Documentation
FAQ
Knowledgebase

9.Cancelling Test Purposes


Introduction

These methods are provided for use when cancelling test purposes.

Contents:  tet_delete()  tet_reason()

tet_delete()

Synopsis


      // public class TestSession
      public void tet_delete(int testno, String reason)

Description

A call to tet_delete() marks the test purpose specified by the absolute test number testno as cancelled. If the test purpose specified by testno is not defined in the test case, a call to tet_delete() has no effect. reason should describe the reason why the test purpose is to be marked as cancelled. When the TCM prepares to call a test purpose function, it first checks to see if the function has been marked as cancelled by a call to tet_delete(). If the test purpose has been marked as cancelled, the TCM does not call the function but instead prints the line pointed to by reason to the execution results file and records a result of UNINITIATED. If a call to tet_delete() names a testno that has been marked as cancelled by a previous tet_delete() call, the reason for cancellation is changed to the reason specified in the current call. If tet_delete() is called with a reason parameter of null, the test purpose specified by testno is reactivated if it has previously been marked as cancelled. If tet_delete() is called in a distributed test case, the API notifies other participating TCMs of the cancellation. This notification occurs when the TCMs synchronise with each other before attempting to execute the cancelled test purpose. Thus, none of the TCMs execute a distributed test purpose which has been cancelled on any of the participating systems.

Return value

This method does not return a value.

Application notes

The tet_delete() method can only usefully be called from a top-level test case (that is: a test case derived from SimpleTestCase). It has no effect when called from a child test case (that is: a test case derived from ChildTestCase).


tet_reason()

Synopsis


      // public class TestSession
      public String tet_reason(int testno)

Description

The method tet_reason() returns a String object which contains the reason why the test purpose with the specified absolute test number has been cancelled by a previous call to tet_delete(). If this test purpose is not defined in the test case or is not marked as cancelled, null is returned.

Return value

If the specified test purpose exists and has been cancelled by a previous call to tet_delete(), a call to tet_reason() returns the reason parameter supplied with the tet_delete() call; otherwise, null is returned.

Application notes

The tet_reason() method can only usefully be called from a top-level test case (that is: a test case derived from SimpleTestCase). It has no effect when called from a child test case (that is: a test case derived from ChildTestCase). It is not possible to use tet_reason() in a distributed test case to determine whether or not a test purpose has been cancelled on another system.

Return to Contents



Home Contacts Legal Copyright Corporate News

Copyright © The Open Group 1995-2012, All Rights Reserved