IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.kernel.services
Interface ILoopControl


public interface ILoopControl

The ILoopControl interface provides basic control over loops in a performance test or schedule. It is used from ICustomCode2 with the getLoopControl() method in ITestExecutionServices.

The loop that is acted on is the nearest containing loop found in either the test or the schedule. breakLoop() and continueLoop() take effect after the current child action of the loop container is complete. For example, if a loop contains two pages, pageA and pageB, and within pageA custom code is inserted that calls breakLoop(), the remaining actions (requests) of pageA are executed and pageA terminates normally. The loop breaks before beginning pageB.


Method Summary
 void breakImmediate(String message)
          Causes immediate termination of the loop.
 void breakImmediate(String message, boolean showStack)
          Causes immediate termination of the loop.
 void breakImmediate(String message, int severity)
          Causes immediate termination of the loop.
 void breakImmediate(String message, int severity, boolean showStack)
          Causes immediate termination of the loop.
 void breakLoop()
          Causes termination of the loop as soon as the current child of the loop finishes.
 void continueImmediate(String message)
          Causes immediate termination of the current iteration of the loop.
 void continueImmediate(String message, boolean showStack)
          Causes immediate termination of the current iteration of the loop.
 void continueImmediate(String message, int severity)
          Causes immediate termination of the current iteration of the loop.
 void continueImmediate(String message, int severity, boolean showStack)
          Causes immediate termination of the current iteration of the loop.
 void continueLoop()
          Causes the loop to skip the remainder of the current iteration of the body after the current child of the loop finishes.
 long getElapsedTime()
          How long has this loop been running?
 int getIterationCount()
          Returns the iteration count (1-based) for the current instance of the loop.
 

Method Detail

breakLoop

void breakLoop()
Causes termination of the loop as soon as the current child of the loop finishes.


breakImmediate

void breakImmediate(String message)
Causes immediate termination of the loop. This method does not return. A message event is written to the testLog with severity equal to MessageEvent.INFO. The message event will not include a stack trace showing the origin of the call.

Parameters:
message - The message to include in the testLog message event.

breakImmediate

void breakImmediate(String message,
                    int severity)
Causes immediate termination of the loop. This method does not return. A message event is written to the testLog with severity equal to the given severity. The message event will not include a stack trace showing the origin of the call.

Parameters:
message - The message to include in the testLog message event.
severity - The severity to assign to the testLog message event.

breakImmediate

void breakImmediate(String message,
                    int severity,
                    boolean showStack)
Causes immediate termination of the loop. This method does not return. A message event is written to the testLog with severity equal to the given severity. The message event will include a stack trace showing the origin of the call if the value of showStack is true.

Parameters:
message - The message to include in the testLog message event.
severity - The severity to assign to the testLog message event.
showStack - indicates whether or not to include a stack trace in the testLog message event.

breakImmediate

void breakImmediate(String message,
                    boolean showStack)
Causes immediate termination of the loop. This method does not return. A message event is written to the testLog with severity equal to MessageEvent.INFO. The message event will include a stack trace showing the origin of the call if the value of showStack is true.

Parameters:
message - The message to include in the testLog message event.
showStack - indicates whether or not to include a stack trace in the testLog message event.

continueLoop

void continueLoop()
Causes the loop to skip the remainder of the current iteration of the body after the current child of the loop finishes.


continueImmediate

void continueImmediate(String message)
Causes immediate termination of the current iteration of the loop. This method does not return. A message event is written to the testLog with severity equal to MessageEvent.INFO. The message event will not include a stack trace showing the origin of the call.

Parameters:
message - The message to include in the testLog message event.

continueImmediate

void continueImmediate(String message,
                       int severity)
Causes immediate termination of the current iteration of the loop. This method does not return. A message event is written to the testLog with severity equal to the given severity. The message event will not include a stack trace showing the origin of the call.

Parameters:
message - The message to include in the testLog message event.
severity - The severity to assign to the testLog message event.

continueImmediate

void continueImmediate(String message,
                       int severity,
                       boolean showStack)
Causes immediate termination of the current iteration of the loop. This method does not return. A message event is written to the testLog with severity equal to the given severity. The message event will include a stack trace showing the origin of the call if the value of showStack is true.

Parameters:
message - The message to include in the testLog message event.
severity - The severity to assign to the testLog message event.
showStack - indicates whether or not to include a stack trace in the testLog message event.

continueImmediate

void continueImmediate(String message,
                       boolean showStack)
Causes immediate termination of the current iteration of the loop. This method does not return. A message event is written to the testLog with severity equal to MessageEvent.INFO. The message event will include a stack trace showing the origin of the call if the value of showStack is true.

Parameters:
message - The message to include in the testLog message event.
showStack - indicates whether or not to include a stack trace in the testLog message event.

getIterationCount

int getIterationCount()
Returns the iteration count (1-based) for the current instance of the loop.

Returns:
The iteration count (1-based) for the current instance of the loop.

getElapsedTime

long getElapsedTime()
How long has this loop been running?

Returns:
The number of milliseconds since the loop started.

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.