Class DslDebugPostProcessor

  • All Implemented Interfaces:
    DslTestElement, DslTestPlan.TestPlanChild, DslPostProcessor, BaseSampler.SamplerChild, MultiLevelTestElement, BaseThreadGroup.ThreadGroupChild

    public class DslDebugPostProcessor
    extends BaseTestElement
    implements DslPostProcessor
    Adds a sub result to a given sampler result, including jmeter variables, jmeter properties, etc., which are handy when debugging test plans.

    This element is particularly helpful when debugging extractors, since it allows checking generated JMeter variables.

    This element by default will only include JMeter variables in sub sample response body, which differs from JMeter default configuration, since is the most used scenario and avoids unnecessary memory or disk usage.

    In general use IDE debugger in first steps of debugging a test plan using a thread group configuration with only 1 thread. If you need to get more information on a test plan with multiple threads during or after test plan execution, then use this element, in combination with

    resultsTreeVisualizer
    or
    jtlWriter
    saving sub results and response bodies in xml format, avoiding stopping in each thread break point and avoid affecting the performance test metrics.
    Since:
    0.47
    • Field Detail

      • includeSamplerProperties

        protected boolean includeSamplerProperties
      • includeVariables

        protected boolean includeVariables
      • includeJmeterProperties

        protected boolean includeJmeterProperties
      • includeSystemProperties

        protected boolean includeSystemProperties
    • Constructor Detail

      • DslDebugPostProcessor

        public DslDebugPostProcessor()
    • Method Detail

      • jmeterVariables

        public DslDebugPostProcessor jmeterVariables​(boolean include)
        Specifies if JMeter variables should or not be included in sub sample response body.

        This method is useful when you want to disable inclusion of JMeter variables and enable some other info instead (like JMeter properties) and keep memory and disk usage to the minimum. Another scenario might be to dynamically include them or not according to some test plan parameter.

        Parameters:
        include - if true, JMeter variables will be included in sub sample response body, otherwise they won't. By default, jmeter variables are included.
        Returns:
        the debug post processor for further configuration or usage.
      • samplerProperties

        public DslDebugPostProcessor samplerProperties​(boolean include)
        Specifies if parent sampler properties (parameters of the sampler) should or not be included in sub sample response body.

        This method is useful when you want to review some dynamic sampler property.

        Parameters:
        include - if true, sampler properties will be included in sub sample response body, otherwise they won't. By default, sampler properties are not included.
        Returns:
        the post processor for further configuration or usage.
      • jmeterProperties

        public DslDebugPostProcessor jmeterProperties()
        Specifies to include JMeter properties (test plan parameters, or info shared by threads) in sub sample response body.

        This is just a shorter way to enable jmeterProperties(boolean).

        Returns:
        the post processor for further configuration or usage.
        Since:
        1.0
        See Also:
        jmeterProperties(boolean)
      • jmeterProperties

        public DslDebugPostProcessor jmeterProperties​(boolean include)
        Specifies if JMeter properties (test plan parameters, or info shared by threads) should or not be included in sub sample response body.

        This method is useful when you want to review some test plan parameter provided through JMeter property, or when you want to review some property shared and modified by test plan threads.

        Parameters:
        include - if true, JMeter properties will be included in sub sample response body, otherwise they won't. By default, JMeter properties are not included.
        Returns:
        the post processor for further configuration or usage.
      • systemProperties

        public DslDebugPostProcessor systemProperties​(boolean include)
        Specifies if system properties (JVM parameters and properties) should or not be included in sub sample response body.

        This method is useful when you want to review some JVM parameter or property while executing the test plan. In general, since system properties are not usually modified on runtime, it is recommended to only enable this in a sampler that only runs once in a test plan (not inside thread groups with multiple iterations), to avoid unnecessary memory or disk usage

        Parameters:
        include - if true, system properties will be included in sub sample response body, otherwise they won't. By default, system properties are not included.
        Returns:
        the post processor for further configuration or usage.