Apache JMeter

org.apache.jmeter.util
Class BeanShellTestElement

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.util.BeanShellTestElement
All Implemented Interfaces:
Cloneable, Serializable, TestElement, TestListener, ThreadListener
Direct Known Subclasses:
BeanShellAssertion, BeanShellListener, BeanShellPostProcessor, BeanShellPreProcessor, BeanShellSampler, BeanShellTimer

public abstract class BeanShellTestElement
extends AbstractTestElement
implements Serializable, Cloneable, ThreadListener, TestListener

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
BeanShellTestElement()
           
 
Method Summary
 Object clone()
           
protected  BeanShellInterpreter getBeanShellInterpreter()
           
protected abstract  String getInitFileProperty()
           
 String getScript()
          Return the script (TestBean version).
 void setScript(String s)
          Set the script (TestBean version).
 void testEnded()
          Called once for all threads after the end of a test.
 void testEnded(String host)
          Called once for all threads after the end of a test.
 void testIterationStart(LoopIterationEvent event)
          Each time through a Thread Group's test script, an iteration event is fired for each thread.
 void testStarted()
          Called just before the start of the test from the main engine thread.
 void testStarted(String host)
          Called just before the start of the test from the main engine thread.
 void threadFinished()
          Called once for each thread at the end of a test
 void threadStarted()
          Called just before the start of the thread
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanShellTestElement

public BeanShellTestElement()
Method Detail

getInitFileProperty

protected abstract String getInitFileProperty()

getBeanShellInterpreter

protected BeanShellInterpreter getBeanShellInterpreter()

clone

public Object clone()
Specified by:
clone in interface TestElement
Overrides:
clone in class AbstractTestElement

getScript

public String getScript()
Return the script (TestBean version). Must be overridden for subclasses that don't implement TestBean otherwise the clone() method won't work.

Returns:
the script to execute

setScript

public void setScript(String s)
Set the script (TestBean version). Must be overridden for subclasses that don't implement TestBean otherwise the clone() method won't work.

Parameters:
s - the script to execute (may be blank)

threadStarted

public void threadStarted()
Description copied from interface: ThreadListener
Called just before the start of the thread

Specified by:
threadStarted in interface ThreadListener
See Also:
org.apache.jmeter.threads.JMeterThread#threadStarted()

threadFinished

public void threadFinished()
Description copied from interface: ThreadListener
Called once for each thread at the end of a test

Specified by:
threadFinished in interface ThreadListener
See Also:
org.apache.jmeter.threads.JMeterThread#threadFinished()

testEnded

public void testEnded()
Description copied from interface: TestListener
Called once for all threads after the end of a test.

Specified by:
testEnded in interface TestListener
See Also:
StandardJMeterEngine.stopTest()

testEnded

public void testEnded(String host)
Description copied from interface: TestListener
Called once for all threads after the end of a test.

Specified by:
testEnded in interface TestListener
See Also:
StandardJMeterEngine.stopTest()

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Description copied from interface: TestListener
Each time through a Thread Group's test script, an iteration event is fired for each thread.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -

testStarted

public void testStarted()
Description copied from interface: TestListener
Called just before the start of the test from the main engine thread. Note that not all the test variables will have been set up at this point.

Specified by:
testStarted in interface TestListener
See Also:
StandardJMeterEngine.run()

testStarted

public void testStarted(String host)
Description copied from interface: TestListener
Called just before the start of the test from the main engine thread. Note that not all the test variables will have been set up at this point.

Specified by:
testStarted in interface TestListener
See Also:
StandardJMeterEngine.run()

Apache JMeter

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