Class AbstractScopedTestElement
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.testelement.AbstractScopedTestElement
- All Implemented Interfaces:
Serializable, Cloneable, Searchable, TestElement
- Direct Known Subclasses:
AbstractScopedAssertion, HtmlExtractor, RegexExtractor, XPathExtractor
Super-class for TestElements that can be applied to main sample, sub-samples or both.
[Assertions use a different class because they use a different value for the getScopeName() constant]
Their corresponding GUI classes need to add the ScopePanel to the GUI using the AbstractXXXGui methods:
- createScopePanel()
- saveScopeSettings()
- showScopeSettings()
- See Also:
-
Field Summary
Fields inherited from interface TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the scope settingprotected List<SampleResult> getSampleList(SampleResult result) Generate a list of qualifying sample results, depending on the scope.protected StringbooleanisScopeAll(String scope) Is the assertion to be applied to the all samples?booleanisScopeChildren(String scope) Is the assertion to be applied to the sub-samples (children)?booleanisScopeParent(String scope) Is the assertion to be applied to the main (parent) sample?protected booleanIs the assertion to be applied to the all samples?booleanisScopeVariable(String scope) Is the assertion to be applied to the all samples?voidvoidvoidvoidsetScopeVariable(String variableName) Methods inherited from class 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
-
Constructor Details
-
AbstractScopedTestElement
public AbstractScopedTestElement()
-
-
Method Details
-
getScopeName
-
fetchScope
-
isScopeParent
Is the assertion to be applied to the main (parent) sample?- Parameters:
scope- name of the scope to be checked- Returns:
trueif the assertion is to be applied to the parent sample.
-
isScopeChildren
Is the assertion to be applied to the sub-samples (children)?- Parameters:
scope- name of the scope to be checked- Returns:
trueif the assertion is to be applied to the children.
-
isScopeAll
Is the assertion to be applied to the all samples?- Parameters:
scope- name of the scope to be checked- Returns:
trueif the assertion is to be applied to the all samples.
-
isScopeVariable
Is the assertion to be applied to the all samples?- Parameters:
scope- name of the scope to be checked- Returns:
trueif the assertion is to be applied to the all samples.
-
isScopeVariable
protected boolean isScopeVariable()Is the assertion to be applied to the all samples?- Returns:
trueif the assertion is to be applied to the all samples.
-
getVariableName
-
setScopeParent
public void setScopeParent() -
setScopeChildren
public void setScopeChildren() -
setScopeAll
public void setScopeAll() -
setScopeVariable
-
getSampleList
Generate a list of qualifying sample results, depending on the scope.- Parameters:
result- current sample- Returns:
- list containing the current sample and/or its child samples
-