IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.kernel.action
Interface IKUserGroup

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

public interface IKUserGroup
extends IContainer

Define functionality a load test user group should implement.

A load test user group is a Container that defines workload and manages the virtual users that execute the workload.


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
 boolean addUser(int startingGroupNum, int startingGlobalNum)
          Add virtual user.
 IContainer createTesterWorkload(IContainer parent)
          Define workload.
 int getLongRunLimit()
          Get the long run mode test limit
 boolean getLongRunMode()
          Get the long run mode value
 int getVirtualUsersActive()
          Get virtual users active.
 void runUsers()
          Start virtual user test execution.
 boolean runUsers(com.ibm.rational.test.lt.kernel.impl.KStaggerPair[] stagger)
          Run virtual users.
 void setLongRunLimit(int limit)
          Set (enable/disable) the long run mode test limit
 void setLongRunMode(boolean mode)
          Set (enable/disable) the long run mode
 void setStaggerDelay(int s)
          Specify stagger value to be used when launching users.
 boolean setUserLevels(int lumberjacks, int historians, int statisticians, int armers)
          Set user levels.
 
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, 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

addUser

boolean addUser(int startingGroupNum,
                int startingGlobalNum)
Add virtual user.

Creates a virtual user within the UserGroup container. A call to runUsers() must be made to dispatch users added for execution.

Parameters:
startingGroupNum - This user's identifying number with this UserGroup.
startingGlobalNum - This users' unique identifying number within this schedule run.
Returns:
trueUser added successfully. falseA problem was encountered adding this user. Consult the Problem Determination log for details.

setUserLevels

boolean setUserLevels(int lumberjacks,
                      int historians,
                      int statisticians,
                      int armers)
Set user levels.

Sets the number of virtual users that will be report execution history, providing execution statistics, writing problem determination log data, and providing ARM (Application Response Measurement) data.

Parameters:
lumberjacks - Number of logging users.
historians - Number of users providing execution history.
statisticians - Number of users providing statistics data.
armers - Number of users providing ARM data.
Returns:
true if all levels set successfully. false if there was a problem setting levels. Consult the Problem Determination log for more details.

runUsers

void runUsers()
Start virtual user test execution.

Starts execution of virtual users previously added.


runUsers

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

Starts execution of virtual users added to the engine.

Parameters:
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.

createTesterWorkload

IContainer createTesterWorkload(IContainer parent)
Define workload.

Produces the container of actions which make up the workload for a given virtual user in this user group.

Parameters:
parent - The virtual user which owns this workload.
Returns:
Workload container.

setStaggerDelay

void setStaggerDelay(int s)
Specify stagger value to be used when launching users.

The stagger delay is the amount of time in milliseconds that should be paused in between starting execution of virtual users.

Parameters:
s - Number of milliseconds to pause between starting users.

getVirtualUsersActive

int getVirtualUsersActive()
Get virtual users active.

Returns:
Number of users active.

setLongRunMode

void setLongRunMode(boolean mode)
Set (enable/disable) the long run mode

Parameters:
value - the new value

getLongRunMode

boolean getLongRunMode()
Get the long run mode value


setLongRunLimit

void setLongRunLimit(int limit)
Set (enable/disable) the long run mode test limit

Parameters:
value - the new value

getLongRunLimit

int getLongRunLimit()
Get the long run mode test limit


IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.