IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.kernel.engine
Interface IEngine

All Superinterfaces:
IContainer, ICountable, IKAction, IKLog, IKSemaphore, ITestExecutionServices, Runnable

public interface IEngine
extends IContainer

Interfaces for Test Execution.


Field Summary
 
Fields inherited from interface com.ibm.rational.test.lt.kernel.action.IKAction
ABANDONED, DP_ENCRYPTED_VALUES_KEY, EXECUTING, FINISHED, HANDLETIMER, SEMWAIT, SLEEPING, Status, UNSTARTED
 
Fields inherited from interface com.ibm.rational.test.lt.kernel.logging.IKLog
HISTORY_ALL, HISTORY_NONE, HISTORY_PAGES, HISTORY_REQUESTS, HISTORY_SCHEDULE, LOG_ALL, LOG_CONFIG, LOG_FINE, LOG_FINER, LOG_FINEST, LOG_INFO, LOG_NONE, LOG_SEVERE, LOG_WARNING, STATISTIC_ALL, STATISTIC_NONE, STATISTIC_PAGES
 
Fields inherited from interface com.ibm.rational.test.lt.kernel.services.ITestExecutionServices
STORAGE_LOCAL, STORAGE_USER
 
Method Summary
 void addDatapool(String datapoolName, int datapoolOffset, int datapoolNumberOfRows)
          Deprecated.  
 void addSyncPoint(String name, int timeout, boolean releaseTogether, int togetherDwell, int staggerMinDwell, int staggerMaxDwell, int expected, boolean autoRelease, IStatTree runStat)
          Engine Sync Point Management.
 boolean addUsers(String userGroupName, int numUsers, int startingUserNum, int startingGlobalNum)
          Add virtual users.
 void createWorker()
          Create a new Engine Worker and worker thread.
 boolean engineStopped()
          Deprecated.  
 void executeTest(String scriptName, int numUsers)
          Execute test.
 Map getDatapoolMap()
          Deprecated.  
 String getDeploymentDirectory()
          Deprecated.  
 String getDriverName()
          Deprecated.  
 IEngineInfo getEngineInfo()
          container for various bits of info
 Object getEngineShutdownLock()
          Engine shutdown lock.
 IRatlRunner getRunner()
           
 com.ibm.rational.test.lt.kernel.action.impl.Schedule getSchedule()
          Executing schedule container.
 String getStatus()
          Engine status.
 int getStopReason()
           
 int getTotalMemory()
          Deprecated.  
 int getVirtualUsersActive()
          Deprecated.  
 boolean initializeFinalize(String extPt, String feature, String className)
          Engine InitializeFinalize runnable for Engine and Worker.
 boolean isScheduleRun()
          Deprecated.  
 boolean loadSchedule(String scheduleName)
          Load a schedule for execution.
 void releaseSyncPoint(String name, long releaseTime)
           
 void runUntilFinish(IKAction action)
          Dispatch next action and wait for specific action finish.
 void runUntilStarted(IKAction action)
          Dispatch next action and wait for specific action start.
 boolean runUsers()
          Run virtual users.
 boolean runUsers(int staggerDelay)
          Run virtual users.
 boolean runUsers(String UGName, com.ibm.rational.test.lt.kernel.impl.KStaggerPair[] stagger)
          Run virtual users.
 void setDeploymentDirectory(String dir)
          Deprecated.  
 void setDriverName(String name)
          Deprecated.  
 void setHistoryLevel(int testLogLevel)
          Set Engine testLog level.
 void setHistoryLevel(int testLogLevel, int filter)
          Set Engine testLog level for the given filter.
 void setLogLevel(int logLevel)
          Set Engine log level.
 void setManualStop(boolean b)
          Stop engine manually.
 void setRunner(IRatlRunner runner)
          Suitable runner for communication with schedule controller.
 void setScheduleRunFlag(boolean flag)
          Deprecated.  
 void setStatisticsLevel(int statisticsLevel)
          Set Engine statistics level.
 void setStopReason(int r)
           
 boolean setUserLevels(String userGroupName, int numLoggingUsers, int numHistoryUsers, int numStatsUsers)
          Deprecated.  
 boolean setUserLevels(String userGroupName, int numLoggingUsers, int numHistoryUsers, int numStatsUsers, int numARMUsers)
          Set virtual user levels.
 void setWorkBenchHostName(String userId)
          Deprecated.  
 void setWorkBenchUserId(String userId)
          Deprecated.  
 void stop()
          Stop the engine.
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.action.IContainer
add, addCatch, addFinally, addInitially, current, finish, get, getActions, getActionsArray, getChildCount, getParentHistoryId, getStartEvent, getStartHistoryId, getStopEvent, getUserGroup, getVirtualUser, isAllowChildrenToPageTestLog, next, nextHistoryId, previous, recordChildExecutionTime, registerChildVerdict, registerChildVerdict, registerChildVerdict, registerChildVerdict, remove, rollUpVerdicts, setAllowChildrenToPageTestLog, setStartHistoryId, stopChildren, verifyParentRelationships
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.action.IKAction
abandon, addEventBehavior, blocked, execute, executeAction, executionTime, findDataArea, finish, getBlockedTimeout, getHistory, getHistoryType, getId, getName, getParent, getResultInteger, getResultObject, getResultString, getRtbEnabled, getStatTree, getStopRequested, getSubsystem, getTimeoutDuration, getTimeoutScheme, getVirtualUserName, getWorkerThread, hasFinished, hasStarted, isRunning, reset, setBlockedTimeout, setDispatchingAction, setHistory, setHistoryType, setId, setResultInteger, setResultObject, setResultString, setResultString, setRtbEnabled, setStatTree, start, status, stop, stopAction
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.ICountable
addCounter, getCounter, getCounters, resetCounters
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.logging.IKLog
getHistoryLevel, getHistoryLevel, getLogLevel, getStatisticsLevel, getVirtualUserGUID, log, log, log, log, reportEvent, reportEvent, reportEvent, reportMessage, reportMessage, reportMessage, reportVerdict, reportVerdict, reportVerdict, reportVerdict, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, reportVerificationPoint, wouldARM, wouldLog, wouldReportHistory, wouldReportHistory, wouldReportStatistics
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.action.IKSemaphore
acquire, availablePermits, getQueue, getQueueLength, reducePermits, release, release, toString, tryAcquire, tryAcquire
 
Methods inherited from interface com.ibm.rational.test.lt.kernel.services.ITestExecutionServices
getARM, getLoopControl, getPDLogManager, getStatisticsManager, getTestLogManager, getTime, getTransaction, getValue, setValue
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

runUntilFinish

void runUntilFinish(IKAction action)
Dispatch next action and wait for specific action finish.

Starts execution of next action added. Returns when specified action finishes.

Parameters:
action - Wait for this action to finish executing.

runUntilStarted

void runUntilStarted(IKAction action)
Dispatch next action and wait for specific action start.

Starts execution of next action added. Returns when specified action has begun execution.

Parameters:
action - Wait for this action to get started.

setManualStop

void setManualStop(boolean b)
Stop engine manually.

Engine normally finishes when last child finishes. Specifying manual stop allows engine to remain active until stopped by explicit call to stop.

Parameters:
b - true to turn on manual stop false to turn off manual stop

stop

void stop()
Stop the engine.

Stops the engine, waiting for engine shutdown before returning. Engine will stop hard in 30 seconds if executing actions do not respond to request to stop.

Specified by:
stop in interface IKAction
See Also:
IKAction.hasStarted(), IKAction.hasFinished(), IKAction.isRunning(), IKAction.start(), IKAction.finish()

loadSchedule

boolean loadSchedule(String scheduleName)
Load a schedule for execution.

Dynamically loads schedule specified by class name.

Parameters:
scheduleName - The schedule class name.
Returns:
true if the schedule load succeeded.

addUsers

boolean addUsers(String userGroupName,
                 int numUsers,
                 int startingUserNum,
                 int startingGlobalNum)
Add virtual users.

Dynamically creates new virtual users based on workload defined by the UserGroup.

Parameters:
userGroupName - The UserGroup name.
numUsers - The number of users to add.
startingUserNum - The starting user number for this UserGroup.
startingGlobalNum - The starting user global number spanning agents.
Returns:
true if the users were added.

runUsers

boolean runUsers(int staggerDelay)
Run virtual users.

Starts execution of virtual users added to the engine.

Parameters:
staggerDelay - A delay value, specified in milliseconds, between starting users.
Returns:
true if the users are all running.

runUsers

boolean runUsers()
Run virtual users.

Starts execution of virtual users added to the engine with a default stagger delay of 10 milliseconds.

Returns:
true if the users are all running.

runUsers

boolean runUsers(String UGName,
                 com.ibm.rational.test.lt.kernel.impl.KStaggerPair[] stagger)
Run virtual users.

Starts execution of virtual users added to the engine.

Parameters:
UGName - UserGroup name.
stagger - Array of startup sequences made up of two integers. First integer is the number of users to start. Second integer is a delay value in milliseconds to wait before starting each user.
Returns:
true if the users are all running.

getSchedule

com.ibm.rational.test.lt.kernel.action.impl.Schedule getSchedule()
Executing schedule container.

Return the executing schedule.

Returns:
getSchedule The executing schedule container.

setDeploymentDirectory

void setDeploymentDirectory(String dir)
Deprecated. 

Specify directory for deployed test assets.

Parameters:
dir - The deployed assets directory name.

getDeploymentDirectory

String getDeploymentDirectory()
Deprecated. 

Get deployment directory.

Returns:
String The deployed assets directory name.

addDatapool

void addDatapool(String datapoolName,
                 int datapoolOffset,
                 int datapoolNumberOfRows)
Deprecated. 

Add datapool.

Add a segmented datapool to the engine. Segmented datapools allow one datapool to be shared across multiple engines (drivers). Each engine should be told its starting row number and the number of rows from the datapool it is allowed to consume.

Parameters:
datapoolName - The datapool name.
datapoolOffset - Row offset for this engine.
datapoolNumberOfRows - Number of rows this engine may use from the datapool starting from offset.

getDatapoolMap

Map getDatapoolMap()
Deprecated. 

Engine datapools.

Returns:
Map The map of segmented datapools.

engineStopped

boolean engineStopped()
Deprecated. 

Is the engine stopped?

Returns:
boolean is the engine stopped.

setUserLevels

boolean setUserLevels(String userGroupName,
                      int numLoggingUsers,
                      int numHistoryUsers,
                      int numStatsUsers)
Deprecated. 

Set virtual user levels.

Specify how many users in a UserGroup participate as loggers, history users, statistics reporting users.

Parameters:
userGroupName - The UserGroup name.
numLoggingUsers - The number of logging users.
numHistoryUsers - The number of history users.
numStatsUsers - The number of statistics users.
Returns:
true if the levels set succesfully false if the levels set failed

setUserLevels

boolean setUserLevels(String userGroupName,
                      int numLoggingUsers,
                      int numHistoryUsers,
                      int numStatsUsers,
                      int numARMUsers)
Set virtual user levels.

Specify how many users in a UserGroup participate as loggers, history users, statistics reporting users.

Parameters:
userGroupName - The UserGroup name.
numLoggingUsers - The number of logging users.
numHistoryUsers - The number of history users.
numStatsUsers - The number of history users.
numARMUsers - The number of statistics users.
Returns:
true if the levels set succesfully false if the levels set failed

executeTest

void executeTest(String scriptName,
                 int numUsers)
Execute test.

Parameters:
scriptName - Test name.
numUsers - Number of virtual users.

getEngineShutdownLock

Object getEngineShutdownLock()
Engine shutdown lock.

Returns an object that allows for synchronization on engine shutdown.

Returns:
Object Engine shutdown lock object.

setLogLevel

void setLogLevel(int logLevel)
Set Engine log level.

Specify a logging level for the engine.

Parameters:
logLevel - Log level.

setHistoryLevel

void setHistoryLevel(int testLogLevel)
Set Engine testLog level.

Specify a testLog level for the engine.

Parameters:
testLogLevel - TestLog level.

setHistoryLevel

void setHistoryLevel(int testLogLevel,
                     int filter)
Set Engine testLog level for the given filter.

Specify a testLog level for the given filter for the engine.

Parameters:
testLogLevel - TestLog level.
filter - which filter to set.

setStatisticsLevel

void setStatisticsLevel(int statisticsLevel)
Set Engine statistics level.

Specify a statistics level for the engine.

Parameters:
statisticsLevel - Statistics level.

setWorkBenchUserId

void setWorkBenchUserId(String userId)
Deprecated. 

Workbench user id.

Allow specification of the username of the person running the test.

Parameters:
userId - The user id.

setWorkBenchHostName

void setWorkBenchHostName(String userId)
Deprecated. 

Workbench host name.

Allow specification of the host directing the test.

Parameters:
userId - The host name.

setDriverName

void setDriverName(String name)
Deprecated. 

Set driver name.

Parameters:
name - The driver host name.

getDriverName

String getDriverName()
Deprecated. 

Get driver name.

Returns:
String The driver host name.

getTotalMemory

int getTotalMemory()
Deprecated. 

Get total system memory.

Returns:
int Where supported, the system total memory in megabytes.

getVirtualUsersActive

int getVirtualUsersActive()
Deprecated. 

Number of virtual users running.

Returns:
int Virtual users running.

getStatus

String getStatus()
Engine status.

Returns:
String Current engine status.

setScheduleRunFlag

void setScheduleRunFlag(boolean flag)
Deprecated. 

Set engine schedule execution flag.

Parameters:
flag - true if running schedule. false if running test.

isScheduleRun

boolean isScheduleRun()
Deprecated. 

Engine executing schedule?

Returns:
boolean true if running schedule. false if running test.

createWorker

void createWorker()
Create a new Engine Worker and worker thread.


initializeFinalize

boolean initializeFinalize(String extPt,
                           String feature,
                           String className)
Engine InitializeFinalize runnable for Engine and Worker.


addSyncPoint

void addSyncPoint(String name,
                  int timeout,
                  boolean releaseTogether,
                  int togetherDwell,
                  int staggerMinDwell,
                  int staggerMaxDwell,
                  int expected,
                  boolean autoRelease,
                  IStatTree runStat)
Engine Sync Point Management.


releaseSyncPoint

void releaseSyncPoint(String name,
                      long releaseTime)

setRunner

void setRunner(IRatlRunner runner)
Suitable runner for communication with schedule controller.

Parameters:
runner -

getRunner

IRatlRunner getRunner()

getEngineInfo

IEngineInfo getEngineInfo()
container for various bits of info

Returns:

getStopReason

int getStopReason()

setStopReason

void setStopReason(int r)

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.