Package org.apache.jmeter.config
Class CSVDataSet
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.config.ConfigElement
,org.apache.jmeter.engine.event.LoopIterationListener
,org.apache.jmeter.engine.util.NoConfigMerge
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.testbeans.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
-
-
Field Summary
Fields Modifier and Type Field Description public transient String
filename
public transient String
fileEncoding
public transient String
variableNames
public transient String
delimiter
public transient boolean
recycle
public transient boolean
stopThread
public transient String
shareMode
public final static String
USERNAME
public final static String
PASSWORD
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 CSVDataSet()
-
Method Summary
Modifier and Type Method Description String
getFilename()
void
setFilename(String filename)
String
getFileEncoding()
void
setFileEncoding(String fileEncoding)
String
getVariableNames()
void
setVariableNames(String variableNames)
String
getDelimiter()
void
setDelimiter(String delimiter)
boolean
getRecycle()
void
setRecycle(boolean recycle)
boolean
getStopThread()
void
setStopThread(boolean value)
String
getShareMode()
void
setShareMode(String value)
void
setProperty(JMeterProperty property)
Override the setProperty method in order to convert the original String shareMode property. void
iterationStart(LoopIterationEvent iterEvent)
boolean
getQuotedData()
void
setQuotedData(boolean quoted)
boolean
isIgnoreFirstLine()
void
setIgnoreFirstLine(boolean ignoreFirstLine)
-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.config.ConfigTestElement
addConfigElement, addTestElement, expectsModification, getProps, getSchema
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getFilename
String getFilename()
-
setFilename
void setFilename(String filename)
- Parameters:
filename
- The filename to set.
-
getFileEncoding
String getFileEncoding()
-
setFileEncoding
void setFileEncoding(String fileEncoding)
- Parameters:
fileEncoding
- The fileEncoding to set.
-
getVariableNames
String getVariableNames()
-
setVariableNames
void setVariableNames(String variableNames)
- Parameters:
variableNames
- The variableNames to set.
-
getDelimiter
String getDelimiter()
-
setDelimiter
void setDelimiter(String delimiter)
-
getRecycle
boolean getRecycle()
-
setRecycle
void setRecycle(boolean recycle)
-
getStopThread
boolean getStopThread()
-
setStopThread
void setStopThread(boolean value)
-
getShareMode
String getShareMode()
-
setShareMode
void setShareMode(String value)
-
setProperty
void setProperty(JMeterProperty property)
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).
-
iterationStart
void iterationStart(LoopIterationEvent iterEvent)
-
getQuotedData
boolean getQuotedData()
-
setQuotedData
void setQuotedData(boolean quoted)
-
isIgnoreFirstLine
boolean isIgnoreFirstLine()
-
setIgnoreFirstLine
void setIgnoreFirstLine(boolean ignoreFirstLine)
- Parameters:
ignoreFirstLine
- the ignoreFirstLine to set
-
-
-
-