public interface TestElement extends Cloneable
Modifier and Type | Field and Description |
---|---|
static String |
COMMENTS |
static String |
ENABLED |
static String |
GUI_CLASS |
static String |
NAME |
static String |
TEST_CLASS |
Modifier and Type | Method and Description |
---|---|
void |
addTestElement(TestElement child) |
boolean |
canRemove()
Called by Remove to determine if it is safe to remove the element.
|
void |
clear()
Clear the TestElement of all data.
|
void |
clearTestElementChildren()
This method should clear any test element properties that are merged
by
addTestElement(TestElement) . |
Object |
clone() |
String |
getComment() |
String |
getName()
Get the name of this test element
|
JMeterProperty |
getProperty(String propName)
Given the name of the property, returns the appropriate property from
JMeter.
|
boolean |
getPropertyAsBoolean(String key)
Return a property as a boolean value.
|
boolean |
getPropertyAsBoolean(String key,
boolean defaultValue)
Return a property as a boolean value or a default value if no property
could be found.
|
double |
getPropertyAsDouble(String key)
Return a property as a double value.
|
float |
getPropertyAsFloat(String key)
Return a property as a float value.
|
int |
getPropertyAsInt(String key)
Return a property as an int value.
|
int |
getPropertyAsInt(String key,
int defaultValue)
Return a property as an int value or a default value if no property
could be found.
|
long |
getPropertyAsLong(String key)
Return a property as a long value.
|
long |
getPropertyAsLong(String key,
long defaultValue)
Return a property as a long value or a default value if no property
could be found.
|
String |
getPropertyAsString(String key)
Return a property as a string value.
|
String |
getPropertyAsString(String key,
String defaultValue)
Return a property as an string value or a default value if no property
could be found.
|
JMeterContext |
getThreadContext() |
String |
getThreadName() |
boolean |
isEnabled()
Check if ENABLED property is present and true ; defaults to true
|
boolean |
isRunningVersion()
Returns true or false whether the element is the running version.
|
boolean |
isTemporary(JMeterProperty property)
Test whether a given property is only a temporary resident of the
TestElement
|
PropertyIterator |
propertyIterator()
Get a Property Iterator for the TestElements properties.
|
void |
recoverRunningVersion()
Tells the test element to return to the state it was in when
setRunningVersion(true) was called.
|
default void |
removed()
Called when the test element is removed from the test plan.
|
void |
removeProperty(String key)
Remove property stored under the
key |
void |
setComment(String comment)
Associates a comment with this element
|
void |
setEnabled(boolean enabled)
Set the enabled status of the test element
|
void |
setName(String name) |
void |
setProperty(JMeterProperty property)
Sets and overwrites a property in the TestElement.
|
void |
setProperty(String key,
boolean value) |
void |
setProperty(String key,
boolean value,
boolean dflt) |
void |
setProperty(String key,
int value) |
void |
setProperty(String key,
int value,
int dflt) |
void |
setProperty(String name,
long value) |
void |
setProperty(String name,
long value,
long dflt) |
void |
setProperty(String key,
String value) |
void |
setProperty(String key,
String value,
String dflt) |
void |
setRunningVersion(boolean run)
Make the test element the running version, or make it no longer the
running version.
|
void |
setTemporary(JMeterProperty property)
Indicate that the given property should be only a temporary property in
the TestElement
|
void |
setThreadContext(JMeterContext threadContext) |
void |
setThreadName(String threadName) |
void |
traverse(TestElementTraverser traverser)
Convenient way to traverse a test element.
|
static final String NAME
static final String GUI_CLASS
static final String ENABLED
static final String TEST_CLASS
static final String COMMENTS
void addTestElement(TestElement child)
void clearTestElementChildren()
addTestElement(TestElement)
.void setProperty(String key, boolean value)
void setProperty(String key, boolean value, boolean dflt)
void setProperty(String key, int value)
void setProperty(String key, int value, int dflt)
void setProperty(String name, long value)
void setProperty(String name, long value, long dflt)
boolean isEnabled()
void setEnabled(boolean enabled)
enabled
- the status to setboolean isRunningVersion()
true
if the element is the running versionboolean isTemporary(JMeterProperty property)
property
- the property to be testedtrue
if property is temporaryvoid setTemporary(JMeterProperty property)
property
- voidboolean getPropertyAsBoolean(String key)
key
- the name of the property to getboolean getPropertyAsBoolean(String key, boolean defaultValue)
key
- the name of the property to getdefaultValue
- the default value to usedefaultValue
if no
property could be foundlong getPropertyAsLong(String key)
key
- the name of the property to getlong getPropertyAsLong(String key, long defaultValue)
key
- the name of the property to getdefaultValue
- the default value to usedefaultValue
if no
property could be foundint getPropertyAsInt(String key)
key
- the name of the property to getint getPropertyAsInt(String key, int defaultValue)
key
- the name of the property to getdefaultValue
- the default value to usedefaultValue
if no
property could be foundfloat getPropertyAsFloat(String key)
key
- the name of the property to getdouble getPropertyAsDouble(String key)
key
- the name of the property to getvoid setRunningVersion(boolean run)
run
- flag whether this element should be the running versionvoid recoverRunningVersion()
void clear()
String getPropertyAsString(String key)
key
- the name of the property to getString getPropertyAsString(String key, String defaultValue)
key
- the name of the property to getdefaultValue
- the default value to usedefaultValue
if no
property could be foundvoid setProperty(JMeterProperty property)
property
- the property to be setJMeterProperty getProperty(String propName)
propName
- the name of the property to getJMeterProperty
stored under the name, or
NullProperty
if no property can be foundPropertyIterator propertyIterator()
void removeProperty(String key)
key
key
- name of the property to be removedObject clone()
void traverse(TestElementTraverser traverser)
traverser
- The traverser that is notified of the contained elementsJMeterContext getThreadContext()
void setThreadContext(JMeterContext threadContext)
threadContext
- The threadContext to set.String getThreadName()
void setThreadName(String threadName)
threadName
- The threadName to set.boolean canRemove()
String getName()
void setName(String name)
name
- of this elementString getComment()
void setComment(String comment)
comment
- to be associateddefault void removed()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.