Class JMESPathAssertion
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.assertions.Assertion
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.testelement.TestElement
,org.apache.jmeter.testelement.TestStateListener
public class JMESPathAssertion extends AbstractTestElement implements Serializable, Assertion, TestStateListener
This is main class for JSON JMESPath Assertion which verifies assertion on previous sample result using JMESPath expression JMESPath-java sources and doc.
- Since:
5.2
-
-
Field Summary
Fields Modifier and Type Field Description public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Constructor Summary
Constructors Constructor Description JMESPathAssertion()
-
Method Summary
Modifier and Type Method Description AssertionResult
getResult(SampleResult samplerResult)
static String
objectToString(ObjectMapper mapper, JsonNode element)
void
testStarted()
void
testStarted(String host)
void
testEnded()
void
testEnded(String host)
String
getJmesPath()
void
setJmesPath(String jmesPath)
String
getExpectedValue()
void
setExpectedValue(String expectedValue)
void
setJsonValidationBool(boolean jsonValidation)
void
setExpectNull(boolean val)
boolean
isExpectNull()
boolean
isJsonValidationBool()
void
setInvert(boolean invert)
boolean
isInvert()
void
setIsRegex(boolean flag)
boolean
isUseRegex()
-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getResult
AssertionResult getResult(SampleResult samplerResult)
-
objectToString
static String objectToString(ObjectMapper mapper, JsonNode element)
-
testStarted
void testStarted()
-
testStarted
void testStarted(String host)
-
testEnded
void testEnded()
-
getJmesPath
String getJmesPath()
-
setJmesPath
void setJmesPath(String jmesPath)
-
getExpectedValue
String getExpectedValue()
-
setExpectedValue
void setExpectedValue(String expectedValue)
-
setJsonValidationBool
void setJsonValidationBool(boolean jsonValidation)
-
setExpectNull
void setExpectNull(boolean val)
-
isExpectNull
boolean isExpectNull()
-
isJsonValidationBool
boolean isJsonValidationBool()
-
setInvert
void setInvert(boolean invert)
-
isInvert
boolean isInvert()
-
setIsRegex
void setIsRegex(boolean flag)
-
isUseRegex
boolean isUseRegex()
-
-
-
-