org.apache.jmeter.util

Class BeanShellTestElement

Implemented Interfaces:
Cloneable, Serializable, TestElement, TestListener, ThreadListener
Known Direct Subclasses:
BeanShellAssertion, BeanShellListener, BeanShellPostProcessor, BeanShellPreProcessor, BeanShellSampler, BeanShellTimer

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

Fields inherited from interface org.apache.jmeter.testelement.TestElement

COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS

Constructor Summary

BeanShellTestElement()

Method Summary

Object
clone()
protected BeanShellInterpreter
getBeanShellInterpreter()
String
getFilename()
protected abstract String
getInitFileProperty()
String
getParameters()
String
getScript()
Return the script (TestBean version).
boolean
isResetInterpreter()
protected Object
processFileOrScript(BeanShellInterpreter bsh)
protected Object
readResolve()
void
setFilename(String s)
void
setParameters(String s)
void
setResetInterpreter(boolean b)
void
setScript(String s)
Set the script (TestBean version).
void
testEnded()
void
testEnded(String host)
void
testIterationStart(LoopIterationEvent event)
void
testStarted()
void
testStarted(String host)
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, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty

Constructor Details

BeanShellTestElement

public BeanShellTestElement()

Method Details

clone

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

getBeanShellInterpreter

protected BeanShellInterpreter getBeanShellInterpreter()

getFilename

public String getFilename()

getInitFileProperty

protected abstract String getInitFileProperty()

getParameters

public String getParameters()

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

isResetInterpreter

public boolean isResetInterpreter()

processFileOrScript

protected Object processFileOrScript(BeanShellInterpreter bsh)
            throws JMeterException

readResolve

protected Object readResolve()

setFilename

public void setFilename(String s)

setParameters

public void setParameters(String s)

setResetInterpreter

public void setResetInterpreter(boolean b)

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)

testEnded

public void testEnded()
Specified by:
testEnded in interface TestListener

testEnded

public void testEnded(String host)
Specified by:
testEnded in interface TestListener

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Specified by:
testIterationStart in interface TestListener

testStarted

public void testStarted()
Specified by:
testStarted in interface TestListener

testStarted

public void testStarted(String host)
Specified by:
testStarted in interface TestListener

threadFinished

public void threadFinished()
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()

threadStarted

public void threadStarted()
Called just before the start of the thread
Specified by:
threadStarted in interface ThreadListener
See Also:
org.apache.jmeter.threads.JMeterThread.threadStarted()

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