IBM Rational Performance Tester SDK

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

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

public interface IKLoadTestSchedule
extends IContainer

Define load test schedule behavior.

A load test schedule is a Container that executes load test workloads. Each workload is contained in a UserGroup.


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 addUsers(String userGroupName, int numUsers, int startingGroupNum, int startingGlobalNum)
          Add virtual users.
 String getFriendlyName()
          Schedule friendly name.
 com.ibm.rational.test.lt.kernel.action.impl.UserGroup getUserGroup(String name)
          Get UserGroup.
 int getVirtualUsersActive()
          Get number of virtual users running.
 void manualStop(boolean b)
          Schedule manual stop.
 boolean runUsers(int staggerDelay)
          Start virtual user test execution.
 boolean runUsers(String UGName, com.ibm.rational.test.lt.kernel.impl.KStaggerPair[] stagger)
          Run virtual users.
 boolean setUserLevels(String userGroupName, int numLoggingUsers, int numHistoryUsers, int numStatsUsers, int numARMUsers)
          Set user levels.
 boolean started()
          Report schedule start.
 
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

addUsers

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

Creates virtual users within the Load Test container user groups. Users are only constructed. A call to runUsers() must be made to dispatch users for execution.

Parameters:
userGroupName - UserGroup to add users.
numUsers - Number of virtual users to create.
startingGroupNum - The beginning virtual user number within the user group.
startingGlobalNum - The beginning virtual user global number.
Returns:
trueAll users were added successfully. falseA problem was encountered adding users. Consult the Problem Determination log for details.

setUserLevels

boolean setUserLevels(String userGroupName,
                      int numLoggingUsers,
                      int numHistoryUsers,
                      int numStatsUsers,
                      int numARMUsers)
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:
userGroupName - UserGroup name.
numLoggingUsers - Number of logging users.
numHistoryUsers - Number of users providing execution history.
numStatsUsers - Number of users providing statistics data.
numARMUsers - 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

boolean runUsers(int staggerDelay)
Start virtual user test execution.

Starts execution of virtual users previously added.

Parameters:
staggerDelay - Number of milliseconds to pause in between starting users.
Returns:
true if all users running succesfully. false if there was a problem running users. Consult the Problem Determination log for more details.

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.

getFriendlyName

String getFriendlyName()
Schedule friendly name.

Returns a name for this schedule that is easy to understand. Removes package name and model GUID from name so the schedule name is succinct.

Returns:
String Schedule name.

started

boolean started()
Report schedule start.

A convenience to ensure that all UserGroups within a schedule are ready to add users.

Returns:
boolean indicating if schedule and all children actions started.

getUserGroup

com.ibm.rational.test.lt.kernel.action.impl.UserGroup getUserGroup(String name)
Get UserGroup.

Parameters:
name - UserGroup name.
Returns:
UserGroup

getVirtualUsersActive

int getVirtualUsersActive()
Get number of virtual users running.

Returns:
Number of users running.

manualStop

void manualStop(boolean b)
Schedule manual stop.

By default a schedule will exit when all child actions finish. With manual stop, a call to stop() is required to finish the schedule.

Parameters:
b - true for manual stop, false means container exits when all children finished

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.