|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserCommands
This component lists all the commands available in the Android automatic test scripting language.
Method Summary | |
---|---|
void |
BeginTest(java.lang.String name)
This instruction must be the first one at the beginning of a test. |
void |
CheckAlertedSyncMode(java.lang.String source,
int mode)
This command checks the alerted sync mode of the last sync. |
void |
CheckDeletedContact(java.lang.String firstName,
java.lang.String lastName)
This command can used to check that a deleted contact on the server has been correctly deleted in the client. |
void |
CheckDeletedContactsOnServer(java.lang.String firstName,
java.lang.String lastName)
This command can used to check that a deleted contact sent to the server has been correctly deleted by the server. |
void |
CheckExchangedData(java.lang.String source,
int sentAdd,
int sentReplace,
int sentDelete,
int receivedAdd,
int receivedReplace,
int receivedDelete)
This command checks the amount of items exchanged between the server and the client during the last synchronization (for a given source). |
void |
CheckItemsCount(java.lang.String sourceName,
int count)
This command can used to check that a deleted contact sent to the server has been correctly deleted by the server. |
void |
CheckItemsCountOnServer(java.lang.String sourceName,
int count)
This command can used to check the total source items count on server side. |
void |
CheckNewContact(java.lang.String firstName,
java.lang.String lastName,
boolean checkContent)
This command can used to check that a new contact created on the server has been correctly received by the client and has the same content of the server's contact as expected. |
void |
CheckNewContactOnServer(java.lang.String firstName,
java.lang.String lastName,
boolean checkContent)
This command can used to check that a new contact sent to the server has been correctly received and has the same content of the device's contact as expected. |
void |
CheckRequestedSyncMode(java.lang.String source,
int mode)
This command checks the requested sync mode of the last sync. |
void |
CheckUpdatedContact(java.lang.String firstName,
java.lang.String lastName,
boolean checkContent)
This command can used to check that an updated contact on the server has been correctly received by the client and has the same content of the server's contact as expected. |
void |
CheckUpdatedContactOnServer(java.lang.String firstName,
java.lang.String lastName,
boolean checkContent)
This command can used to check that an updated contact sent to the server has been correctly received and has the same content of the device's contact as expected. |
void |
CreateEmptyContact()
This command can used to simulate a contact addition. |
void |
CreateEmptyContactOnServer()
This command can used to simulate a contact addition on the server. |
void |
DeleteAllContacts()
This command can used to simulate the deletion of all the contacts stored in the device. |
void |
DeleteAllContactsOnServer()
This command can used to simulate the deletion of all the contacts stored in the server. |
void |
DeleteContact(java.lang.String firstName,
java.lang.String lastName)
This command can used to simulate a contact deletion. |
void |
DeleteContactOnServer(java.lang.String firstName,
java.lang.String lastName)
This command can used to simulate a contact deletion on the server. |
void |
EmptyContactField(java.lang.String fieldName)
This command can used to simulate a contact update. |
void |
EndTest()
Terminates the commands of a test. |
void |
ForceSlowSync(java.lang.String sourceName)
This command forces the next sync to be a slow sync for the given source |
void |
Include(java.lang.String name)
This command includes another script file. |
void |
KeyPress(java.lang.String command,
int count)
This command simulates a user action via the device keypad. |
void |
LoadContact(java.lang.String firstName,
java.lang.String lastName)
This command can used to simulate a contact update. |
void |
LoadContactOnServer(java.lang.String firstName,
java.lang.String lastName)
This command can used to simulate a contact update on the server. |
void |
RefreshServer(java.lang.String sourceName)
This command shall be used everytime the server shall be updated of both client side or server side changes, and before any check command. |
void |
SaveContact()
This command can used to simulate a contact addition or update. |
void |
SaveContactOnServer()
This command can used to simulate a contact addition or update on the server. |
void |
SetContactField(java.lang.String fieldName,
java.lang.String value)
This command can used while simulating a contact additon or update. |
void |
StartMainApp()
This command starts the main application. |
void |
Wait(int delay)
This command suspends the test execution for the given amount of time. |
void |
WaitForAuthToComplete(java.lang.String minStart,
java.lang.String maxTime)
This command wait for a authentication process to start and finish within a maximum amount of time. |
void |
WaitForSyncToComplete(java.lang.String minStart,
java.lang.String maxTime)
This command wait for a sync to start and finish within a maximum amount of time. |
void |
WriteString(java.lang.String text)
This command simulates a user writing a text through the device keyboard. |
Method Detail |
---|
void BeginTest(java.lang.String name)
name
- is the name of the test as it will be reported in the final
summary.void EndTest()
void Include(java.lang.String name)
name
- is the script name. If this is an URL, then the script is
fetched from that location, otherwise the base url if the main script is
added as prefix to this namevoid StartMainApp()
void Wait(int delay)
delay
- is an integer value expressed in seconds. If the delay
is <= 0 then the command wait forever and the script gets
interrupted. This is useful if the script shall give the
user the possibility to use the application.void WaitForSyncToComplete(java.lang.String minStart, java.lang.String maxTime)
minStart
- is the time the script waits for the sync to start. If
the sync does not start withing this time, the test failsmaxTime
- is the maximum time the script is willing for the sync to
terminate. If it does not terminate within this limit,
the test fails.void WaitForAuthToComplete(java.lang.String minStart, java.lang.String maxTime)
minStart
- is the time the script waits for the authentication to
start. If the authentication does not start withing this
time, the test failsmaxTime
- is the maximum time the script is willing for the
authentication to terminate. If it does not terminate
within this limit, the test fails.void KeyPress(java.lang.String command, int count)
command
- the command to simulate. Possible values are:
count
- the number of commands to send (not mandatory)void WriteString(java.lang.String text)
text
- the text to write (e.g. into an input field)void ForceSlowSync(java.lang.String sourceName)
sourceName
- is the name of the source. The value is what is displayed
on the main screen for that source.void CheckExchangedData(java.lang.String source, int sentAdd, int sentReplace, int sentDelete, int receivedAdd, int receivedReplace, int receivedDelete)
source
- the source name. The value is what is displayed
on the main screen for that source.sentAdd
- the expected number of new items sentsentReplace
- the expected number of replace items sentsentDelete
- the expected number of delete items sentreceivedAdd
- the expected number of new received itemsreceivedReplace
- the expected number of replace received itemsreceivedDelete
- the expected number of delete received itemsvoid CheckRequestedSyncMode(java.lang.String source, int mode)
source
- is the source namemode
- an integer representing the expected sync modevoid CheckAlertedSyncMode(java.lang.String source, int mode)
source
- is the source namemode
- an integer representing the expected sync modevoid CreateEmptyContact()
void LoadContact(java.lang.String firstName, java.lang.String lastName)
firstName
- is the contact firstnamelastName
- is the contact lastnamevoid SetContactField(java.lang.String fieldName, java.lang.String value)
fieldName
- is the contact's field name to edit. It can take one of
the following values:
value
- is field value to setvoid EmptyContactField(java.lang.String fieldName)
fieldName
- is the contact's field name to empty.to see the available fields.
void SaveContact()
void DeleteContact(java.lang.String firstName, java.lang.String lastName)
firstName
- is the contact firstnamelastName
- is the contact lastnamevoid DeleteAllContacts()
void CheckNewContact(java.lang.String firstName, java.lang.String lastName, boolean checkContent)
firstName
- is the contact firstnamelastName
- is the contact lastnamecheckContent
- set as true if you want to check the item content.void CheckUpdatedContact(java.lang.String firstName, java.lang.String lastName, boolean checkContent)
firstName
- is the contact firstnamelastName
- is the contact lastnamecheckContent
- set as true if you want to check the item content.void CheckDeletedContact(java.lang.String firstName, java.lang.String lastName)
firstName
- is the contact firstnamelastName
- is the contact lastnamevoid CheckNewContactOnServer(java.lang.String firstName, java.lang.String lastName, boolean checkContent)
firstName
- is the contact firstnamelastName
- is the contact lastnamecheckContent
- set as true if you want to check the item content.void CheckUpdatedContactOnServer(java.lang.String firstName, java.lang.String lastName, boolean checkContent)
firstName
- is the contact firstnamelastName
- is the contact lastnamecheckContent
- set as true if you want to check the item content.void CheckDeletedContactsOnServer(java.lang.String firstName, java.lang.String lastName)
firstName
- is the contact firstnamelastName
- is the contact lastnamevoid CheckItemsCount(java.lang.String sourceName, int count)
sourceName
- is the name of the source. The value is what is displayed
on the main screen for that source.count
- the items count.void CheckItemsCountOnServer(java.lang.String sourceName, int count)
sourceName
- is the name of the source. The value is what is displayed
on the main screen for that source.count
- the items count.void RefreshServer(java.lang.String sourceName)
sourceName
- is the name of the source. The value is what is displayed
on the main screen for that source.void CreateEmptyContactOnServer()
void LoadContactOnServer(java.lang.String firstName, java.lang.String lastName)
firstName
- is the contact firstnamelastName
- is the contact lastnamevoid SaveContactOnServer()
void DeleteContactOnServer(java.lang.String firstName, java.lang.String lastName)
firstName
- is the contact firstnamelastName
- is the contact lastnamevoid DeleteAllContactsOnServer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |