Package org.apache.jmeter.config
Class CSVDataSet
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.config.ConfigTestElement
org.apache.jmeter.config.CSVDataSet
- All Implemented Interfaces:
Serializable
,Cloneable
,ConfigElement
,LoopIterationListener
,NoConfigMerge
,Searchable
,TestBean
,org.apache.jmeter.testelement.TestElement
public class CSVDataSet
extends ConfigTestElement
implements TestBean, LoopIterationListener, NoConfigMerge
Read lines from a file and split int variables.
The iterationStart() method is used to set up each set of values.
By default, the same file is shared between all threads
(and other thread groups, if they use the same file name).
The shareMode can be set to:
- All threads - default, as described above
- Current thread group
- Current thread
- Identifier - all threads sharing the same identifier
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement
org.apache.jmeter.testelement.TestElement.Companion
-
Field Summary
Fields inherited from class org.apache.jmeter.config.ConfigTestElement
PASSWORD, USERNAME
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
void
iterationStart
(LoopIterationEvent iterEvent) Called when a loop iteration is about to start.void
setDelimiter
(String delimiter) void
setFileEncoding
(String fileEncoding) void
setFilename
(String filename) void
setIgnoreFirstLine
(boolean ignoreFirstLine) void
setProperty
(JMeterProperty property) Override the setProperty method in order to convert the original String shareMode property.void
setQuotedData
(boolean quoted) void
setRecycle
(boolean recycle) void
setShareMode
(String value) void
setStopThread
(boolean value) void
setVariableNames
(String variableNames) Methods inherited from class org.apache.jmeter.config.ConfigTestElement
addConfigElement, addTestElement, expectsModification, getProps, getSchema
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addPropertiesValues, addProperty, addProperty, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, 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
Methods inherited from interface org.apache.jmeter.config.ConfigElement
clone
Methods inherited from interface org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set
-
Constructor Details
-
CSVDataSet
public CSVDataSet()
-
-
Method Details
-
setProperty
Override the setProperty method in order to convert the original String shareMode property. This used the locale-dependent display value, so caused problems when the language was changed. If the "shareMode" value matches a resource value then it is converted into the resource key. To reduce the need to look up resources, we only attempt to convert values with spaces in them, as these are almost certainly not variables (and they are definitely not resource keys).- Specified by:
setProperty
in interfaceorg.apache.jmeter.testelement.TestElement
- Overrides:
setProperty
in classAbstractTestElement
-
iterationStart
Description copied from interface:LoopIterationListener
Called when a loop iteration is about to start.- Specified by:
iterationStart
in interfaceLoopIterationListener
- Parameters:
iterEvent
- the event
-
getFilename
- Returns:
- Returns the filename.
-
setFilename
- Parameters:
filename
- The filename to set.
-
getFileEncoding
- Returns:
- Returns the file encoding.
-
setFileEncoding
- Parameters:
fileEncoding
- The fileEncoding to set.
-
getVariableNames
- Returns:
- Returns the variableNames.
-
setVariableNames
- Parameters:
variableNames
- The variableNames to set.
-
getDelimiter
-
setDelimiter
-
getQuotedData
public boolean getQuotedData() -
setQuotedData
public void setQuotedData(boolean quoted) -
getRecycle
public boolean getRecycle() -
setRecycle
public void setRecycle(boolean recycle) -
getStopThread
public boolean getStopThread() -
setStopThread
public void setStopThread(boolean value) -
isIgnoreFirstLine
public boolean isIgnoreFirstLine()- Returns:
- the ignoreFirstLine
-
setIgnoreFirstLine
public void setIgnoreFirstLine(boolean ignoreFirstLine) - Parameters:
ignoreFirstLine
- the ignoreFirstLine to set
-