org.apache.jmeter.extractor.json.jmespath

## Class JMESPathExtractor

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.testelement.AbstractScopedTestElement
    - - org.apache.jmeter.extractor.json.jmespath.JMESPathExtractor

- All Implemented Interfaces:
    Serializable, Cloneable, Searchable, PostProcessor, TestElement, TestStateListener

      public class JMESPathExtractor
      extends AbstractScopedTestElement
      implements Serializable, PostProcessor, TestStateListener

  JMESPATH based extractor
  Since:
    5.2
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface org.apache.jmeter.testelement.TestElement

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JMESPathExtractor()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDefaultValue()`
    `String` | `getJmesPathExpression()`
    `String` | `getMatchNumber()`
    `String` | `getRefName()`
    `void` | `process()` Provides the PostProcessor with a SampleResult object from which to extract values for use in future Queries.
    `void` | `setDefaultValue(String defaultValue)`
    `void` | `setJmesPathExpression(String jsonPath)`
    `void` | `setMatchNumber(String matchNumber)`
    `void` | `setRefName(String refName)`
    `List<String>` | `splitJson(com.fasterxml.jackson.databind.JsonNode jsonNode)`
    `void` | `testEnded()` Called once for all threads after the end of a test.
    `void` | `testEnded(String host)` Called once for all threads after the end of a test.
    `void` | `testStarted()` Called just before the start of the test from the main engine thread.
    `void` | `testStarted(String host)` Called just before the start of the test from the main engine thread.

    - ### Methods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElement

      `fetchScope, getSampleList, getScopeName, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariable`

    - ### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

      `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.jmeter.testelement.TestElement

      `removed`

- - ### Constructor Detail

    - #### JMESPathExtractor

          public JMESPathExtractor()

  - ### Method Detail

    - #### process

          public void process()

      Description copied from interface: `PostProcessor`
      Provides the PostProcessor with a SampleResult object from which to extract values for use in future Queries.
      Specified by:
        `process` in interface `PostProcessor`

    - #### splitJson

          public List<String> splitJson(com.fasterxml.jackson.databind.JsonNode jsonNode)
                                 throws IOException

      Throws:
        `IOException`

    - #### getJmesPathExpression

          public String getJmesPathExpression()

    - #### setJmesPathExpression

          public void setJmesPathExpression(String jsonPath)

    - #### getRefName

          public String getRefName()

    - #### setRefName

          public void setRefName(String refName)

    - #### getDefaultValue

          public String getDefaultValue()

    - #### setDefaultValue

          public void setDefaultValue(String defaultValue)

    - #### setMatchNumber

          public void setMatchNumber(String matchNumber)

    - #### getMatchNumber

          public String getMatchNumber()

    - #### testStarted

          public void testStarted()

      Description copied from interface: `TestStateListener`

      Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testStarted` in interface `TestStateListener`
      See Also:
        `StandardJMeterEngine.run()`

    - #### testStarted

          public void testStarted(String host)

      Description copied from interface: `TestStateListener`

      Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testStarted` in interface `TestStateListener`
      Parameters:
        `host` - name of host
      See Also:
        `StandardJMeterEngine.run()`

    - #### testEnded

          public void testEnded()

      Description copied from interface: `TestStateListener`

      Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testEnded` in interface `TestStateListener`
      See Also:
        `StandardJMeterEngine.stopTest()`

    - #### testEnded

          public void testEnded(String host)

      Description copied from interface: `TestStateListener`

      Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testEnded` in interface `TestStateListener`
      Parameters:
        `host` - name of host
      See Also:
        `StandardJMeterEngine.stopTest()`

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.