Class TestPlan
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.testelement.TestElement
,org.apache.jmeter.testelement.TestStateListener
public class TestPlan extends AbstractTestElement implements Serializable, TestStateListener
-
-
Field Summary
Fields Modifier and Type Field Description public static volatile boolean
functionalMode
private transient boolean
runningVersion
public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Method Summary
Modifier and Type Method Description static boolean
getFunctionalMode()
Gets the static copy of the functional mode void
setFunctionalMode(boolean funcMode)
TestPlanSchema
getSchema()
PropertiesAccessor<out TestPlan, out TestPlanSchema>
getProps()
Allows type-safe accessors to the properties of the current element. void
prepareForPreCompile()
boolean
isFunctionalMode()
Fetches the functional mode property void
setUserDefinedVariables(Arguments vars)
JMeterProperty
getUserDefinedVariablesAsProperty()
String
getBasedir()
void
setBasedir(String b)
Arguments
getArguments()
Map<String, String>
getUserDefinedVariables()
void
setSerialized(boolean serializeTGs)
void
setTearDownOnShutdown(boolean tearDown)
boolean
isTearDownOnShutdown()
void
setTestPlanClasspath(String text)
Set the classpath for the test plan. void
setTestPlanClasspathArray(Array<String> text)
Array<String>
getTestPlanClasspathArray()
String
getTestPlanClasspath()
Returns the classpath boolean
isSerialized()
Fetch the serialize threadgroups property void
addParameter(String name, String value)
void
addTestElement(TestElement tg)
void
addThreadGroup(AbstractThreadGroup group)
Adds a feature to the AbstractThreadGroup attribute of the TestPlan object. 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
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. -
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getString, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, removed, set, setComment, setEnabled, setName, setProperty, setTemporary, traverse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
TestPlan
TestPlan()
-
TestPlan
TestPlan(String name)
-
-
Method Detail
-
getFunctionalMode
static boolean getFunctionalMode()
Gets the static copy of the functional mode
- Returns:
mode
-
setFunctionalMode
void setFunctionalMode(boolean funcMode)
-
getSchema
TestPlanSchema getSchema()
-
getProps
PropertiesAccessor<out TestPlan, out TestPlanSchema> getProps()
Allows type-safe accessors to the properties of the current element. Note: when overriding the method, ensure you emit wildcards. For instance: JMeterElementInstance<? extends TestPlanClass> getProps() { return ... }
-
prepareForPreCompile
void prepareForPreCompile()
-
isFunctionalMode
boolean isFunctionalMode()
Fetches the functional mode property
- Returns:
functional mode
-
setUserDefinedVariables
void setUserDefinedVariables(Arguments vars)
-
getUserDefinedVariablesAsProperty
JMeterProperty getUserDefinedVariablesAsProperty()
-
getBasedir
String getBasedir()
-
setBasedir
void setBasedir(String b)
-
getArguments
Arguments getArguments()
-
getUserDefinedVariables
Map<String, String> getUserDefinedVariables()
-
setSerialized
void setSerialized(boolean serializeTGs)
-
setTearDownOnShutdown
void setTearDownOnShutdown(boolean tearDown)
-
isTearDownOnShutdown
boolean isTearDownOnShutdown()
-
setTestPlanClasspath
void setTestPlanClasspath(String text)
Set the classpath for the test plan. If the classpath is made up from more then one path, the parts must be separated with CLASSPATH_SEPARATOR.
- Parameters:
text
- the classpath to be set
-
setTestPlanClasspathArray
void setTestPlanClasspathArray(Array<String> text)
-
getTestPlanClasspathArray
Array<String> getTestPlanClasspathArray()
-
getTestPlanClasspath
String getTestPlanClasspath()
Returns the classpath
- Returns:
classpath
-
isSerialized
boolean isSerialized()
Fetch the serialize threadgroups property
- Returns:
serialized setting
-
addParameter
void addParameter(String name, String value)
-
addTestElement
void addTestElement(TestElement tg)
-
addThreadGroup
void addThreadGroup(AbstractThreadGroup group)
Adds a feature to the AbstractThreadGroup attribute of the TestPlan object.
- Parameters:
group
- the feature to be added to the AbstractThreadGroup attribute
-
testEnded
void testEnded()
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
-
testEnded
void testEnded(String host)
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
-
testStarted
void testStarted()
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
-
testStarted
void testStarted(String host)
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
-
-
-
-