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, NoConfigMergeRead 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 Stringfilenamepublic transient StringfileEncodingpublic transient StringvariableNamespublic transient Stringdelimiterpublic transient booleanrecyclepublic transient booleanstopThreadpublic transient StringshareModepublic final static StringUSERNAMEpublic final static StringPASSWORDpublic transient JMeterContextthreadContextpublic transient StringthreadNamepublic final static TestElement.CompanionCompanionpublic final static StringNAMEpublic final static StringGUI_CLASSpublic final static StringENABLEDpublic final static StringTEST_CLASSpublic final static StringCOMMENTS
-
Constructor Summary
Constructors Constructor Description CSVDataSet()
-
Method Summary
Modifier and Type Method Description StringgetFilename()voidsetFilename(String filename)StringgetFileEncoding()voidsetFileEncoding(String fileEncoding)StringgetVariableNames()voidsetVariableNames(String variableNames)StringgetDelimiter()voidsetDelimiter(String delimiter)booleangetRecycle()voidsetRecycle(boolean recycle)booleangetStopThread()voidsetStopThread(boolean value)StringgetShareMode()voidsetShareMode(String value)voidsetProperty(JMeterProperty property)Override the setProperty method in order to convert the original String shareMode property. voiditerationStart(LoopIterationEvent iterEvent)booleangetQuotedData()voidsetQuotedData(boolean quoted)booleanisIgnoreFirstLine()voidsetIgnoreFirstLine(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()
- Returns:
Returns the filename.
-
setFilename
void setFilename(String filename)
- Parameters:
filename- The filename to set.
-
getFileEncoding
String getFileEncoding()
- Returns:
Returns the file encoding.
-
setFileEncoding
void setFileEncoding(String fileEncoding)
- Parameters:
fileEncoding- The fileEncoding to set.
-
getVariableNames
String getVariableNames()
- Returns:
Returns the variableNames.
-
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()
- Returns:
the ignoreFirstLine
-
setIgnoreFirstLine
void setIgnoreFirstLine(boolean ignoreFirstLine)
- Parameters:
ignoreFirstLine- the ignoreFirstLine to set
-
-
-
-