T
- the type used to run this scenariopublic abstract static class LoadTestModel.AbstractUsageScenario<T> extends java.lang.Object implements LoadTest.UsageScenario<T>
Constructor and Description |
---|
AbstractUsageScenario()
Instantiates a new UsageScenario using the simple class name as scenario name
|
AbstractUsageScenario(java.lang.String name)
Instantiates a new UsageScenario with the given name
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup(java.lang.Object application)
Called after this scenario has been run, override to cleanup the application after each run
|
void |
clearExceptions()
Clears the exceptions that have been collected so far
|
boolean |
equals(java.lang.Object obj) |
int |
getDefaultWeight() |
java.util.List<LoadTest.ScenarioException> |
getExceptions() |
java.lang.String |
getName() |
int |
getSuccessfulRunCount() |
int |
getTotalRunCount() |
int |
getUnsuccessfulRunCount() |
int |
hashCode() |
protected abstract void |
performScenario(T application)
Runs a set of actions on the given application.
|
protected void |
prepare(java.lang.Object application)
Called before this scenario is run, override to prepare the application for each run
|
void |
resetRunCount()
Resets the run counters
|
void |
run(T application)
Runs this scenario with the given application
|
java.lang.String |
toString() |
public AbstractUsageScenario()
public AbstractUsageScenario(java.lang.String name)
name
- the scenario namepublic final java.lang.String getName()
getName
in interface LoadTest.UsageScenario<T>
public final int getSuccessfulRunCount()
getSuccessfulRunCount
in interface LoadTest.UsageScenario<T>
public final int getUnsuccessfulRunCount()
getUnsuccessfulRunCount
in interface LoadTest.UsageScenario<T>
public final int getTotalRunCount()
getTotalRunCount
in interface LoadTest.UsageScenario<T>
public final java.util.List<LoadTest.ScenarioException> getExceptions()
getExceptions
in interface LoadTest.UsageScenario<T>
public final void resetRunCount()
resetRunCount
in interface LoadTest.UsageScenario<T>
public final void clearExceptions()
clearExceptions
in interface LoadTest.UsageScenario<T>
public final java.lang.String toString()
toString
in class java.lang.Object
public final void run(T application)
run
in interface LoadTest.UsageScenario<T>
application
- the application to usepublic final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int getDefaultWeight()
getDefaultWeight
in interface LoadTest.UsageScenario<T>
protected abstract void performScenario(T application) throws LoadTest.ScenarioException
application
- the applicationScenarioException
- in case of an exceptionLoadTest.ScenarioException
protected void prepare(java.lang.Object application)
application
- the applicationprotected void cleanup(java.lang.Object application)
application
- the application