Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
Custom collectors

Collectors main page

There are three ways to collect some information from responses. One can create custom metric calculator,
validator or collector. Metric calculator and validator are simplified versions of collectors.
See comparison below. Order of execution is under link on the top of the page

Param Metric calculator Validator Collector
- What information is coming from invoker Response from SUT Endpoint Endpoint
Query Query
Response from SUT Response from SUT
Invoke duration
Was invoke fail or pass
- When is executed Invoke was successful Invoke was successful Always
All validators - successful Previous validators pass
- What custom code is required Metric class Validator class Collector class
Aggregator class [optional] Collector provider class
Aggregator class [optional]
- Can save custom metric to DB Yes No Yes
- Can set invoke result to fails No Yes No


Custom validator Custom metric calculator Custom collector
  1. Create class which implements ResponseValidator<Q,E,R>
    Will validate responce from SUT after every successful invocation


  2. If your validator doesn't have any properties, create validator-custom collector in info-collectors block in test-description.
    Set the name of validator class to attribute validator.


  1. Create class which implements MetricCalculator<R>
    Will calculate some parameters according to SUT response


  2. Create bean of this class in some configuration file. Put some id for it.


  3. Add metric-custom collector to info-collectors block.
    Set id of custom metric class bean to calculator attribute
    Attribute id will be used as metric name in reports
    Set attribute plotData to true if you want to plot 'metric vs time' plot in report


  4. Optional. Add custom aggregator to metric.
    How to create aggregator provider - see 'Custom collector' example
    <beans:bean id="minAggregator" class="test.MinAggregatorProvider"/>
    ...
    <metric id="customMetric1" xsi:type="metric-custom" calculator="customMetric" plotData="true">
    <metric-aggregator xsi:type="metric-aggregator-ref" ref="minAggregator"/>
    </metric>
  1. Create collector class which implements MetricCollector<Q,R,E>
    Will proceed data after every invoke and save to Kernel storage


  2. Create collector provider class which implements MetricCollectorProvider<Q,R,E>
    Will provide an instance of custom collector to Jagger


  3. Create aggregator class which implements MetricAggregatorProvider
    Will proceed data after all tests are over and prepare data for DB
    Collector provider class is associating aggregator with collector.


  4. Create bean of provider class in some configuration file. Put some id for it.


  5. Add metric-ref collector to info-collectors block.
    Set id of bean to ref attribute.
Note: