|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SoapScript
A request object which can be executed by
IScriptEngine.execute(request)
method.
An object of this class is created using createSoapRequest
method of IScriptEngine. Once the object is
created, it should be populated as per the requirements of the SOAP protocol
and then executed using IScriptEngine.
Field Summary | |
---|---|
static int |
DOCUMENT
|
static int |
ONE_WAY
|
static int |
REQUEST_RESPONSE
|
static int |
RPC
|
static int |
SOAP_1_1
|
static int |
SOAP_1_2
|
Method Summary | |
---|---|
void |
addHeader(java.lang.String headerName,
java.lang.String headerValue,
java.lang.String testParameterName)
Each HTTP request sends a set of headers to the server, which helps the server understand the kind of request. |
void |
addParameter(java.lang.String parameterName,
java.lang.String parameterValue,
java.lang.String testParameterName)
Use this method to add SOAP parameters. |
void |
addParameter(java.lang.String parameterName,
java.lang.String parameterValue,
java.lang.String testParameterName,
boolean attribute)
Use this method to add SOAP parameters. |
void |
addSoapAttachment(java.lang.String parameterName,
java.lang.String attachment,
java.lang.String contentId,
java.lang.String contentType,
java.lang.String testParameterName)
Use this method to add Attachments in a Soap request |
void |
addSoapHeader(java.lang.String parameterName,
java.lang.String parameterValue,
java.lang.String testParameterName)
Use this method to add SOAP headers. |
void |
addSoapHeader(java.lang.String parameterName,
java.lang.String parameterValue,
java.lang.String testParameterName,
java.lang.String mustUnderstand,
java.lang.String actor)
Use this method to add SOAP headers. |
void |
addThinkTime(int virtualUser,
int type,
int startValue,
int endValue,
int valueType)
Delay in seconds before the task is actually executed. |
boolean |
assertInDatabase(java.lang.String description,
java.lang.String databaseId,
java.lang.String query)
Once the task is executed, database can be validated by firing the specified SELECT query |
boolean |
assertSoapElement(java.lang.String description,
java.lang.String attributeName,
java.lang.String attributeValue)
Once the task is executed, attributes of the node in the DOM tree of the SOAP response data can be validated. |
boolean |
assertSoapFault(java.lang.String description,
java.lang.String faultCode)
Once the task is executed, Soap Response can be validated for any soap fault. |
boolean |
assertText(java.lang.String description,
java.lang.String[] txt,
boolean bCaseSensitive,
boolean contains,
boolean bAll,
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 |
assertText(java.lang.String description,
java.lang.String[] txt,
boolean bCaseSensitive,
boolean contains,
boolean bAll,
boolean checkForExistance,
boolean regularExpression,
java.lang.String prefix,
java.lang.String suffix)
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 |
assertText(java.lang.String description,
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 |
assertText(java.lang.String description,
java.lang.String txt,
boolean bCaseSensitive,
boolean checkForExistance,
boolean regularExpression,
java.lang.String prefix,
java.lang.String suffix)
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 |
assertTodaysDate(java.lang.String description,
java.lang.String dateFormat)
Once the task is executed, response can be validated to contain today's date in specified format |
boolean |
assertTodaysDate(java.lang.String description,
java.lang.String dateFormat,
java.lang.String prefix,
java.lang.String suffix)
Once the task is executed, response can be validated to contain today's date in specified format |
java.lang.String |
getResponse()
After task execution the response page can be fetched using this method |
int |
getResponseCode()
Get Response Code as a result of task execution |
long |
getResponseTime()
Get the response time of executed task |
IValidationResult |
getValidationResult()
Once the task is executed, detailed validation result can be fetched using this method. |
boolean |
isValidationSuccessful()
Once the task is executed, this method returns the status of the validation carried out |
void |
setBindingStyle(java.lang.String bndStyle)
specify the binding style |
void |
setNameSpace(java.lang.String nameSpace)
set namespace for operation |
void |
setOperation(java.lang.String operation)
set operation to call |
void |
setOperationType(java.lang.String operationType)
set type of the operation to call Possible values are SoapScript.ONE_WAY or SoapScript.REQUEST_RESPONSE |
void |
setPath(java.lang.String uri)
This can be used to set path directly from script. |
void |
setPath(java.lang.String uri,
java.lang.String encodeChar)
This can be used to set path directly from script. |
void |
setPortType(java.lang.String portType)
specify the port type |
void |
setResponseTime(long responseTimeInMillis)
This can be used to set value of session parameter. |
void |
setSkipSoapActionHeader(boolean skipSoapAction)
specify if SoapAction header should be skipped |
void |
setSoapActionHeader(java.lang.String soapAction)
specify soap action header |
void |
setSoapInputEncoded(boolean inputSoapEncoded)
specify if input soap is encoded |
void |
setSoapVersion(java.lang.String soapVersion)
specify soap version |
void |
setUseAuthentication(boolean useAuthentication)
A task may require authentication credentials when sent to the server, this can be configured using this method. |
void |
setValidationSuccessful(boolean success)
Once the task is executed, this method can be used to set the status of validation |
void |
setWSDLFile(java.lang.String wsdlFile)
specify the wsdl file cached in the recorded folder when the task is added. |
void |
setWSDLSource(java.lang.String wsdlSource)
specify the source of the wsdl of this soap task |
Methods inherited from interface com.appperfect.devcommon.script.IScript |
---|
getReasonForFailure, isIgnored, isTaskSuccessful, isTaskTimedOut, setIgnored, setReasonForFailure, setTaskSuccessful, setTaskTimedout, setThinkTime, setTimeout |
Field Detail |
---|
static final int DOCUMENT
static final int ONE_WAY
static final int REQUEST_RESPONSE
static final int RPC
static final int SOAP_1_1
static final int SOAP_1_2
Method Detail |
---|
void addHeader(java.lang.String headerName, java.lang.String headerValue, java.lang.String testParameterName)
headerName
- name of the headerheaderValue
- value of the headertestParameterName
- name of the TestParameter if the header value is parameterizedvoid addParameter(java.lang.String parameterName, java.lang.String parameterValue, java.lang.String testParameterName)
parameterName
- parameterValue
- testParameterName
- void addParameter(java.lang.String parameterName, java.lang.String parameterValue, java.lang.String testParameterName, boolean attribute)
parameterName
- parameterValue
- testParameterName
- attribute
- void addSoapAttachment(java.lang.String parameterName, java.lang.String attachment, java.lang.String contentId, java.lang.String contentType, java.lang.String testParameterName)
parameterName
- attachment
- contentId
- contentType
- testParameterName
- void addSoapHeader(java.lang.String parameterName, java.lang.String parameterValue, java.lang.String testParameterName)
parameterName
- parameterValue
- testParameterName
- void addSoapHeader(java.lang.String parameterName, java.lang.String parameterValue, java.lang.String testParameterName, java.lang.String mustUnderstand, java.lang.String actor)
parameterName
- parameterValue
- testParameterName
- mustUnderstand
- actor
- void addThinkTime(int virtualUser, int type, int startValue, int endValue, int valueType)
virtualUser
- % Virtual User who should use this think time settingtype
- Type of value whether its Fixed (0) value or Random Value (1)startValue
- Think time valueendValue
- End value of think time in case of random valuevalueType
- Whether value specified is in seconds (0) or in milliseconds (1)boolean assertInDatabase(java.lang.String description, java.lang.String databaseId, java.lang.String query)
description
- of validationdatabaseId
- database id configured with the application in Tools->Optionsquery
- SQL query to be fired to the given database id
true
if the query return non-empty ResultSet;
false
otherwiseboolean assertSoapElement(java.lang.String description, java.lang.String attributeName, java.lang.String attributeValue)
description
- of validationattributeName
- name of the attributeattributeValue
- value of the attribute
true
if the response matches this validation;
false
otherwiseboolean assertSoapFault(java.lang.String description, java.lang.String faultCode)
description
- of validationfaultCode
- fault code to be validated. Any for all types of faults
true
if there is NO fault or fault that does not match specified fault code
false
otherwiseboolean assertText(java.lang.String description, java.lang.String[] txt, boolean bCaseSensitive, boolean contains, boolean bAll, boolean checkForExistance, boolean regularExpression)
description
- of validationtxt
- list of text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecontains
- true
if search for existence of the text;
false
otherwisebAll
- true
if search for all the elements of the
list; false
for any element of the listregularExpression
- true
if text is a regular expression;
false
otherwise
true
if the response matches this validation;
false
otherwiseboolean assertText(java.lang.String description, java.lang.String[] txt, boolean bCaseSensitive, boolean contains, boolean bAll, boolean checkForExistance, boolean regularExpression, java.lang.String prefix, java.lang.String suffix)
description
- of validationtxt
- list of text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecontains
- true
if search for existence of the text;
false
otherwisebAll
- true
if search for all the elements of the
list; false
for any element of the listregularExpression
- true
if text is a regular expression;
false
otherwiseprefix
- text present before the txt
suffix
- text present after the txt
true
if the response matches this validation;
false
otherwiseboolean assertText(java.lang.String description, java.lang.String txt, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression)
description
- of validationtxt
- text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecheckForExistance
- true
if search for existence of the text;
false
otherwiseregularExpression
- true
if text is a regular expression;
false
otherwise
true
if the response matches this validation;
false
otherwiseboolean assertText(java.lang.String description, java.lang.String txt, boolean bCaseSensitive, boolean checkForExistance, boolean regularExpression, java.lang.String prefix, java.lang.String suffix)
description
- of validationtxt
- text to look for in the responsebCaseSensitive
- true
if search should be case-sensitive;
false
otherwisecheckForExistance
- true
if search for existence of the text;
false
otherwiseregularExpression
- true
if text is a regular expression;
false
otherwiseprefix
- text present before the txt
suffix
- text present after the txt
true
if the response matches this validation;
false
otherwiseboolean assertTodaysDate(java.lang.String description, java.lang.String dateFormat)
description
- of validationdateFormat
- valid date format
true
if the response matches this validation;
false
otherwiseboolean assertTodaysDate(java.lang.String description, java.lang.String dateFormat, java.lang.String prefix, java.lang.String suffix)
description
- of validationdateFormat
- valid date formatprefix
- text present before the date
suffix
- text present after the date
true
if the response matches this validation;
false
otherwisejava.lang.String getResponse()
int getResponseCode()
long getResponseTime()
IValidationResult getValidationResult()
boolean isValidationSuccessful()
true
if the validation was successful;
false
otherwisevoid setBindingStyle(java.lang.String bndStyle)
bndStyle
- possible values are SoapScript.DOCUMENT or SoapScript.RPCvoid setNameSpace(java.lang.String nameSpace)
nameSpace
- void setOperation(java.lang.String operation)
operation
- void setOperationType(java.lang.String operationType)
operationType
- void setPath(java.lang.String uri)
uri
- void setPath(java.lang.String uri, java.lang.String encodeChar)
uri
- encodeChar
- void setPortType(java.lang.String portType)
portType
- void setResponseTime(long responseTimeInMillis)
responseTimeInMillis
- void setSkipSoapActionHeader(boolean skipSoapAction)
skipSoapAction
- void setSoapActionHeader(java.lang.String soapAction)
soapAction
- void setSoapInputEncoded(boolean inputSoapEncoded)
inputSoapEncoded
- void setSoapVersion(java.lang.String soapVersion)
soapVersion
- possible values SoapScript.SOAP_1_1 or SoapScript.SOAP_1_2void setUseAuthentication(boolean useAuthentication)
useAuthentication
- true
if this task should use authentication
details while it is sent to the server; false
otherwisevoid setValidationSuccessful(boolean success)
success
- true
if the validation is successful;
false
otherwisevoid setWSDLFile(java.lang.String wsdlFile)
wsdlFile
- void setWSDLSource(java.lang.String wsdlSource)
wsdlSource
-
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |