public class SystemSampler extends AbstractSampler
Modifier and Type | Field and Description |
---|---|
static String |
ARGUMENTS |
static String |
CHECK_RETURN_CODE |
static String |
COMMAND |
static int |
DEFAULT_RETURN_CODE |
static String |
DIRECTORY |
static String |
ENVIRONMENT |
static String |
EXPECTED_RETURN_CODE |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
SystemSampler()
Create a SystemSampler.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applies(ConfigTestElement configElement)
Does configElement apply to Sampler
|
Arguments |
getArguments()
Get the arguments (parameters) for the JavaSamplerClient to be executed
with.
|
boolean |
getCheckReturnCode() |
String |
getCommand()
Gets the Command attribute of the JavaConfig object
|
String |
getDirectory() |
Arguments |
getEnvironmentVariables()
Get the env variables
|
int |
getExpectedReturnCode() |
String |
getStderr() |
String |
getStdin() |
String |
getStdout() |
long |
getTimeout() |
SampleResult |
sample(Entry entry)
Performs a test sample.
|
void |
setArguments(Arguments args)
Set the arguments (parameters) for the JavaSamplerClient to be executed
with.
|
void |
setCheckReturnCode(boolean checkit) |
void |
setCommand(String command)
Sets the Command attribute of the JavaConfig object
|
void |
setDirectory(String directory)
Set the working directory to use for system commands
|
void |
setEnvironmentVariables(Arguments arguments) |
void |
setExpectedReturnCode(int code) |
void |
setStderr(String filename) |
void |
setStdin(String filename) |
void |
setStdout(String filename) |
void |
setTimout(long timeoutMs) |
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addTestElement, canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
public static final String COMMAND
public static final String DIRECTORY
public static final String ARGUMENTS
public static final String ENVIRONMENT
public static final String CHECK_RETURN_CODE
public static final String EXPECTED_RETURN_CODE
public static final int DEFAULT_RETURN_CODE
public SampleResult sample(Entry entry)
entry
- the Entry for this samplepublic boolean applies(ConfigTestElement configElement)
AbstractSampler
applies
in interface ConfigMergabilityIndicator
applies
in class AbstractSampler
configElement
- ConfigTestElement
AbstractSampler.applies(org.apache.jmeter.config.ConfigTestElement)
public String getDirectory()
public void setDirectory(String directory)
directory
- working directory to use for system commandspublic void setCommand(String command)
command
- the new Command valuepublic String getCommand()
public void setArguments(Arguments args)
args
- the new arguments. These replace any existing arguments.public Arguments getArguments()
public void setCheckReturnCode(boolean checkit)
checkit
- boolean indicates if we check or not return codepublic boolean getCheckReturnCode()
public void setExpectedReturnCode(int code)
code
- expected return codepublic int getExpectedReturnCode()
public void setEnvironmentVariables(Arguments arguments)
arguments
- Env varspublic Arguments getEnvironmentVariables()
public String getStdout()
public void setStdout(String filename)
public String getStderr()
public void setStderr(String filename)
public String getStdin()
public void setStdin(String filename)
public long getTimeout()
public void setTimout(long timeoutMs)
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.