IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.testgen.core2
Interface IC2TestgenListener


public interface IC2TestgenListener

Implementations of this interface can be registered with a TestGenerator in order to receive status reports regarding the progress of test generation and any errors that occurred during processing. IC2TestgenListener corresponds with IC2TestgenStatusReporter. Objects that are IC2TestgenStatusReporters are able to keep IC2TestgenListeners abreast of the status of the test generation operation.

See Also:
IC2TestgenStatusReporter

Field Summary
static int STATUS_ERROR
          error status indicator
static int STATUS_SUCCESS
          successful status indicator
 
Method Summary
 void errorOccurred(String taskName, String errorMsg, Throwable error)
          An error occured during test generation.
 void percentComplete(int p)
           
 void statusReported(String taskName, String statusMsg)
          Status has been reported in regard to the specified task.
 void taskEnded(String taskName)
          A test generation task has been completed.
 void taskStarted(String taskName)
          A test generation task has begun.
 void testgenEnded(int status, String statusMsg)
          Test generation has ended.
 void testgenStarted()
          Test generation has begun.
 

Field Detail

STATUS_SUCCESS

static final int STATUS_SUCCESS
successful status indicator

See Also:
Constant Field Values

STATUS_ERROR

static final int STATUS_ERROR
error status indicator

See Also:
Constant Field Values
Method Detail

testgenStarted

void testgenStarted()
Test generation has begun.


percentComplete

void percentComplete(int p)

testgenEnded

void testgenEnded(int status,
                  String statusMsg)
Test generation has ended. The specified status indicator indicates whether or not the operation was successful.

Parameters:
status - the status of the overall code generation operation -- one of
  • STATUS_SUCCESS
  • STATUS_ERROR
statusMsg - a descriptive message corresponding to status

taskStarted

void taskStarted(String taskName)
A test generation task has begun.

Parameters:
taskName - the name of the task

statusReported

void statusReported(String taskName,
                    String statusMsg)
Status has been reported in regard to the specified task.

Parameters:
taskName - the name of the task
statusMsg - an informative message

taskEnded

void taskEnded(String taskName)
A test generation task has been completed.

Parameters:
taskName - the namne of the task

errorOccurred

void errorOccurred(String taskName,
                   String errorMsg,
                   Throwable error)
An error occured during test generation. Both fatal and nonfatal errors are reported via this method. Listeners should not assume that the overall test generation operation has failed because this method is called. The status indicator that is passed when testGenEnded(int, String) is called is the true indication of the success of the overall test generation operation.

Parameters:
taskName - the task that was being performed when the error occurred
errorMsg - a descriptive message describing the error condition
error - a Throwable that was caught during detection of the error condition. This value will be null if no exception was thrown.

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.