com.appperfect.devcommon.script
Interface IScript

All Known Subinterfaces:
IBrowser, IHTTPScript, IUrl, SoapScript, WebArea, WebBrowserElement, WebButton, WebCheckBox, WebComboBox, WebDivElement, WebEdit, WebFile, WebHiddenField, WebImage, WebInputButton, WebInputElement, WebInputImage, WebLink, WebList, WebListItem, WebObject, WebPasswordField, WebRadioButton, WebResetButton, WebSpan, WebSubmitButton, WebTable, WebTextArea, WebTextField, WinApplet, WinButton, WinCalendar, WinCheckBox, WinComboBox, WinComboListBox, WinEdit, WinFlash, WinListBox, WinListView, WinMenu, WinMenuWindow, WinObject, WinRadioButton, WinScrollbar, WinSpin, WinStatic, WinStatusBar, WinTab, WinToolbar, WinTreeView

public interface IScript

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

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


Method Summary
 java.lang.String getReasonForFailure()
 If the task has failed after execution, a reason for its failure is set by the application.
 boolean isIgnored()
 This method returns if the task is ignored during execution.
 boolean isTaskSuccessful()
 Afer the request was executed, this method returns the status of the execution.
 boolean isTaskTimedOut()
 Afer the request was executed, this method returns if the task had timed out.
 void setIgnored(boolean ignored)
 This method should be called to ignore a task during execution.
 void setReasonForFailure(java.lang.String reason)
 If the task has failed after execution, a standard reason for its failure is set by the application.
 void setTaskSuccessful(boolean success)
 Afer the request was executed, it is marked as successful or failed using standard rules.
 void setTaskTimedout(boolean timeout)
 Afer the request was executed, it is marked as timed out, if there is no response from the server within assigned time set for the task.
 void setThinkTime(int iThinkTime)
 Delay in seconds before the task is actually executed.
 void setTimeout(int secs)
 Few tasks may take long time to execute, sometimes forever, due to various reason like server is not responding, network failure etc.
 

Method Detail

getReasonForFailure

java.lang.String getReasonForFailure()
If the task has failed after execution, a reason for its failure is set by the application. This method can be used to find out the reason.

Returns:
reason for failure of the task; null if the task has not failed.

isIgnored

boolean isIgnored()
This method returns if the task is ignored during execution.

Returns:
true if this task should not be executed; false otherwise.

isTaskSuccessful

boolean isTaskSuccessful()
Afer the request was executed, this method returns the status of the execution.

Returns:
true if the task was successful; false otherwise.

isTaskTimedOut

boolean isTaskTimedOut()
Afer the request was executed, this method returns if the task had timed out.

Returns:
true if the task had timed out; false otherwise.

setIgnored

void setIgnored(boolean ignored)
This method should be called to ignore a task during execution.

Parameters:
ignored - true if this task should be executed; false otherwise.

setReasonForFailure

void setReasonForFailure(java.lang.String reason)
If the task has failed after execution, a standard reason for its failure is set by the application. To set a user-defined reason, use this method

Parameters:
reason - user-defined reason for failure of the task.

setTaskSuccessful

void setTaskSuccessful(boolean success)
Afer the request was executed, it is marked as successful or failed using standard rules. User may still want to use a veto power and mark a particular task as successful or failed. It can be done using this method.

Parameters:
success - true to mark the task as successful; false otherwise.

setTaskTimedout

void setTaskTimedout(boolean timeout)
Afer the request was executed, it is marked as timed out, if there is no response from the server within assigned time set for the task. User may still want to use a veto power and mark a particular task as timedout or unmark it as timedout. It can be done using this method.

Parameters:
timeout - true to mark the task as timed out; false otherwise.

setThinkTime

void setThinkTime(int iThinkTime)
Delay in seconds before the task is actually executed.

Parameters:
iThinkTime - no of seconds the engine waits before the task is actually executed.

setTimeout

void setTimeout(int secs)
Few tasks may take long time to execute, sometimes forever, due to various reason like server is not responding, network failure etc. This could affect the test execution which will never complete. One can come out of this situation by specifying the no of seconds after which the task execution will be aborted and its status will be marked as timed out.

Parameters:
secs - no of seconds for the task to complete its execution.


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