Class DslScopedTestElement<T extends DslScopedTestElement<T>>

  • Type Parameters:
    T - is the type of the test element that extends this class (to properly inherit fluent API methods).
    All Implemented Interfaces:
    DslTestElement
    Direct Known Subclasses:
    DslResponseAssertion, DslVariableExtractor

    public abstract class DslScopedTestElement<T extends DslScopedTestElement<T>>
    extends BaseTestElement
    Contains common logic for test elements that only process certain samples.
    Since:
    0.11
    • Constructor Detail

      • DslScopedTestElement

        protected DslScopedTestElement​(String name,
                                       Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> guiClass)
    • Method Detail

      • scope

        public T scope​(DslScopedTestElement.Scope scope)
        Allows specifying if the element should be applied to main sample and/or sub samples.

        When not specified the element will only apply to main sample.

        Parameters:
        scope - specifying to what sample result apply the element to.
        Returns:
        the DSL element for further configuration or usage.
        See Also:
        DslScopedTestElement.Scope
      • scopeVariable

        public T scopeVariable​(String scopeVariable)
        Allows specifying that the element should be applied to the contents of a given JMeter variable.

        This setting overrides any setting on scope and fieldToCheck.

        Parameters:
        scopeVariable - specifies the name of the variable to apply the element to.
        Returns:
        the DSL element for further configuration or usage.
      • setScopeTo

        protected void setScopeTo​(org.apache.jmeter.testelement.AbstractScopedTestElement testElement)