com.appperfect.loadtester.script
Interface CLIScript

All Superinterfaces:
IScript

public interface CLIScript
extends IScript

A request object which can be executed by IScriptEngine.execute(request) method.

An object of this class is created using createCLIRequest method of IScriptEngine. Once the object is created, it should be populated as per the requirements and then executed using IScriptEngine.

See Also:
IScriptEngine, IScriptEngine.createCLIRequest(int, String)

Method Summary
 void addArgument(java.lang.String argumentName, java.lang.String argumentValue, java.lang.String testParameterName, boolean ignore)
 Each CLI request can have multiple arguments which it can pass to script file.
 void addThinkTime(int virtualUser, int type, int startValue, int endValue, int valueType)
 Delay in seconds before the task is actually executed.
 long getResponseTime()
 Get the response time of executed task
 void setCLIScriptFile(java.lang.String filePath)
 Set script file path which you want to execute.
 boolean validateText(java.lang.String txt, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression)
 Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search
 boolean validateTextInFile(java.lang.String txt, java.lang.String fileArgument, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression)
 Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search
 
Methods inherited from interface com.appperfect.devcommon.script.IScript
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setIgnored, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setThinkTime, setTimeout
 

Method Detail

addArgument

void addArgument(java.lang.String argumentName,
                 java.lang.String argumentValue,
                 java.lang.String testParameterName,
                 boolean ignore)
Each CLI request can have multiple arguments which it can pass to script file. This method is used to add a argument to to the request

Parameters:
argumentName - name of the argument
argumentValue - value of the argument
testParameterName - name of the TestParameter if the argument value is parameterized

addThinkTime

void addThinkTime(int virtualUser,
                  int type,
                  int startValue,
                  int endValue,
                  int valueType)
Delay in seconds before the task is actually executed.

Parameters:
virtualUser - % Virtual User who should use this think time setting
type - Type of value whether its Fixed (0) value or Random Value (1)
startValue - Think time value
endValue - End value of think time in case of random value
valueType - Whether value specified is in seconds (0) or in milliseconds (1)

getResponseTime

long getResponseTime()
Get the response time of executed task

Returns:
the response time of executed task

setCLIScriptFile

void setCLIScriptFile(java.lang.String filePath)
Set script file path which you want to execute.

Parameters:
filePath -

validateText

boolean validateText(java.lang.String txt,
                     boolean bCaseSensitive,
                     boolean checkForExistance,
                     boolean regularExpression)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search

Parameters:
txt - text to look for in the response
bCaseSensitive - true if search should be case-sensitive; false otherwise
checkForExistance - true if search for existence of the text; false otherwise
regularExpression - true if text is a regular expression; false otherwise
Returns:
true if the response matches this validation; false otherwise

validateTextInFile

boolean validateTextInFile(java.lang.String txt,
                           java.lang.String fileArgument,
                           boolean bCaseSensitive,
                           boolean checkForExistance,
                           boolean regularExpression)
Once the task is executed, response can be validated for presence/absence of some text along with other attributes for fine-tuning the search

Parameters:
txt - text to look for in the response
fileArgument - file argument which is passed to script file
bCaseSensitive - true if search should be case-sensitive; false otherwise
checkForExistance - true if search for existence of the text; false otherwise
regularExpression - true if text is a regular expression; false otherwise
Returns:
true if the response matches this validation; false otherwise


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.