com.appperfect.devcommon.script
Interface IScriptTest

All Known Subinterfaces:
IWebTest

public interface IScriptTest

IScriptTest is created to represent Test project. It is the base interface for IWebtest, ILoadTest and IWindowsTest


Field Summary
static int BLACKBERRY_MODEL_9000
 Constant used to define Phone device horizontal orientation
static int BLACKBERRY_MODEL_9700
 Constant used to define Phone device vertical orientation
static int DEVICE_ORIENTATION_HORIZONTAL
 Constant used to define Phone device horizontal orientation
static int DEVICE_ORIENTATION_VERTICAL
 Constant used to define Phone device vertical orientation
static int ERROR_HANDLING_PROMPT_USER
 Constant used to specify error option during execution
static int ERROR_HANDLING_STOP_REPLAY
 Constant used to specify error option during execution
static int ERROR_MARK_FAILURE_CONTINUE_NEXT_GROUP
 Constant used to specify error option during execution
static int ERROR_MARK_FAILURE_CONTINUE_NEXT_TASK
 Constant used to specify error option during execution
static int ERROR_MARK_SUCCESS_CONTINUE_NEXT_GROUP
 Constant used to specify error option during execution
static int ERROR_MARK_SUCCESS_CONTINUE_NEXT_TASK
 Constant used to specify error option during execution
static int FETCH_VALUES_EVERYTIME
 Constant used to specify if the values from the data source should be fetched every time
static int FETCH_VALUES_NOW
 Constant used to specify if the values from the data source should be fetched now
static int FETCH_VALUES_RUNTIME_BEFORE_TASK_OR_EVENT_EXECUTION
 Constant used to specify if the values from the data source should be fetched at runtime before task execution
static int FETCH_VALUES_RUNTIME_BEFORE_TEST_EXECUTION
 Constant used to specify if the values from the data source should be fetched at runtime before test execution
static java.lang.String PASSTHROUGH_RANDOM_VALUE_INDEX
 Constant used to specify random selection of value index while resolving Passthrough parameters
static int TEST_DEVICE_ANDROID
 Constant used to define Android test device
static int TEST_DEVICE_BLACKBERRY
 Constant used to define Blackberry test device
static int TEST_DEVICE_BROWSER
 Constant used to define browser test device
static int TEST_DEVICE_IPHONE
 Constant used to define iPhone test device
 
Method Summary
 void addLinkProjectGroup(java.lang.String projectName, java.lang.String groupName, boolean bIgnore, int repeatCount)
 To add linked group settings
 void addTestParameter(java.lang.String name, boolean selection, boolean sameVUValue)
 To add test parameter to the test with specified settings.
 void addTestParameter(java.lang.String name, boolean selection, boolean sameVUValue, boolean sameValueIteration, boolean sameValueValidation, boolean sameValueExecution)
 To add test parameter to the test with specified settings.
 void addTestParameter(java.lang.String name, boolean selection, boolean sameVUValue, boolean sameValueIteration, boolean sameValueValidation, boolean sameValueExecution, boolean storeValuesProjectWise)
 To add test parameter to the test with specified settings.
 void addTestParameter(java.lang.String name, boolean selection, boolean sameVUValue, boolean sameValueIteration, boolean sameValueValidation, boolean sameValueExecution, boolean storeValuesProjectWise, boolean sameValueMultipleIteration)
 To add test parameter to the test with specified settings.
 void setCSVDatasource(java.lang.String parameterName, java.lang.String fileName, int columnIndex, int whenToFetch, boolean firstRowHeader, int noOfRows, java.lang.String valueDelimiter, java.lang.String stringDelimiter)
 To set data source for parameter as CSV, meaning values should be picked from CSV file.
 void setDatabaseDatasource(java.lang.String parameterName, java.lang.String databaseId, int whenToFetch, int noOfRows, java.lang.String query)
 To set data source for parameter as Database, meaning values should be picked from DB.
 void setDateCalculationDatasource(java.lang.String parameterName, java.lang.String format, boolean todaysDate, java.lang.String start, java.lang.String end)
 To set data source for parameter as Date Calculation, meaning values should be created using specified date criteria.
 void setLastIndex(java.lang.String parameterName, int lastIndex)
 To set index of the value which was fetched during last execution, if last index is -1, first value from pool is fetched during next execution
 void setNumberCalculationDatasource(java.lang.String parameterName, java.lang.String prefix, java.lang.String suffix, boolean autoNumber, int start, int end, boolean increment, int incrementBy, int resetCriteria, int lastValue)
 To set data source for parameter as Auto Number Calculation, meaning values should be created dynamically using specified criteria.
 void setNumberCalculationDatasource(java.lang.String parameterName, java.lang.String prefix, java.lang.String suffix, boolean autoNumber, int start, int end, boolean increment, int incrementBy, int resetCriteria, int lastValue, int numberOfDigits)
 To set data source for parameter as Auto Number Calculation, meaning values should be created dynamically using specified criteria.
 void setParameterValues(java.lang.String parameterName, java.lang.String[] values)
 To set parameter values for a test parameter, used in case data source is Fixed values
 void setPassthroughDatasource(java.lang.String parameterName, java.lang.String parameterToResolve, java.lang.String recordedValue, int resolveInTaskId, int valueIndex, java.lang.String leftBoundary, java.lang.String rightBoundary)
 To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.
 void setPassthroughDatasource(java.lang.String parameterName, java.lang.String parameterToResolve, java.lang.String recordedValue, int resolveInTaskId, int valueIndex, java.lang.String leftBoundary, java.lang.String rightBoundary, boolean bUseRegularExpression, java.lang.String regexPattern, java.lang.String groupIndices)
 To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.
 void setPassthroughDatasource(java.lang.String parameterName, java.lang.String parameterToResolve, java.lang.String recordedValue, int resolveInTaskId, java.lang.String valueIndex, java.lang.String leftBoundary, java.lang.String rightBoundary, boolean ignoreNullAndEmptyValues)
 To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.
 void setPassthroughDatasource(java.lang.String parameterName, java.lang.String parameterToResolve, java.lang.String recordedValue, int resolveInTaskId, java.lang.String valueIndex, java.lang.String leftBoundary, java.lang.String rightBoundary, boolean bUseRegularExpression, java.lang.String regexPattern, java.lang.String groupIndices, boolean ignoreNullAndEmptyValues)
 To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.
 void setReplayLinkedProjects(boolean bReplayLinkedProjects)
 To decide whether to replay linked projects if any is configured
 

Field Detail

BLACKBERRY_MODEL_9000

static final int BLACKBERRY_MODEL_9000
Constant used to define Phone device horizontal orientation


BLACKBERRY_MODEL_9700

static final int BLACKBERRY_MODEL_9700
Constant used to define Phone device vertical orientation


DEVICE_ORIENTATION_HORIZONTAL

static final int DEVICE_ORIENTATION_HORIZONTAL
Constant used to define Phone device horizontal orientation


DEVICE_ORIENTATION_VERTICAL

static final int DEVICE_ORIENTATION_VERTICAL
Constant used to define Phone device vertical orientation


ERROR_HANDLING_PROMPT_USER

static final int ERROR_HANDLING_PROMPT_USER
Constant used to specify error option during execution

See Also:
Constant Field Values

ERROR_HANDLING_STOP_REPLAY

static final int ERROR_HANDLING_STOP_REPLAY
Constant used to specify error option during execution

See Also:
Constant Field Values

ERROR_MARK_FAILURE_CONTINUE_NEXT_GROUP

static final int ERROR_MARK_FAILURE_CONTINUE_NEXT_GROUP
Constant used to specify error option during execution

See Also:
Constant Field Values

ERROR_MARK_FAILURE_CONTINUE_NEXT_TASK

static final int ERROR_MARK_FAILURE_CONTINUE_NEXT_TASK
Constant used to specify error option during execution

See Also:
Constant Field Values

ERROR_MARK_SUCCESS_CONTINUE_NEXT_GROUP

static final int ERROR_MARK_SUCCESS_CONTINUE_NEXT_GROUP
Constant used to specify error option during execution

See Also:
Constant Field Values

ERROR_MARK_SUCCESS_CONTINUE_NEXT_TASK

static final int ERROR_MARK_SUCCESS_CONTINUE_NEXT_TASK
Constant used to specify error option during execution

See Also:
Constant Field Values

FETCH_VALUES_EVERYTIME

static final int FETCH_VALUES_EVERYTIME
Constant used to specify if the values from the data source should be fetched every time

See Also:
Constant Field Values

FETCH_VALUES_NOW

static final int FETCH_VALUES_NOW
Constant used to specify if the values from the data source should be fetched now

See Also:
Constant Field Values

FETCH_VALUES_RUNTIME_BEFORE_TASK_OR_EVENT_EXECUTION

static final int FETCH_VALUES_RUNTIME_BEFORE_TASK_OR_EVENT_EXECUTION
Constant used to specify if the values from the data source should be fetched at runtime before task execution

See Also:
Constant Field Values

FETCH_VALUES_RUNTIME_BEFORE_TEST_EXECUTION

static final int FETCH_VALUES_RUNTIME_BEFORE_TEST_EXECUTION
Constant used to specify if the values from the data source should be fetched at runtime before test execution

See Also:
Constant Field Values

PASSTHROUGH_RANDOM_VALUE_INDEX

static final java.lang.String PASSTHROUGH_RANDOM_VALUE_INDEX
Constant used to specify random selection of value index while resolving Passthrough parameters

See Also:
Constant Field Values

TEST_DEVICE_ANDROID

static final int TEST_DEVICE_ANDROID
Constant used to define Android test device


TEST_DEVICE_BLACKBERRY

static final int TEST_DEVICE_BLACKBERRY
Constant used to define Blackberry test device


TEST_DEVICE_BROWSER

static final int TEST_DEVICE_BROWSER
Constant used to define browser test device


TEST_DEVICE_IPHONE

static final int TEST_DEVICE_IPHONE
Constant used to define iPhone test device

Method Detail

addLinkProjectGroup

void addLinkProjectGroup(java.lang.String projectName,
                         java.lang.String groupName,
                         boolean bIgnore,
                         int repeatCount)
To add linked group settings

Parameters:
projectName - name of project from where the groups should be picked for linking with host test
groupName - name of group to be linked from the specified project
bIgnore - whether this group should be ignored during execution
repeatCount - no of times the group should be repeated

addTestParameter

void addTestParameter(java.lang.String name,
                      boolean selection,
                      boolean sameVUValue)
To add test parameter to the test with specified settings.

Parameters:
name - name of the testparameter
selection - true if selection from values should be Random, false in case of Sequential selection
sameVUValue - whether to fetch same value for all virtual users

addTestParameter

void addTestParameter(java.lang.String name,
                      boolean selection,
                      boolean sameVUValue,
                      boolean sameValueIteration,
                      boolean sameValueValidation,
                      boolean sameValueExecution)
To add test parameter to the test with specified settings.

Parameters:
name - name of the testparameter
selection - true if selection from values should be Random, false in case of Sequential selection
sameVUValue - whether to fetch same value for all virtual users
sameValueIteration - whether to fetch same value for all parameter instances during an iteration
sameValueValidation - whether to use last value fetched for parameter or to fetch new value for validation
sameValueExecution - whether to use same value at start of project execution or to start with a value which was not used during last execution

addTestParameter

void addTestParameter(java.lang.String name,
                      boolean selection,
                      boolean sameVUValue,
                      boolean sameValueIteration,
                      boolean sameValueValidation,
                      boolean sameValueExecution,
                      boolean storeValuesProjectWise)
To add test parameter to the test with specified settings.

Parameters:
name - name of the testparameter
selection - true if selection from values should be Random, false in case of Sequential selection
sameVUValue - whether to fetch same value for all virtual users
sameValueIteration - whether to fetch same value for all parameter instances during an iteration
sameValueValidation - whether to use last value fetched for parameter or to fetch new value for validation
sameValueExecution - whether to use same value at start of project execution or to start with a value which was not used during last execution
storeValuesProjectWise - Specify how application should lookup for unused parameter values for various virtual users, true if values should be looked project wise, false if values should be looked virtual user wise

addTestParameter

void addTestParameter(java.lang.String name,
                      boolean selection,
                      boolean sameVUValue,
                      boolean sameValueIteration,
                      boolean sameValueValidation,
                      boolean sameValueExecution,
                      boolean storeValuesProjectWise,
                      boolean sameValueMultipleIteration)
To add test parameter to the test with specified settings.

Parameters:
name - name of the testparameter
selection - true if selection from values should be Random, false in case of Sequential selection
sameVUValue - whether to fetch same value for all virtual users
sameValueIteration - whether to fetch same value for all parameter instances during an iteration
sameValueValidation - whether to use last value fetched for parameter or to fetch new value for validation
sameValueExecution - whether to use same value at start of project execution or to start with a value which was not used during last execution
storeValuesProjectWise - Specify how application should lookup for unused parameter values for various virtual users, true if values should be looked project wise, false if values should be looked virtual user wise
sameValueMultipleIteration - whether to fetch same value for all parameter instances during all iterations

setCSVDatasource

void setCSVDatasource(java.lang.String parameterName,
                      java.lang.String fileName,
                      int columnIndex,
                      int whenToFetch,
                      boolean firstRowHeader,
                      int noOfRows,
                      java.lang.String valueDelimiter,
                      java.lang.String stringDelimiter)
To set data source for parameter as CSV, meaning values should be picked from CSV file.

Parameters:
parameterName - name of the testparameter
fileName - name of the CSV file from where the values should be picked
columnIndex - index of the column in CSV file from where the values should be picked
whenToFetch - could be one of FETCH_VALUES_NOW, FETCH_VALUES_RUNTIME_BEFORE_TEST_EXECUTION, FETCH_VALUES_RUNTIME_BEFORE_TASK_OR_EVENT_EXECUTION or FETCH_VALUES_EVERYTIME
firstRowHeader - if first row is a header row
noOfRows - number of rows to fetch
valueDelimiter - delimiter separating the two values
stringDelimiter - delimiter separating the two strings

setDatabaseDatasource

void setDatabaseDatasource(java.lang.String parameterName,
                           java.lang.String databaseId,
                           int whenToFetch,
                           int noOfRows,
                           java.lang.String query)
To set data source for parameter as Database, meaning values should be picked from DB.

Parameters:
parameterName - name of the testparameter
databaseId - Unique ID referring to the database configured with AppPerfect
whenToFetch - could be one of FETCH_VALUES_NOW, FETCH_VALUES_RUNTIME_BEFORE_TEST_EXECUTION, FETCH_VALUES_RUNTIME_BEFORE_TASK_OR_EVENT_EXECUTION or FETCH_VALUES_EVERYTIME
noOfRows - number of rows to fetch
query - SQL Select query

setDateCalculationDatasource

void setDateCalculationDatasource(java.lang.String parameterName,
                                  java.lang.String format,
                                  boolean todaysDate,
                                  java.lang.String start,
                                  java.lang.String end)
To set data source for parameter as Date Calculation, meaning values should be created using specified date criteria.

Parameters:
parameterName - name of the testparameter
format - format of the date should be specified using date format symbols of current locale, Default date format is M/d/yy h:mm a i.e. In USA 1/12/05 3:35 PM
todaysDate - whether to use today's date or Random Date between start and end
start - starting date
end - ending date

setLastIndex

void setLastIndex(java.lang.String parameterName,
                  int lastIndex)
To set index of the value which was fetched during last execution, if last index is -1, first value from pool is fetched during next execution

Parameters:
parameterName - name of the testparameter
lastIndex - index of last used value

setNumberCalculationDatasource

void setNumberCalculationDatasource(java.lang.String parameterName,
                                    java.lang.String prefix,
                                    java.lang.String suffix,
                                    boolean autoNumber,
                                    int start,
                                    int end,
                                    boolean increment,
                                    int incrementBy,
                                    int resetCriteria,
                                    int lastValue)
To set data source for parameter as Auto Number Calculation, meaning values should be created dynamically using specified criteria.

Parameters:
parameterName - name of the testparameter
prefix - string to be prepended at the start
suffix - string to be appended at the end
autoNumber - whether number should be automatically incremented
start - starting number
end - ending number
increment - whether to increment or decrement
incrementBy - amount to be incremented
resetCriteria - can have values 0, 1 or 2; 0 specifies to reset at specified lastValue, 1 specifies to reset at start of the test, 2 specifies to never reset
lastValue - value at which the counter should be reset in case resetCriteria is 0

setNumberCalculationDatasource

void setNumberCalculationDatasource(java.lang.String parameterName,
                                    java.lang.String prefix,
                                    java.lang.String suffix,
                                    boolean autoNumber,
                                    int start,
                                    int end,
                                    boolean increment,
                                    int incrementBy,
                                    int resetCriteria,
                                    int lastValue,
                                    int numberOfDigits)
To set data source for parameter as Auto Number Calculation, meaning values should be created dynamically using specified criteria.

Parameters:
parameterName - name of the testparameter
prefix - string to be prepended at the start
suffix - string to be appended at the end
autoNumber - whether number to use in value should be auto number or Random number
start - starting number
end - ending number
increment - whether to increment or decrement
incrementBy - amount to be incremented
resetCriteria - can have values 0, 1 or 2; 0 specifies to reset at specified lastValue, 1 specifies to reset at start of the test, 2 specifies to never reset
lastValue - value at which the counter should be reset in case resetCriteria is 0
numberOfDigits - number of digits to be used for the number

setParameterValues

void setParameterValues(java.lang.String parameterName,
                        java.lang.String[] values)
To set parameter values for a test parameter, used in case data source is Fixed values

Parameters:
parameterName - name of the testparameter
values - array containing the pool of values

setPassthroughDatasource

void setPassthroughDatasource(java.lang.String parameterName,
                              java.lang.String parameterToResolve,
                              java.lang.String recordedValue,
                              int resolveInTaskId,
                              int valueIndex,
                              java.lang.String leftBoundary,
                              java.lang.String rightBoundary)
To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.

Parameters:
parameterName - name of the testparameter
parameterToResolve - name of the parameter which should be resolved in the response
recordedValue - recorded value of the parameter
resolveInTaskId - task id whose response should be used to resolve this parameter
valueIndex - the index of parameter in Response..say if a particular parameter is getting set multiple times in the response...then this index represent which instance to pick to resolve
leftBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find left boundary while searching the resultant value
rightBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find right boundary while searching the resultant value

setPassthroughDatasource

void setPassthroughDatasource(java.lang.String parameterName,
                              java.lang.String parameterToResolve,
                              java.lang.String recordedValue,
                              int resolveInTaskId,
                              int valueIndex,
                              java.lang.String leftBoundary,
                              java.lang.String rightBoundary,
                              boolean bUseRegularExpression,
                              java.lang.String regexPattern,
                              java.lang.String groupIndices)
To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.

Parameters:
parameterName - name of the testparameter
parameterToResolve - name of the parameter which should be resolved in the response
recordedValue - recorded value of the parameter
resolveInTaskId - task id whose response should be used to resolve this parameter
valueIndex - the index of parameter in Response..say if a particular parameter is getting set multiple times in the response...then this index represent which instance to pick to resolve
leftBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find left boundary while searching the resultant value
rightBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find right boundary while searching the resultant value
bUseRegularExpression - true if application should use pattern matching to resolve value
regexPattern - the regular expression which should be applied to response to extract the value
groupIndices - its a comma separated list of group indices in the regexPattern. In case value is to be created using multiple groups in the pattern then comma separated indices for same should be provided here. In case there is a single group in the pattern then value specified should be 1. In case there are no groups in the pattern then specified value should be 0 in which case extracted value will be the one returned on applying pattern.

setPassthroughDatasource

void setPassthroughDatasource(java.lang.String parameterName,
                              java.lang.String parameterToResolve,
                              java.lang.String recordedValue,
                              int resolveInTaskId,
                              java.lang.String valueIndex,
                              java.lang.String leftBoundary,
                              java.lang.String rightBoundary,
                              boolean ignoreNullAndEmptyValues)
To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.

Parameters:
parameterName - name of the testparameter
parameterToResolve - name of the parameter which should be resolved in the response
recordedValue - recorded value of the parameter
resolveInTaskId - task id whose response should be used to resolve this parameter
valueIndex - the index of parameter in Response..say if a particular parameter is getting set multiple times in the response...then this index represent which instance to pick to resolve
leftBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find left boundary while searching the resultant value
rightBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find right boundary while searching the resultant value
ignoreNullAndEmptyValues - true if null or empty values should be ignored. default is false.

setPassthroughDatasource

void setPassthroughDatasource(java.lang.String parameterName,
                              java.lang.String parameterToResolve,
                              java.lang.String recordedValue,
                              int resolveInTaskId,
                              java.lang.String valueIndex,
                              java.lang.String leftBoundary,
                              java.lang.String rightBoundary,
                              boolean bUseRegularExpression,
                              java.lang.String regexPattern,
                              java.lang.String groupIndices,
                              boolean ignoreNullAndEmptyValues)
To set data source for parameter as PassThrough, meaning values should be picked from last response fetched.

Parameters:
parameterName - name of the testparameter
parameterToResolve - name of the parameter which should be resolved in the response
recordedValue - recorded value of the parameter
resolveInTaskId - task id whose response should be used to resolve this parameter
valueIndex - the index of parameter in Response..say if a particular parameter is getting set multiple times in the response...then this index represent which instance to pick to resolve
leftBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find left boundary while searching the resultant value
rightBoundary - in case this is defined application finds the value by parsing the response line by line and uses this value to find right boundary while searching the resultant value
bUseRegularExpression - true if application should use pattern matching to resolve value
regexPattern - the regular expression which should be applied to response to extract the value
groupIndices - its a comma separated list of group indices in the regexPattern. In case value is to be created using multiple groups in the pattern then comma separated indices for same should be provided here. In case there is a single group in the pattern then value specified should be 1. In case there are no groups in the pattern then specified value should be 0 in which case extracted value will be the one returned on applying pattern.
ignoreNullAndEmptyValues - true if null or empty values should be ignored. default is false.

setReplayLinkedProjects

void setReplayLinkedProjects(boolean bReplayLinkedProjects)
To decide whether to replay linked projects if any is configured

Parameters:
bReplayLinkedProjects - true or false depending on whether to replay linked projects or not


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