Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
Custom distributors

Distributors main page

To add custom distributor you need to do:

  1. Create class which implements Distributor interface or extends one of classes Implementations of distributors
    public class RandomQueryDistributor<Q, E> extends QueryPoolLoadBalancer<Q, E> {

  2. Create bean in XML file in the directory "suite/distributor/" with this class
    <!-- begin: following section is used for docu generation - distributor bean -->
    <beans:bean id="randomQueryDistributor" class="${package}.distributor.RandomQueryDistributor"/>
    <!-- end: following section is used for docu generation - distributor bean -->

  3. Refer this class in your scenario-query-pool with element query-distributor
    <!-- begin: following section is used for docu generation - distributor usage -->
    <!--Description of single test: "Visit Jagger site" with custom distributor-->
    <!--this test description contains parent. We will inherit elements of parent-->
    <!--in this particular example we will inherit information collectors defined in parent-->
    <test-description id="td_jaggerRandomPageTest" parent="td_default">
    <!--we are using base scenario defined before as parent-->
    <scenario xsi:type="scenario-query-pool" parent="pageScenario">
    <!--we are able to override elements from parent-->
    <!--in this case we will override distributor with custome one-->
    <query-distributor xsi:type="query-distributor-ref" ref="randomQueryDistributor"/>
    <endpoint-provider xsi:type="endpoint-provider-list">
    <endpoint>https://jagger.griddynamics.net</endpoint>
    </endpoint-provider>
    <query-provider xsi:type="query-provider-list">
    <query>index.html</query>
    <query>screenshots.html</query>
    <query>download.html</query>
    </query-provider>
    </scenario>
    </test-description>
    <!-- end: following section is used for docu generation - distributor usage -->

Note: