org.apache.jmeter.assertions

Class BeanShellAssertion

Implemented Interfaces:
Assertion, Cloneable, Serializable, TestElement, TestListener, ThreadListener

public class BeanShellAssertion
extends BeanShellTestElement
implements Assertion

A sampler which understands BeanShell

Field Summary

static String
FILENAME
static String
INIT_FILE
static String
PARAMETERS
static String
RESET_INTERPRETER
static String
SCRIPT

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

COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS

Method Summary

String
getFilename()
protected String
getInitFileProperty()
String
getParameters()
AssertionResult
getResult(SampleResult response)
Returns the AssertionResult object encapsulating information about the success or failure of the assertion.
String
getScript()
Return the script (TestBean version).
boolean
isResetInterpreter()

Methods inherited from class org.apache.jmeter.util.BeanShellTestElement

clone, getBeanShellInterpreter, getFilename, getInitFileProperty, getParameters, getScript, isResetInterpreter, processFileOrScript, readResolve, setFilename, setParameters, setResetInterpreter, setScript, testEnded, testEnded, testIterationStart, testStarted, testStarted, threadFinished, threadStarted

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

Field Details

FILENAME

public static final String FILENAME

INIT_FILE

public static final String INIT_FILE

PARAMETERS

public static final String PARAMETERS

RESET_INTERPRETER

public static final String RESET_INTERPRETER

SCRIPT

public static final String SCRIPT

Method Details

getFilename

public String getFilename()
Overrides:
getFilename in interface BeanShellTestElement

getInitFileProperty

protected String getInitFileProperty()
Overrides:
getInitFileProperty in interface BeanShellTestElement

getParameters

public String getParameters()
Overrides:
getParameters in interface BeanShellTestElement

getResult

public AssertionResult getResult(SampleResult response)
Returns the AssertionResult object encapsulating information about the success or failure of the assertion.
Specified by:
getResult in interface Assertion
Parameters:
response - the SampleResult containing information about the Sample (duration, success, etc)
Returns:
the AssertionResult containing the information about whether the assertion passed or failed.

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.
Overrides:
getScript in interface BeanShellTestElement
Returns:
the script to execute

isResetInterpreter

public boolean isResetInterpreter()
Overrides:
isResetInterpreter in interface BeanShellTestElement

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