Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
Custom providers

General information about providers

To add custom provider you need to do -

  1. Create class which implements interface Iterable<Q>
    public class FileReaderIterable implements Iterable<String> {

  2. Create bean in XML file with some id
    <!-- begin: following section is used for docu generation - provider usage -->
    <beans:bean id="fileEndpointProvider" class="${package}.provider.FileReaderIterable">
    <beans:property name="filePath" value="suite/provider/resources/endpoints.txt"/>
    </beans:bean>
    <!-- end: following section is used for docu generation - provider usage -->

  3. Create component query-provider(or endpoint-provider) with type query-provider-ref and set id of provider to attribute ref.
    <!-- begin: following section is used for docu generation - provider custom -->
    <scenario id="fileProviderScenario" xsi:type="scenario-query-pool" parent="pageScenario">
    <endpoint-provider xsi:type="endpoint-provider-ref" ref="fileEndpointProvider"/>
    <query-provider xsi:type="query-provider-ref" ref="fileQueryProvider"/>
    </scenario>
    <!-- end: following section is used for docu generation - provider custom -->

    Note:
    • full examples of the code are available in maven archetype-examples
    • instead of ${package} write the name of your package