Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
com.griddynamics.jagger.user.test.configurations.JTestDefinition Class Reference

Definition of the load test - describes test data sources and the protocol, used during load test
. More...

Classes

class  Builder
 

Public Member Functions

String getComment ()
 
String getDescription ()
 
Iterable getEndpoints ()
 
String getId ()
 
Class<?extends Invoker > getInvoker ()
 
Iterable getQueries ()
 
List< Class<?extends
ResponseValidator > > 
getValidators ()
 

Static Public Member Functions

static Builder builder (Id id, Iterable endpointsProvider)
 Builder of the JTestDefinition
. More...
 

Detailed Description

Definition of the load test - describes test data sources and the protocol, used during load test
.

Details:

Test definition is the base component of the load test description. With the help of the internal Builder class it allows to setup:

  • source of the endpointsProvider (where to apply load)
  • source of queries (what parameters of the load to set)
  • what protocol to use for the communication with the system under test (SUT)

More information on the parameter of the test definition, you can find in the Builder documentation

Code example:

// begin: following section is used for docu generation - Load test scenario configuration
public class ExampleSimpleJLoadScenarioProvider {
public static JLoadScenario getExampleJaggerLoadScenario() {
JTestDefinition jTestDefinition = JTestDefinition.builder(Id.of("td_example"), new ExampleEndpointsProvider()).build();
JLoadProfile jLoadProfileRps = JLoadProfileRps.builder(RequestsPerSecond.of(10)).withMaxLoadThreads(10).withWarmUpTimeInSeconds(10).build();
JTerminationCriteria jTerminationCriteria = JTerminationCriteriaIterations.of(IterationsNumber.of(500), MaxDurationInSeconds.of(30));
JLoadTest jLoadTest = JLoadTest.builder(Id.of("lt_example"), jTestDefinition, jLoadProfileRps, jTerminationCriteria).build();
JParallelTestsGroup jParallelTestsGroup = JParallelTestsGroup.builder(Id.of("ptg_example"), jLoadTest).build();
// To launch your load scenario, set 'jagger.load.scenario.id.to.execute' property's value equal to the load scenario id
// You can do it via system properties or in the 'environment.properties' file
return JLoadScenario.builder(Id.of("ls_example"), jParallelTestsGroup).build();
}
}
// end: following section is used for docu generation - Load test scenario configuration

Definition at line 26 of file JTestDefinition.java.


The documentation for this class was generated from the following file: