Provide SUT invocations (send requests to the SUT, work with the responses)

Stop all the tests

Stop the first test group

Start the second tests group

...

Stop the second test group

Stop the scenario

Jagger allows to execute custom code on the every step from the list above. This code can prepare test data, reconfigure the SUT, store additional custom metrics, provide additional logging, etc
The feature is available via listeners classes. User can implement his own listener (load scenario listener, test group listener, etc) and attach it to the particular element of the load scenario.

Listener example

Create custom test group listener

In this simple example test group listener will just provide additional logging during test group start and stop

/* begin: following section is used for docu generation - example of the test group listener */

/* end: following section is used for docu generation - example of the test group listener */

Attach test group listener to the parallel test group in your load scenario

Another example. Invocation listeners

You can attach as many listeners as necessary to particular step in the test flow. They will be executed in the same order like they are added
Below is an example of the test definition with two invocation listeners

Listeners

You can implement following listeners:

LoadScenarioListener - Load scenario listener. Is triggered on start and stop of the load scenario TestGroupListener - Parallel test group listener. Is triggered on start and stop of the test group TestListener - Load test listener. Is triggered on start, stop and during load test execution InvocationListener - Invocation listener. Is triggered on invocation start, success, error and failure

Framework is providing additional information in the listeners:

LoadScenarioInfo - Load scenario listener. Is triggered on start and stop of the load scenario TestGroupInfo - Parallel test group listener. Is triggered on start and stop of the test group TestInfo - Load test listener. Is triggered on start, stop and during load test execution InvocationInfo - Invocation listener. Is triggered on invocation start, success, error and failure

Services

In all listeners framework is providing access to the Jagger internals via services. Main goal of the services - simplify development of the custom code. With the help of services you can store custom metrics, access test results, store additional information about your test in the Jagger test results database

All custom listeners have access to Jagger services. List of available services can be different for different types of listeners.
Please see table below to find what services can be used in different listeners.

/* begin: following section is used for docu generation - listeners to services relation */