org.jminor.framework.tools.testing
Class EntityLoadTestModel

java.lang.Object
  extended by org.jminor.common.model.LoadTestModel<EntityApplicationModel>
      extended by org.jminor.framework.tools.testing.EntityLoadTestModel
All Implemented Interfaces:
LoadTest

public abstract class EntityLoadTestModel
extends LoadTestModel<EntityApplicationModel>

A class for running multiple EntityApplicationModel instances for load testing purposes.


Nested Class Summary
static class EntityLoadTestModel.AbstractEntityUsageScenario
           
 
Nested classes/interfaces inherited from class org.jminor.common.model.LoadTestModel
LoadTestModel.AbstractUsageScenario<T>
 
Nested classes/interfaces inherited from interface org.jminor.common.model.LoadTest
LoadTest.ScenarioException, LoadTest.UsageScenario<T>
 
Field Summary
 
Fields inherited from class org.jminor.common.model.LoadTestModel
DEFAULT_CHART_DATA_UPDATE_INTERVAL_MS, DEFAULT_WARNING_TIME_MS, LOG, RANDOM
 
Constructor Summary
EntityLoadTestModel(User user, LoadTest.UsageScenario<EntityApplicationModel>... usageScenarios)
          Instantiates a new EntityLoadTestModel.
 
Method Summary
protected  void disconnectApplication(EntityApplicationModel application)
          
static LoadTest getRemoteLoadTest(String serverHost, String loadTestClassName, User user)
           
protected abstract  EntityApplicationModel initializeApplication()
          
static void selectRandomRow(EntityTableModel tableModel)
          Selects a random row in the given table model
static void selectRandomRows(EntityTableModel tableModel, double ratio)
          Selects random rows in the given table model
static void selectRandomRows(EntityTableModel tableModel, int count)
          Selects random rows in the given table model
 
Methods inherited from class org.jminor.common.model.LoadTestModel
addApplicationBatch, addExitListener, applicationBatchSizeObserver, applicationCountObserver, collectChartDataObserver, exit, getApplicationBatchSize, getApplicationCount, getLoginDelayFactor, getMaximumThinkTime, getMemoryUsageDataset, getMinimumThinkTime, getMinimumThinkTimeObserver, getNumberOfApplicationsDataset, getPauseObserver, getScenarioChooser, getScenarioDurationDataset, getThinkTime, getThinkTimeDataset, getUpdateInterval, getUsageScenario, getUsageScenarioDataset, getUsageScenarioFailureDataset, getUsageScenarios, getUser, getWarningTime, getWarningTimeObserver, isCollectChartData, isPaused, isScenarioEnabled, maximumThinkTimeObserver, removeApplicationBatch, resetChartData, runScenario, setApplicationBatchSize, setCollectChartData, setLoginDelayFactor, setMaximumThinkTime, setMinimumThinkTime, setPaused, setScenarioEnabled, setUpdateInterval, setUser, setWarningTime, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityLoadTestModel

public EntityLoadTestModel(User user,
                           LoadTest.UsageScenario<EntityApplicationModel>... usageScenarios)
Instantiates a new EntityLoadTestModel.

Parameters:
user - the default user
usageScenarios - the usage scenarios
Method Detail

selectRandomRow

public static void selectRandomRow(EntityTableModel tableModel)
Selects a random row in the given table model

Parameters:
tableModel - the table model

selectRandomRows

public static void selectRandomRows(EntityTableModel tableModel,
                                    int count)
Selects random rows in the given table model

Parameters:
tableModel - the table model
count - the number of rows to select

selectRandomRows

public static void selectRandomRows(EntityTableModel tableModel,
                                    double ratio)
Selects random rows in the given table model

Parameters:
tableModel - the table model
ratio - the ratio of available rows to select

disconnectApplication

protected final void disconnectApplication(EntityApplicationModel application)

Specified by:
disconnectApplication in class LoadTestModel<EntityApplicationModel>
Parameters:
application - the application to disconnect

initializeApplication

protected abstract EntityApplicationModel initializeApplication()
                                                         throws CancelException

Specified by:
initializeApplication in class LoadTestModel<EntityApplicationModel>
Returns:
an initialized application.
Throws:
CancelException - in case the initialization was cancelled

getRemoteLoadTest

public static LoadTest getRemoteLoadTest(String serverHost,
                                         String loadTestClassName,
                                         User user)
                                  throws RemoteException,
                                         NotBoundException,
                                         ServerException.ServerFullException,
                                         ServerException.LoginException
Throws:
RemoteException
NotBoundException
ServerException.ServerFullException
ServerException.LoginException