Apache JMeter
1.9

org.apache.jmeter.testelement
Interface TestElement

All Superinterfaces:
Cloneable
All Known Subinterfaces:
Controller, Sampler
All Known Implementing Classes:
AbstractSampler, AbstractTestElement, GenericController, ThreadGroup

public interface TestElement
extends Cloneable

Version:
$Revision: 1.8 $
Author:
Michael Stover

Field Summary
static String ENABLED
           
static String GUI_CLASS
           
static String NAME
           
static String TEST_CLASS
           
 
Method Summary
 void addTestElement(TestElement child)
           
 void clear()
          Clear the TestElement of all data.
 Object clone()
           
 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.
 float getPropertyAsFloat(String key)
           
 int getPropertyAsInt(String key)
           
 long getPropertyAsLong(String key)
           
 String getPropertyAsString(String key)
           
 boolean isRunningVersion()
          Returns true or false whether the element is the running version.
 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 makeRunningVersion() was called.
 void removeProperty(String key)
           
 void setProperty(JMeterProperty property)
          Sets and overwrites a property in the TestElement.
 void setProperty(String key, String value)
           
 void setRunningVersion(boolean run)
          Make the test element the running version, or make it no longer the running version.
 void traverse(TestElementTraverser traverser)
          Convenient way to traverse a test element.
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

GUI_CLASS

public static final String GUI_CLASS
See Also:
Constant Field Values

ENABLED

public static final String ENABLED
See Also:
Constant Field Values

TEST_CLASS

public static final String TEST_CLASS
See Also:
Constant Field Values
Method Detail

addTestElement

public void addTestElement(TestElement child)

setProperty

public void setProperty(String key,
                        String value)

isRunningVersion

public boolean isRunningVersion()
Returns true or false whether the element is the running version.


getPropertyAsBoolean

public boolean getPropertyAsBoolean(String key)
Return a property as a boolean value.


getPropertyAsLong

public long getPropertyAsLong(String key)

getPropertyAsInt

public int getPropertyAsInt(String key)

getPropertyAsFloat

public float getPropertyAsFloat(String key)

setRunningVersion

public void setRunningVersion(boolean run)
Make the test element the running version, or make it no longer the running version. This tells the test element that it's current state must be retrievable by a call to recoverRunningVersion(). It is kind of like making the TestElement Read- Only, but not as strict. Changes can be made and the element can be modified, but the state of the element at the time of the call to setRunningVersion() must be recoverable.


recoverRunningVersion

public void recoverRunningVersion()
Tells the test element to return to the state it was in when makeRunningVersion() was called.


clear

public void clear()
Clear the TestElement of all data.


getPropertyAsString

public String getPropertyAsString(String key)

setProperty

public void setProperty(JMeterProperty property)
Sets and overwrites a property in the TestElement. This call will be ignored if the TestElement is currently a "running version".


getProperty

public JMeterProperty getProperty(String propName)
Given the name of the property, returns the appropriate property from JMeter. If it is null, a NullProperty object will be returned.


propertyIterator

public PropertyIterator propertyIterator()
Get a Property Iterator for the TestElements properties.

Returns:
PropertyIterator

removeProperty

public void removeProperty(String key)

clone

public Object clone()

traverse

public void traverse(TestElementTraverser traverser)
Convenient way to traverse a test element.


Apache JMeter
1.9

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