Package org.apache.jmeter.testelement
Class AbstractTestElement
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
- All Implemented Interfaces:
Serializable
,Cloneable
,Searchable
,org.apache.jmeter.testelement.TestElement
- Direct Known Subclasses:
AbstractBoltTestElement
,AbstractJDBCTestElement
,AbstractListenerElement
,AbstractSampler
,AbstractScopedTestElement
,AbstractThreadGroup
,AnchorModifier
,Argument
,Authorization
,BackendListener
,BeanShellTestElement
,BoltConnectionElement
,CompareAssertion
,ConfigTestElement
,ConstantThroughputTimer
,ConstantTimer
,Cookie
,CounterConfig
,DataSourceElement
,DebugPostProcessor
,GenericController
,Header
,HTMLAssertion
,HTTPFileArg
,HttpMirrorControl
,JMESPathAssertion
,JMSProperties
,JMSProperty
,JSONPathAssertion
,LDAPArgument
,MailerModel
,MD5HexAssertion
,OnErrorTestElement
,PreciseThroughputTimer
,RegExUserParameters
,RemoteListenerWrapper
,RemoteSampleListenerWrapper
,RemoteTestListenerWrapper
,RemoteThreadsListenerWrapper
,ResultSaver
,SampleTimeout
,ScriptingTestElement
,SMIMEAssertionTestElement
,StaticHost
,SubstitutionElement
,Summariser
,SyncTimer
,TestPlan
,URLRewritingModifier
,UserParameters
,WorkBench
,XMLAssertion
,XMLSchemaAssertion
public abstract class AbstractTestElement
extends Object
implements org.apache.jmeter.testelement.TestElement, Serializable, Searchable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement
org.apache.jmeter.testelement.TestElement.Companion
-
Field Summary
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
addPropertiesValues
(List<? super String> result, Set<String> propertyNames) Add to result the values of propertyNamesprotected void
addProperty
(JMeterProperty property) Add property to test element without cloning itprotected void
addProperty
(JMeterProperty property, boolean clone) Add property to test elementvoid
addTestElement
(org.apache.jmeter.testelement.TestElement el) boolean
void
clear()
protected void
clearTemporary
(JMeterProperty property) Remove property from temporaryPropertiesvoid
clone()
protected void
Clears temporaryPropertiesboolean
getName()
getProperty
(String key) Get the named property.boolean
boolean
getPropertyAsBoolean
(String key, boolean defaultVal) double
float
getPropertyAsFloat
(String key) int
getPropertyAsInt
(String key) int
getPropertyAsInt
(String key, int defaultValue) long
getPropertyAsLong
(String key) long
getPropertyAsLong
(String key, long defaultValue) getPropertyAsString
(String key, String defaultValue) getPropertyOrNull
(String key) Get a list of all tokens that should be visible to searchingint
hashCode()
boolean
boolean
Returns the runningVersion.boolean
isTemporary
(JMeterProperty property) protected void
Log the properties of the test elementprotected void
mergeIn
(org.apache.jmeter.testelement.TestElement element) Add to this the properties of element (by reference)void
void
removeProperty
(String key) void
setComment
(String comment) void
setEnabled
(boolean enabled) void
void
setProperty
(String name, boolean value) void
setProperty
(String name, boolean value, boolean dflt) Create a boolean property - but only if it is not the default.void
setProperty
(String name, int value) void
setProperty
(String name, int value, int dflt) Create an int property - but only if it is not the default.void
setProperty
(String name, long value) void
setProperty
(String name, long value, long dflt) Create a long property - but only if it is not the default.void
setProperty
(String name, String value) void
setProperty
(String name, String value, String dflt) Create a String property - but only if it is not the default.void
setProperty
(JMeterProperty property) void
setRunningVersion
(boolean runningVersion) Sets the runningVersion.void
setTemporary
(JMeterProperty property) void
setThreadContext
(JMeterContext inthreadContext) void
setThreadName
(String inthreadName) void
traverse
(TestElementTraverser traverser) protected void
traverseCollection
(CollectionProperty col, TestElementTraverser traverser) protected void
traverseMap
(MapProperty map, TestElementTraverser traverser) protected void
traverseProperty
(TestElementTraverser traverser, JMeterProperty value) Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getProps, getSchema, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set
-
Constructor Details
-
AbstractTestElement
protected AbstractTestElement()
-
-
Method Details
-
clone
-
clear
public void clear()- Specified by:
clear
in interfaceorg.apache.jmeter.testelement.TestElement
-
clearTestElementChildren
public void clearTestElementChildren()Default implementation - does nothing
- Specified by:
clearTestElementChildren
in interfaceorg.apache.jmeter.testelement.TestElement
-
removeProperty
- Specified by:
removeProperty
in interfaceorg.apache.jmeter.testelement.TestElement
-
equals
-
hashCode
public int hashCode() -
addTestElement
public void addTestElement(org.apache.jmeter.testelement.TestElement el) - Specified by:
addTestElement
in interfaceorg.apache.jmeter.testelement.TestElement
-
setName
- Specified by:
setName
in interfaceorg.apache.jmeter.testelement.TestElement
-
getName
- Specified by:
getName
in interfaceorg.apache.jmeter.testelement.TestElement
-
setComment
- Specified by:
setComment
in interfaceorg.apache.jmeter.testelement.TestElement
-
getComment
- Specified by:
getComment
in interfaceorg.apache.jmeter.testelement.TestElement
-
getProperty
Get the named property. If it doesn't exist, a new NullProperty object is created with the same name and returned.- Specified by:
getProperty
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyOrNull
- Specified by:
getPropertyOrNull
in interfaceorg.apache.jmeter.testelement.TestElement
- Since:
- 5.6
-
traverse
- Specified by:
traverse
in interfaceorg.apache.jmeter.testelement.TestElement
-
traverseProperty
-
traverseMap
-
traverseCollection
-
getPropertyAsInt
- Specified by:
getPropertyAsInt
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsInt
- Specified by:
getPropertyAsInt
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsBoolean
- Specified by:
getPropertyAsBoolean
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsBoolean
- Specified by:
getPropertyAsBoolean
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsFloat
- Specified by:
getPropertyAsFloat
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsLong
- Specified by:
getPropertyAsLong
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsLong
- Specified by:
getPropertyAsLong
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsDouble
- Specified by:
getPropertyAsDouble
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsString
- Specified by:
getPropertyAsString
in interfaceorg.apache.jmeter.testelement.TestElement
-
getPropertyAsString
- Specified by:
getPropertyAsString
in interfaceorg.apache.jmeter.testelement.TestElement
-
addProperty
Add property to test element- Parameters:
property
-JMeterProperty
to add to current Test Elementclone
- clone property
-
addProperty
Add property to test element without cloning it- Parameters:
property
-JMeterProperty
-
clearTemporary
Remove property from temporaryProperties- Parameters:
property
-JMeterProperty
-
logProperties
protected void logProperties()Log the properties of the test element- See Also:
-
TestElement.setProperty(JMeterProperty)
-
setProperty
- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
-
setProperty
- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
-
setProperty
Create a String property - but only if it is not the default. This is intended for use when adding new properties to JMeter so that JMX files are not expanded unnecessarily. N.B. - must agree with the default applied when reading the property.- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
- Parameters:
name
- property namevalue
- current valuedflt
- default
-
setProperty
- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
-
setProperty
Create a boolean property - but only if it is not the default. This is intended for use when adding new properties to JMeter so that JMX files are not expanded unnecessarily. N.B. - must agree with the default applied when reading the property.- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
- Parameters:
name
- property namevalue
- current valuedflt
- default
-
setProperty
- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
-
setProperty
Create an int property - but only if it is not the default. This is intended for use when adding new properties to JMeter so that JMX files are not expanded unnecessarily. N.B. - must agree with the default applied when reading the property.- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
- Parameters:
name
- property namevalue
- current valuedflt
- default
-
setProperty
- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
-
setProperty
Create a long property - but only if it is not the default. This is intended for use when adding new properties to JMeter so that JMX files are not expanded unnecessarily. N.B. - must agree with the default applied when reading the property.- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
- Parameters:
name
- property namevalue
- current valuedflt
- default
-
propertyIterator
- Specified by:
propertyIterator
in interfaceorg.apache.jmeter.testelement.TestElement
-
mergeIn
protected void mergeIn(org.apache.jmeter.testelement.TestElement element) Add to this the properties of element (by reference)- Parameters:
element
-TestElement
-
isRunningVersion
public boolean isRunningVersion()Returns the runningVersion.- Specified by:
isRunningVersion
in interfaceorg.apache.jmeter.testelement.TestElement
-
setRunningVersion
public void setRunningVersion(boolean runningVersion) Sets the runningVersion.- Specified by:
setRunningVersion
in interfaceorg.apache.jmeter.testelement.TestElement
- Parameters:
runningVersion
- the runningVersion to set
-
recoverRunningVersion
public void recoverRunningVersion()- Specified by:
recoverRunningVersion
in interfaceorg.apache.jmeter.testelement.TestElement
-
emptyTemporary
protected void emptyTemporary()Clears temporaryProperties -
isTemporary
- Specified by:
isTemporary
in interfaceorg.apache.jmeter.testelement.TestElement
-
setTemporary
- Specified by:
setTemporary
in interfaceorg.apache.jmeter.testelement.TestElement
-
getThreadContext
- Specified by:
getThreadContext
in interfaceorg.apache.jmeter.testelement.TestElement
- Returns:
- Returns the threadContext.
-
setThreadContext
- Specified by:
setThreadContext
in interfaceorg.apache.jmeter.testelement.TestElement
- Parameters:
inthreadContext
- The threadContext to set.
-
getThreadName
- Specified by:
getThreadName
in interfaceorg.apache.jmeter.testelement.TestElement
- Returns:
- Returns the threadName.
-
setThreadName
- Specified by:
setThreadName
in interfaceorg.apache.jmeter.testelement.TestElement
- Parameters:
inthreadName
- The threadName to set.
-
canRemove
public boolean canRemove()- Specified by:
canRemove
in interfaceorg.apache.jmeter.testelement.TestElement
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceorg.apache.jmeter.testelement.TestElement
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfaceorg.apache.jmeter.testelement.TestElement
-
getSearchableTokens
Get a list of all tokens that should be visible to searching}- Specified by:
getSearchableTokens
in interfaceSearchable
- Returns:
- List of searchable tokens
-
addPropertiesValues
Add to result the values of propertyNames- Parameters:
result
- List of values of propertyNamespropertyNames
- Set of names of properties to extract
-