Class DslWeightedSwitchController

    • Constructor Detail

      • DslWeightedSwitchController

        public DslWeightedSwitchController()
    • Method Detail

      • child

        public DslWeightedSwitchController child​(long weight,
                                                 DslController child)
        Adds a child to the controller with a configured weight for selecting it in iterations.
        Parameters:
        weight - is the weight to assign to this particular element for execution in iterations. Keep in mind that if you use children(ThreadGroupChild...) to add samplers or controllers, their default assigned weight will be 100.
        child - is the element to add as controller child that will be selected for execution during iterations according to given weight.
        Returns:
        the controller for further configuration and usage.
      • child

        public DslWeightedSwitchController child​(long weight,
                                                 DslSampler child)
        Adds a child to the controller with a configured weight for selecting it in iterations.
        Parameters:
        weight - is the weight to assign to this particular element for execution in iterations. Keep in mind that if you use children(ThreadGroupChild...) to add samplers or controllers, their default assigned weight will be 100.
        child - is the element to add as controller child that will be selected for execution during iterations according to given weight.
        Returns:
        the controller for further configuration and usage.
      • children

        public DslWeightedSwitchController children​(BaseThreadGroup.ThreadGroupChild... children)
        Allows specifying children test elements which don't have an explicit weight associated.

        This is method should mainly be used to add elements which weight does not affect like listeners, timers, assertions, pre- and post-processors and config elements.

        Note: If a sampler or controller is added with this method, it's weight will default to 100.

        Overrides:
        children in class BaseController<DslWeightedSwitchController>
        Parameters:
        children - list of test elements to add as children of this controller.
        Returns:
        the controller for further configuration and usage.
      • buildTreeUnder

        public org.apache.jorphan.collections.HashTree buildTreeUnder​(org.apache.jorphan.collections.HashTree parent,
                                                                      BuildTreeContext context)
        Description copied from interface: DslTestElement
        Builds the JMeter HashTree for this TestElement under the provided tree node.
        Specified by:
        buildTreeUnder in interface DslTestElement
        Overrides:
        buildTreeUnder in class TestElementContainer<DslWeightedSwitchController,​BaseThreadGroup.ThreadGroupChild>
        Parameters:
        parent - the node which will be the parent for the created tree.
        context - context information which contains information shared by elements while building the test plan tree (eg: adding additional items to test plan when a particular protocol element is added).
        Returns:
        The tree created under the parent node.