Package org.apache.jmeter.config
Class Argument
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.testelement.TestElement
public class Argument extends AbstractTestElement implements Serializable
Class representing an argument. Each argument consists of a name/value pair, as well as (optional) metadata.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
ARG_NAME
public final static String
VALUE
public final static String
DESCRIPTION
public final static String
METADATA
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
-
Constructor Summary
Constructors Constructor Description Argument()
Create a new Argument without a name, value, or metadata. Argument(String name, String value)
Create a new Argument with the specified name and value, and no metadata. Argument(String name, String value, String metadata)
Create a new Argument with the specified name, value, and metadata. Argument(String name, String value, String metadata, String description)
Create a new Argument with the specified name, value, and metadata.
-
Method Summary
Modifier and Type Method Description ArgumentSchema
getSchema()
PropertiesAccessor<out Argument, out ArgumentSchema>
getProps()
Allows type-safe accessors to the properties of the current element. void
setName(String newName)
Set the name of the Argument. String
getName()
Get the name of the Argument. void
setValue(String newValue)
Sets the value of the Argument. String
getValue()
Gets the value of the Argument object. void
setDescription(String description)
Sets the Description attribute of the Argument. String
getDescription()
Gets the Meta Data attribute of the Argument. void
setMetaData(String newMetaData)
Sets the Meta Data attribute of the Argument. String
getMetaData()
Gets the Meta Data attribute of the Argument. String
toString()
boolean
isSkippable(String parameterName)
Is this parameter skippable, i.e. -
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, 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
-
Argument
Argument()
Create a new Argument without a name, value, or metadata.
-
Argument
Argument(String name, String value)
Create a new Argument with the specified name and value, and no metadata.- Parameters:
name
- the argument namevalue
- the argument value
-
Argument
Argument(String name, String value, String metadata)
Create a new Argument with the specified name, value, and metadata.- Parameters:
name
- the argument namevalue
- the argument valuemetadata
- the argument metadata
-
-
Method Detail
-
getSchema
ArgumentSchema getSchema()
-
getProps
PropertiesAccessor<out Argument, out ArgumentSchema> 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 ... }
-
setName
void setName(String newName)
Set the name of the Argument.
- Parameters:
newName
- the new name
-
setValue
void setValue(String newValue)
Sets the value of the Argument.
- Parameters:
newValue
- the new value
-
setDescription
void setDescription(String description)
Sets the Description attribute of the Argument.
- Parameters:
description
- the new description
-
getDescription
String getDescription()
Gets the Meta Data attribute of the Argument.
- Returns:
the MetaData value
-
setMetaData
void setMetaData(String newMetaData)
Sets the Meta Data attribute of the Argument.
- Parameters:
newMetaData
- the new metadata
-
getMetaData
String getMetaData()
Gets the Meta Data attribute of the Argument.
- Returns:
the MetaData value
-
isSkippable
boolean isSkippable(String parameterName)
Is this parameter skippable, i.e. empty/blank string or it looks like an unrecognised variable.
- Parameters:
parameterName
- - parameter name- Returns:
true if parameter should be skipped
-
-
-
-