org.jminor.common.model
Interface LoadTest.UsageScenario<T>

All Superinterfaces:
Serializable
All Known Implementing Classes:
EntityLoadTestModel.AbstractEntityUsageScenario, LoadTestModel.AbstractUsageScenario, QueryLoadTestModel.QueryScenario
Enclosing interface:
LoadTest

public static interface LoadTest.UsageScenario<T>
extends Serializable

Specifies a load test usage scenario.


Method Summary
 void clearExceptions()
          Clears the exceptions that have been collected so far
 int getDefaultWeight()
           
 List<LoadTest.ScenarioException> getExceptions()
           
 String getName()
           
 int getSuccessfulRunCount()
           
 int getTotalRunCount()
           
 int getUnsuccessfulRunCount()
           
 void resetRunCount()
          Resets the run counters
 void run(T application)
          Runs this scenario with the given application
 

Method Detail

getName

String getName()
Returns:
the name of this scenario

getDefaultWeight

int getDefaultWeight()
Returns:
the default weight for this scenario, 1 by default

run

void run(T application)
         throws LoadTest.ScenarioException
Runs this scenario with the given application

Parameters:
application - the application to use
Throws:
LoadTest.ScenarioException - in case of an exception

getTotalRunCount

int getTotalRunCount()
Returns:
the total number of times this scenario has been run

getExceptions

List<LoadTest.ScenarioException> getExceptions()
Returns:
any exceptions that have occurred during a run

resetRunCount

void resetRunCount()
Resets the run counters


clearExceptions

void clearExceptions()
Clears the exceptions that have been collected so far


getSuccessfulRunCount

int getSuccessfulRunCount()
Returns:
the number of times this scenario has been successfully run

getUnsuccessfulRunCount

int getUnsuccessfulRunCount()
Returns:
the number of times this scenario has been unsuccessfully run