Тестирование программного обеспечения
Особенности определения корректности функционирования анализируемой программы. Анализ основных способов его проведения. Разработка и автоматизация тест-кейсов. Рассмотрение аннотация @Test. История развития тестирования программного обеспечения.
Рубрика | Программирование, компьютеры и кибернетика |
Вид | дипломная работа |
Язык | русский |
Дата добавления | 30.08.2016 |
Размер файла | 52,3 K |
Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже
Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.
String firstExt = phoneA.getExtensionNumber();
report.report("Phone A relogin to user with 250 contacts");
logoutFromAMenu(phoneA);
delay(2000);
loginAfterLogoutFromAMenu(phoneA, contactNumber, phoneA.getPassword());
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
report.report("Check presence state at all 250 contacts...");
delay(40000);
String[] contacts = phoneA.getContactsScreenLines();
for(int i = 0; i < contacts.length; i++) {
if(!contacts[i].contains("offline")) {
report.report("Not all contacts have presence state Offline", Reporter.FAIL);
break;
}
if(i == contacts.length - 1)
report.report("All contacts have presence state Offline");
}
delay(30000);
report.report("Reboot...");
rebootPhoneFromCraftMenu2(phoneA);
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
report.report("Check presence state at all 250 contacts...");
delay(40000);
contacts = phoneA.getContactsScreenLines();
for(int i = 0; i < contacts.length; i++) {
if(!contacts[i].contains("offline")) {
report.report("Not all contacts have presence state Offline", Reporter.FAIL);
break;
}
if(i == contacts.length - 1)
report.report("All contacts have presence state Offline");
}
report.report("Relogin to first user");
logoutFromAMenu(phoneA);
delay(2000);
loginAfterLogoutFromAMenu(phoneA, firstExt, phoneA.getPassword());
}
catch (Exception e) {
reportException(e);
}
}
/**
* Test Case
* Check that when address book is had 250 contacts then can not create a contact
* Setup:
* Login to extension which has 250 contacts in address book
* Setup:
* 1. User X has 250 contacts
* Scenario:
* 1. Login to user X
* 2. Go to address book
* 3. Check that button "New" is disappeared
*
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Impossible to create the 251st contact", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void limitContacts() throws Exception {
try {
report.report("Initialization");
phoneInit(phoneA, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
updateImagesDatabasePath();
checkFullImageWithoutDateTime(phoneA, "IdleBeforeTest", null);
String firstExt = phoneA.getExtensionNumber();
report.report("Phone A relogin to user with 250 contacts");
logoutFromAMenu(phoneA);
delay(2000);
loginAfterLogoutFromAMenu(phoneA, contactNumber, phoneA.getPassword());
delay(6000);
checkFullImageWithoutDateTime(phoneA, "Login to 2251", null);
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
report.report("Wait when contacts loading");
delay(40000);
checkFullImageWithoutDateTime(phoneA, "Address Book", null);
switch(phoneA.getModelType()) {
case MODEL_9601:
phoneA.checkButtons("Call", "Details", "More");
break;
case MODEL_9608:
case MODEL_9611:
phoneA.checkButtons("Call", "Details", "Edit", "More");
break;
case MODEL_9641:
phoneA.checkButtons("Search", "", "", "");
break;
}
delay(5000);
report.report("Relogin to first user");
logoutFromAMenu(phoneA);
delay(2000);
loginAfterLogoutFromAMenu(phoneA, firstExt, phoneA.getPassword());
delay(6000);
checkFullImageWithoutDateTime(phoneA, "IdleAfterTest", null);
}
catch(Exception e) {
reportException(e);
}
}
/**
* Test Case to address SIP96x1-15799, SIP96x1-15775, SIP96x1-15567
* Checks update of presence state of contacts(with E.164 handle and non-E.164)
* in top line of current extension and in address book of watcher, which has its
* contacts wrote.
* Checks updating presence state in address book of watcher
* Checks automatic presence state (should be "Available")
* Setup:
* Phone A, Phone B, Phone C
* 1. User X has extension with E.164 handle
* 2. Phone A has extension non-E.164 handle
* 3. Phone C - watcher
* Scenario:
* 1. Init Phone A and Phone C
* 2. Check that presence state of Phone A is working normally
* 3. Establish automatic presence state on Phone A
* 4. Check that presence state of phone A is Available because automatic mode turn on
* 5. Check that presence state of Phone C is working normally
* 6. Establish automatic presence state on Phone C
* 7. Check that presence state of phone C is Available because automatic mode turn on
* 8. Delete all contacts on phone A and C
* 9. Log in user B (Phone B)
* 10. Init Phone B
* 11. Check that presence state of Phone B is working normally
* 12. Establish automatic presence state on Phone B
* 13. Check that presence state of phone B is Available because automatic mode turn on
* 14. Add user A to watcher
* 15. Add user B to watcher
* 16. Compare presence state of user A to presence state in address book of watcher
* 17. Compare presence state of user B to presence state in address book of watcher
* 18. Change presence state of user A and compare again (step 16)
* 19. Change presence state of user B and compare again (step 17)
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Update presence state of contact that has E.164 handle in profile", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void updatePresence() throws Exception {
try {
report.report("Initialization for A and C");
phoneInit(phoneA, true);
phoneInit(phoneC, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
phoneC.getCAState(1, 100);
phoneC.getCAState(2, 100);
phoneC.getCAState(3, 100);
updateImagesDatabasePath();
checkFullImageWithoutDateTime(phoneA, "IdleBeforeTest", null);
checkFullImageWithoutDateTime(phoneC, "IdleBeforeTest", null);
if(phoneA.getPresenceState().compareTo("Undefined") == 0)
report.report("Presence state is not available on " + phoneA.getExtensionNumber(), Reporter.FAIL);
else
report.report("Presence is working normally on " + phoneA.getExtensionNumber(), ReportAttribute.BOLD);
report.report("Presence state should be automatic for begining on " + phoneA.getExtensionNumber());
delay(3000);
switch(phoneA.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.MENU, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
checkFullImageWithoutDateTime(phoneA, "PresenceAutomaticPhoneA", null);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneA.pressKey(OneXKey.MENU, keypadDelay);
phoneA.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneA.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneA.touch(OneXScreenObject.LINE_APPEARANCE_1, keypadDelay);
checkFullImageWithoutDateTime(phoneA, "PresenceAutomaticPhoneA", null);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneA.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
delay(3000);
if(!phoneA.checkPresenceState("Online"))
report.report("Presence state of " + phoneA.getExtensionNumber() + " is NOT be Available when automatic mode turn on", Reporter.FAIL);
if(phoneC.getPresenceState().compareTo("Undefined") == 0)
report.report("Presence state is not available on " + phoneC.getExtensionNumber(), Reporter.FAIL);
else
report.report("Presence is working normally on " + phoneC.getExtensionNumber(), ReportAttribute.BOLD);
report.report("Presence state should be automatic for begining on " + phoneC.getExtensionNumber());
delay(3000);
switch(phoneC.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneC.pressKey(OneXKey.MENU, keypadDelay);
phoneC.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneC.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneC.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneC.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
checkFullImageWithoutDateTime(phoneC, "PresenceAutomaticPhoneC", null);
phoneC.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneC.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneC.pressKey(OneXKey.MENU, keypadDelay);
phoneC.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneC.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneC.touch(OneXScreenObject.LINE_APPEARANCE_1, keypadDelay);
checkFullImageWithoutDateTime(phoneC, "PresenceAutomaticPhoneC", null);
phoneC.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneC.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
if(!phoneC.checkPresenceState("Online"))
report.report("Presence state of " + phoneC.getExtensionNumber() + " is NOT Available when automatic mode turn on", Reporter.FAIL);
while(phoneA.getContactsScreenLines().length > 1)
deleteAllContacts(phoneA);
delay(2000);
while(phoneC.getContactsScreenLines().length > 1)
deleteAllContacts(phoneC);
delay(2000);
report.report("One phone should login to E.164 extension");
logoutFromAMenu(phoneB);
delay(2000);
switch(phoneB.getModelType()) {
case MODEL_9601:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, keypadDelay, 12);
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12); // enter "+"
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay);
break;
}
loginAfterLogoutFromAMenu(phoneB, contactNumber, phoneB.getPassword());
delay(2000);
checkFullImageWithoutDateTime(phoneB, "Login", null);
report.report("Initialization for B");
phoneInit(phoneB, true);
phoneB.getCAState(1, 100);
phoneB.getCAState(2, 100);
phoneB.getCAState(3, 100);
checkFullImageWithoutDateTime(phoneB, "IdleBeforeTest", null);
while(phoneB.getContactsScreenLines().length > 1)
deleteAllContacts(phoneB);
delay(2000);
if(phoneB.getPresenceState().compareTo("Undefined") == 0)
report.report("Presence state is not available on +" + contactNumber, Reporter.FAIL);
else
report.report("Presence is working normally on +" + contactNumber, ReportAttribute.BOLD);
report.report("Presence state should be automatic for begining on +" + contactNumber);
delay(3000);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
checkFullImageWithoutDateTime(phoneB, "PresenceAutomaticPhoneB", null);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneB.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_1, keypadDelay);
checkFullImageWithoutDateTime(phoneB, "PresenceAutomaticPhoneB", null);
phoneB.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
delay(3000);
if(!phoneB.checkPresenceState("Online"))
report.report("Presence state of +" + contactNumber + " is NOT be Available when automatic mode turn on", Reporter.FAIL);
report.report("Add a contact without E.164 in " + phoneC.getExtensionNumber());
addContactWithTrackPresence(phoneC, phoneA.getExtensionNumber(), true);
report.report("Add a contact with E.164 in " + phoneA.getExtensionNumber());
phoneC.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
switch(phoneC.getModelType()) {
case MODEL_9601:
phoneC.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneC.typeText("A", keypadDelay);
phoneC.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneC.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneC.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneC.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneC.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneC.typeNumber(contactNumber, dialKeypadDelay);
phoneC.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneC.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneC.typeText("A", keypadDelay);
phoneC.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneC.pressKey(OneXKey.SOFT_KEY_3, keypadDelay);
phoneC.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneC.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneC.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneC.typeNumber(contactNumber, dialKeypadDelay);
phoneC.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneC.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneC.typeText("A", keypadDelay);
phoneC.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay, 2);
phoneC.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneC.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneC.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneC.typeNumber(contactNumber, dialKeypadDelay);
phoneC.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay);
phoneC.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
report.report("Contacts are created");
delay(5000);
checkFullImageWithoutDateTime(phoneC, "ContactsWithE.164AndWithout", null);
delay(10000);
report.report("Check condition of Presence State on contacts with and without E.164 Handle");
delay(15000);
if(phoneC.getContactsScreenLines()[0].contains(phoneA.getPresenceState().toLowerCase()))
report.report("Presence state of contact " + phoneA.getExtensionNumber() +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is the same");
else {
phoneA.pressKey(OneXKey.PHONE, keypadDelay);
delay(5000);
phoneA.pressKey(OneXKey.PHONE, keypadDelay);
if(phoneC.getContactsScreenLines()[0].contains(phoneA.getPresenceState().toLowerCase()))
report.report("Presence state of contact " + phoneA.getExtensionNumber() +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact " + phoneA.getExtensionNumber() +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
}
delay(10000);
if(phoneC.getContactsScreenLines()[1].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber + " and this contact in address book of " + phoneC.getExtensionNumber() + " the same");
else {
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
report.report("Wait when presence can update...");
delay(20000);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
if(phoneC.getContactsScreenLines()[1].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber + " and this contact in address book of " + phoneC.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact +" + contactNumber + " and this contact in address book of " + phoneC.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
}
Random rand = new Random();
int randPresence = rand.nextInt(3) + 1;
report.report("Change presence state on(without E.164) " + phoneA.getExtensionNumber());
phoneA.pressKey(OneXKey.MENU, keypadDelay);
switch(phoneA.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneA.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
break;
}
switch(randPresence) {
case 1:
report.report("Presence state of " + phoneA.getExtensionNumber() + " will be AVAILABLE", ReportAttribute.BOLD);
break;
case 2:
report.report("Presence state of " + phoneA.getExtensionNumber() + " will be BUSY", ReportAttribute.BOLD);
break;
case 3:
report.report("Presence state of " + phoneA.getExtensionNumber() + " will be AWAY", ReportAttribute.BOLD);
break;
}
delay(5000);
switch(phoneA.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, randPresence);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
checkFullImageWithoutDateTime(phoneA, "ChangePresenceWithoutE.164", null);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
if(randPresence == 1)
phoneA.touch(OneXScreenObject.LINE_APPEARANCE_2, keypadDelay);
if(randPresence == 2)
phoneA.touch(OneXScreenObject.LINE_APPEARANCE_3, keypadDelay);
if(randPresence == 3)
phoneA.touch(OneXScreenObject.LINE_APPEARANCE_4, keypadDelay);
checkFullImageWithoutDateTime(phoneA, "ChangePresenceWithoutE.164", null);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
phoneA.pressKey(OneXKey.PHONE, keypadDelay);
delay(5000);
if(phoneC.getContactsScreenLines()[0].contains(phoneA.getPresenceState().toLowerCase()))
report.report("Presence state of contact " + phoneA.getExtensionNumber() +
" and this contact in address book of " + phoneC.getExtensionNumber() + " the same");
else {
phoneA.pressKey(OneXKey.PHONE, keypadDelay);
delay(5000);
phoneA.pressKey(OneXKey.PHONE, keypadDelay);
if(phoneC.getContactsScreenLines()[0].contains(phoneA.getPresenceState().toLowerCase()))
report.report("Presence state of contact " + phoneA.getExtensionNumber() +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact " + phoneA.getExtensionNumber() +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
}
delay(5000);
report.report("Change presence state on(with E.164) +" + contactNumber);
phoneB.pressKey(OneXKey.MENU, keypadDelay);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
break;
}
randPresence = rand.nextInt(3) + 1;
switch(randPresence) {
case 1:
report.report("Presence state of +" + contactNumber + " will be AVAILABLE", ReportAttribute.BOLD);
break;
case 2:
report.report("Presence state of +" + contactNumber + " will be BUSY", ReportAttribute.BOLD);
break;
case 3:
report.report("Presence state of +" + contactNumber + " will be AWAY", ReportAttribute.BOLD);
break;
}
delay(5000);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, randPresence);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
checkFullImageWithoutDateTime(phoneB, "ChangePresenceWithE.164", null);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
if(randPresence == 1)
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_2, keypadDelay);
if(randPresence == 2)
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_3, keypadDelay);
if(randPresence == 3)
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_4, keypadDelay);
checkFullImageWithoutDateTime(phoneB, "ChangePresenceWithE.164", null);
phoneB.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
delay(5000);
if(phoneC.getContactsScreenLines()[1].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is the same");
else {
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
delay(7000);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
if(phoneC.getContactsScreenLines()[1].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneC.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
}
}
catch(Exception e) {
reportException(e);
}
finally {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
deleteAllContacts(phoneC);
checkFullImageWithoutDateTime(phoneA, "IdleAfterTest", null);
checkFullImageWithoutDateTime(phoneB, "IdleAfterTest", null);
checkFullImageWithoutDateTime(phoneC, "IdleAfterTest", null);
}
}
/**
* Test Case
* Check, that Presence state "Automatic" of extension,
* which has E.164 handle in profile and Presence state of this contact in address book of other extension are similar
* Setup:
* Phone A; Phone B
* 1. Phone A - watcher
* 2. User X has E.164 handle in profile
* Scenario:
* 1. Phone B login to user X
* 2. Phone A adds user X in address book
* 3. Check that presence state on topline of E.164 extension and presence state of this contact in address
* book of watcher are the same
*
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Comprasion of Presence state Automatic of extension, that has E.164 handle in profile with Presence state of this extension in address book of other extension", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void compareAutomaticPresenceState() throws Exception {
try {
report.report("Initialization of " + phoneA.getExtensionNumber());
phoneInit(phoneA, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
updateImagesDatabasePath();
deleteAllContacts(phoneA);
report.report("Login to extension with E.164 handle");
logoutFromAMenu(phoneB);
switch(phoneB.getModelType()) {
case MODEL_9601:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, keypadDelay, 12);
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12); // enter "+"
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay);
break;
}
loginAfterLogoutFromAMenu(phoneB, contactNumber, phoneA.getPassword());
delay(2000);
report.report("Initialization of +" + contactNumber);
phoneInit(phoneB, true);
phoneB.getCAState(1, 100);
phoneB.getCAState(2, 100);
phoneB.getCAState(3, 100);
report.report("Add contact with E.164 in " + phoneA.getExtensionNumber());
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
switch(phoneA.getModelType()) {
case MODEL_9601:
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_3, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay, 2);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
report.report("Contact is created");
delay(3000);
report.report("Wait till presence updates..");
delay(20000);
report.report("Check automatic presence state of +" + contactNumber);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneB.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_1, keypadDelay);
phoneB.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
delay(5000);
if(phoneA.getContactsScreenLines()[0].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
delay(3000);
deleteAllContacts(phoneA);
}
catch(Exception e) {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
reportException(e);
}
finally {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
}
}
/**
* Test Case
* Check, that Presence state "Available" of extension,
* which has E.164 handle in profile and Presence state of this contact in address book of other extension are similar
* Setup:
* Phone A; Phone B
* 1. Phone A - watcher
* 2. User X has E.164 handle in profile
* Scenario:
* 1. Phone B login to user X
* 2. Phone A adds user X in address book
* 3. Check that presence state on topline of E.164 extension and presence state of this contact in address
* book of watcher are the same
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Comprasion of Presence state of extension, that has E.164 handle in profile with Presence state of this extension in address book of other extension", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void compareAvailablePresenceState() throws Exception {
try {
report.report("Initialization of " + phoneA.getExtensionNumber());
phoneInit(phoneA, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
updateImagesDatabasePath();
deleteAllContacts(phoneA);
report.report("Login to extension with E.164 handle");
logoutFromAMenu(phoneB);
switch(phoneB.getModelType()) {
case MODEL_9601:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, keypadDelay, 12);
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12); // enter "+"
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay);
break;
}
loginAfterLogoutFromAMenu(phoneB, contactNumber, phoneA.getPassword());
delay(2000);
report.report("Initialization of +" + contactNumber);
phoneInit(phoneB, true);
phoneB.getCAState(1, 100);
phoneB.getCAState(2, 100);
phoneB.getCAState(3, 100);
report.report("Add contact with E.164 in " + phoneA.getExtensionNumber());
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
switch(phoneA.getModelType()) {
case MODEL_9601:
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_3, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay, 2);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
report.report("Contact is created");
delay(3000);
report.report("Wait till presence updates..");
delay(20000);
report.report("Check available presence state of +" + contactNumber);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneB.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_2, keypadDelay);
phoneB.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
delay(10000);
if(phoneA.getContactsScreenLines()[0].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
delay(3000);
deleteAllContacts(phoneA);
}
catch(Exception e) {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
reportException(e);
}
finally {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
/**
* Test Case
* Check, that Presence state "Busy" of extension,
* which has E.164 handle in profile and Presence state of this contact in address book of other extension are similar
* Setup:
* Phone A; Phone B
* 1. Phone A - watcher
* 2. User X has E.164 handle in profile
* Scenario:
* 1. Phone B login to user X
* 2. Phone A adds user X in address book
* 3. Check that presence state on topline of E.164 extension and presence state of this contact in address
* book of watcher are the same
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Comprasion of Presence state Busy of extension, that has E.164 handle in profile with Presence state of this extension in address book of other extension", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void compareBusyPresenceState() throws Exception {
try {
report.report("Initialization of " + phoneA.getExtensionNumber());
phoneInit(phoneA, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
updateImagesDatabasePath();
deleteAllContacts(phoneA);
report.report("Login to extension with E.164 handle");
logoutFromAMenu(phoneB);
switch(phoneB.getModelType()) {
case MODEL_9601:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, keypadDelay, 12);
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12); // enter "+"
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay);
break;
}
loginAfterLogoutFromAMenu(phoneB, contactNumber, phoneA.getPassword());
delay(2000);
report.report("Initialization of +" + contactNumber);
phoneInit(phoneB, true);
phoneB.getCAState(1, 100);
phoneB.getCAState(2, 100);
phoneB.getCAState(3, 100);
report.report("Add contact with E.164 in " + phoneA.getExtensionNumber());
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
switch(phoneA.getModelType()) {
case MODEL_9601:
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_3, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay, 2);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
report.report("Contact is created");
delay(3000);
report.report("Wait till presence updates..");
delay(20000);
report.report("Check busy presence state of +" + contactNumber);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 2);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneB.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_3, keypadDelay);
phoneB.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
delay(5000);
if(phoneA.getContactsScreenLines()[0].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
delay(3000);
deleteAllContacts(phoneA);
}
catch(Exception e) {
reportException(e);
}
finally {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
}
}
/**
* Test Case
* Check, that Presence state "Away" of extension,
* which has E.164 handle in profile and Presence state of this contact in address book of other extension are similar
* Setup:
* Phone A; Phone B
* 1. Phone A - watcher
* 2. User X has E.164 handle in profile
* Scenario:
* 1. Phone B login to user X
* 2. Phone A adds user X in address book
* 3. Check that presence state on topline of E.164 extension and presence state of this contact in address
* book of watcher are the same
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Comprasion of Presence state Away of extension, that has E.164 handle in profile with Presence state of this extension in address book of other extension", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void compareAwayPresenceState() throws Exception {
try {
report.report("Initialization of " + phoneA.getExtensionNumber());
phoneInit(phoneA, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
updateImagesDatabasePath();
deleteAllContacts(phoneA);
report.report("Login to extension with E.164 handle");
logoutFromAMenu(phoneB);
switch(phoneB.getModelType()) {
case MODEL_9601:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, keypadDelay, 12);
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12); // enter "+"
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay);
break;
}
loginAfterLogoutFromAMenu(phoneB, contactNumber, phoneA.getPassword());
delay(2000);
report.report("Initialization of +" + contactNumber);
phoneInit(phoneB, true);
phoneB.getCAState(1, 100);
phoneB.getCAState(2, 100);
phoneB.getCAState(3, 100);
report.report("Add contact with E.164 in " + phoneA.getExtensionNumber());
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
switch(phoneA.getModelType()) {
case MODEL_9601:
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_3, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay, 2);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
report.report("Contact is created");
delay(3000);
report.report("Wait till presence updates..");
delay(20000);
report.report("Check available presence state of +" + contactNumber);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneB.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_4, keypadDelay);
phoneB.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
delay(5000);
if(phoneA.getContactsScreenLines()[0].contains(phoneB.getPresenceState().toLowerCase()))
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
delay(3000);
deleteAllContacts(phoneA);
}
catch(Exception e) {
reportException(e);
}
finally {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
}
}
/**
* Test Case
* Check, that Presence state "Do Not Disturb" of extension,
* which has E.164 handle in profile and Presence state of this contact in address book of other extension are similar
* Setup:
* Phone A; Phone B
* 1. Phone A - watcher
* 2. User X has E.164 handle in profile
* Scenario:
* 1. Phone B login to user X
* 2. Phone A adds user X in address book
* 3. Check that presence state on topline of E.164 extension and presence state of this contact in address
* book of watcher are the same
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Comprasion of Presence state Do Not Disturb of extension, that has E.164 handle in profile with Presence state of this extension in address book of other extension", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void compareDoNotDisturbPresenceState() throws Exception {
try {
report.report("Initialization of " + phoneA.getExtensionNumber());
phoneInit(phoneA, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
updateImagesDatabasePath();
deleteAllContacts(phoneA);
report.report("Login to extension with E.164 handle");
logoutFromAMenu(phoneB);
switch(phoneB.getModelType()) {
case MODEL_9601:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, keypadDelay, 12);
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12); // enter "+"
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay);
break;
}
loginAfterLogoutFromAMenu(phoneB, contactNumber, phoneA.getPassword());
delay(2000);
report.report("Initialization of +" + contactNumber);
phoneInit(phoneB, true);
phoneB.getCAState(1, 100);
phoneB.getCAState(2, 100);
phoneB.getCAState(3, 100);
report.report("Add contact with E.164 in " + phoneA.getExtensionNumber());
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
switch(phoneA.getModelType()) {
case MODEL_9601:
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_3, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay, 2);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
report.report("Contact is created");
delay(3000);
report.report("Wait till presence updates..");
delay(20000);
report.report("Check do not disturb presence state of +" + contactNumber);
switch(phoneB.getModelType()) {
case MODEL_9601:
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.NAVIGATION_UP, keypadDelay, 6);
phoneB.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 4);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
case MODEL_9641:
phoneB.pressKey(OneXKey.MENU, keypadDelay);
phoneB.touch(OneXScreenObject.AMENU_MY_PRESENCE, keypadDelay);
phoneB.touch(OneXScreenObject.NAVIGATION_UP, keypadDelay, 2);
phoneB.touch(OneXScreenObject.LINE_APPEARANCE_5, keypadDelay);
phoneB.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneB.pressKey(OneXKey.PHONE, keypadDelay);
break;
}
delay(5000);
// "dnd" in getContactsScreenLines = "Do Not Distrurb" in getPresenceState
if(phoneA.getContactsScreenLines()[0].contains("dnd"))
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is the same");
else
report.report("Presence state of contact +" + contactNumber +
" and this contact in address book of " + phoneA.getExtensionNumber() + " is NOT the same", Reporter.FAIL);
delay(3000);
deleteAllContacts(phoneA);
}
catch(Exception e) {
reportException(e);
}
finally {
logoutFromAMenu(phoneB);
loginAfterLogoutFromAMenu(phoneB, phoneB.getExtensionNumber(), phoneB.getPassword());
}
}
/**
* Test Case
* Check, that Presence state "Out Of Office" of extension,
* which has E.164 handle in profile and Presence state of this contact in address book of other extension are similar
* Setup:
* Phone A; Phone B
* 1. Phone A - watcher
* 2. User X has E.164 handle in profile
* Scenario:
* 1. Phone B login to user X
* 2. Phone A adds user X in address book
* 3. Check that presence state on topline of E.164 extension and presence state of this contact in address
* book of watcher are the same
* @throws Exception
* @author mchugun
*/
@Test
@TestProperties(name = "Comprasion of Presence state Out Of Office of extension, that has E.164 handle in profile with Presence state of this extension in address book of other extension", paramsInclude = {"ImagesDatabaseFolderName",
"ScreenshotMode", "contactNumber"})
public void compareOutOfOfficePresenceState() throws Exception {
try {
report.report("Initialization of " + phoneA.getExtensionNumber());
phoneInit(phoneA, true);
phoneA.getCAState(1, 100);
phoneA.getCAState(2, 100);
phoneA.getCAState(3, 100);
updateImagesDatabasePath();
deleteAllContacts(phoneA);
report.report("Login to extension with E.164 handle");
logoutFromAMenu(phoneB);
switch(phoneB.getModelType()) {
case MODEL_9601:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, keypadDelay, 12);
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneB.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12); // enter "+"
phoneB.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
break;
case MODEL_9641:
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay, 3);
phoneB.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneB.touch(OneXScreenObject.SOFT_KEY_2, keypadDelay);
break;
}
loginAfterLogoutFromAMenu(phoneB, contactNumber, phoneA.getPassword());
delay(2000);
report.report("Initialization of +" + contactNumber);
phoneInit(phoneB, true);
phoneB.getCAState(1, 100);
phoneB.getCAState(2, 100);
phoneB.getCAState(3, 100);
report.report("Add contact with E.164 in " + phoneA.getExtensionNumber());
phoneA.pressKey(OneXKey.ADDRESS_BOOK, keypadDelay);
switch(phoneA.getModelType()) {
case MODEL_9601:
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9608:
case MODEL_9611:
phoneA.pressKey(OneXKey.SOFT_KEY_2, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_DOWN, keypadDelay, 3);
phoneA.pressKey(OneXKey.SOFT_KEY_3, keypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_1, keypadDelay);
phoneA.pressKey(OneXKey.NAVIGATION_RIGHT, keypadDelay, 4);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.pressKey(OneXKey.SOFT_KEY_0, keypadDelay);
break;
case MODEL_9641:
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
phoneA.typeText("A", keypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay, 2);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.pressKey(OneXKey.KEY_1, dialKeypadDelay, 12);
phoneA.touch(OneXScreenObject.KEYBOARD_123, keypadDelay);
phoneA.typeNumber(contactNumber, dialKeypadDelay);
phoneA.touch(OneXScreenObject.KEYBOARD_ENTER, keypadDelay);
phoneA.touch(OneXScreenObject.SOFT_KEY_0, keypadDelay);
break;
}
report.report("Contact is created");
...Подобные документы
История возникновения тестирования программного обеспечения, основные цели и особенности его проведения. Виды и типы тестирования, уровни его автоматизации. Использование и исследование необходимых технологий. Полный цикл прогона всей системы мониторинга.
дипломная работа [1,7 M], добавлен 03.05.2018История развития и виды тестирования программного обеспечения. Инсталляционное, регрессионное, конфигурационное, интеграционное, локализационное, модульное тестирование. Методы сокращения трудоемкости модульного тестирования разрабатываемого приложения.
курсовая работа [309,5 K], добавлен 16.12.2015Неразрешимость проблемы тестирования программного обеспечения. Виды и уровни тестирования. Стратегии восходящего и нисходящего тестирования. Методы "белого" и "черного" ящика. Автоматизированное и ручное тестирование. Разработка через тестирование.
курсовая работа [112,2 K], добавлен 22.03.2015Тестирование как составляющая часть процесса отладки программного обеспечения, его роль для обеспечения качества продукта. Обнаружение ошибок в программах, выявление причин их возникновения. Подходы к формулированию критериев полноты тестирования.
курсовая работа [1,6 M], добавлен 20.12.2012Изучение различных видов тестирования программного обеспечения. Выявление в программной системе скрытых дефектов до того, как она будет сдана заказчику. Тестирование методом черного ящика. Требования, предъявляемые к процессу тестирования больших систем.
курсовая работа [3,0 M], добавлен 19.11.2009Комплексное функциональное и структурное тестирование программного продукта - граф-программа решения квадратного уравнения. Постановка задачи структурного тестирования маршрутов. Заключение о типе и причине ошибки, предложение по ее исправлению.
курсовая работа [2,8 M], добавлен 05.01.2013Тестирование и отладка программного обеспечения: понятие, принципы, этапы, цели и задачи. Тестирование методом сандвича как компромисс между восходящим и нисходящим подходами. Сущность метода "белого и черного ящика", отладки программного обеспечения.
курсовая работа [36,9 K], добавлен 21.07.2012Проектирование базы данных, информационной подсистемы PLC-Tester, модуля тестирования и web-приложения. Разработка логической структуры программного продукта и общие требования к техническому обеспечению. Запуск программы и описание тестовых прогонов.
дипломная работа [3,2 M], добавлен 30.06.2011Реализация программного средства "Действия над матрицами". Разработка кода программного продукта на основе готовой спецификации на уровне модуля. Использование инструментальных средств на этапе отладки программного модуля. Выбор стратегии тестирования.
отчет по практике [296,1 K], добавлен 19.04.2015Возможности среды программирования delphi при разработке приложения с визуальным интерфейсом. Разработка спецификации программного обеспечения и на ее основе кода программного продукта. Отладка программы "трассировкой", ее тестирование и оптимизация.
курсовая работа [501,4 K], добавлен 07.12.2016Выбор инструментальной среды разработки программного обеспечения системы. Алгоритм создания теста и ввода его исходных данных. Анализ экономической эффективности применения программного обеспечения "Тестирования знаний обучающихся программированию".
дипломная работа [3,2 M], добавлен 11.09.2014Сравнительный анализ технологий тестирования. Разработка программного модуля "Интеллектуальная обучающая система для широкого перечня курсов". Обоснование необходимости и важности этапа отладки в процессе разработки данного программного обеспечения.
дипломная работа [101,2 K], добавлен 17.06.2011Схемы взаимодействия между заказчиком и разработчиком программного обеспечения. Качество программного обеспечения и определение основных критериев его оценка на современном этапе, особенности управления на стадиях жизненного цикла, анализ достаточности.
презентация [114,7 K], добавлен 14.08.2013Понятие и специфика автоматизированных систем. Описание методики разработки программы для автоматизации. Ее тестирование и отладка. Внедрение АС в работу предприятия. Расчет экономического эффекта от разработки и реализации программного продукта.
дипломная работа [1,4 M], добавлен 23.06.2015Общие сведения об исследуемой организации, направления ее хозяйственной деятельности, характеристика используемой вычислительной техники и программного обеспечения. Разработка пользовательского интерфейса, шаблонов, отладка и тестирование программы.
отчет по практике [159,3 K], добавлен 11.04.2016Разработка программного обеспечения, предназначенного для автоматизации деятельности туристической фирмы. Анализ и проектирование базы данных предметной области. Создание концептуальной, логической и физической моделей данных и программы их обработки.
курсовая работа [816,5 K], добавлен 05.02.2018Особенности аналитической и эмпирической моделей надежности программных средств. Проектирование алгоритма тестирования и разработка программы для определения надежности ПО моделями Шумана, Миллса, Липова, с использованием языка C# и VisualStudio 2013.
курсовая работа [811,5 K], добавлен 29.06.2014Изучение основных видов угроз программного обеспечения. Выявление наиболее эффективных средств и методов защиты программного обеспечения. Анализ их достоинств и недостатков. Описания особенностей лицензирования и патентования программного обеспечения.
курсовая работа [67,9 K], добавлен 29.05.2013Создание программного обеспечения в среде Visual Basic for Applications для проведения теста по работе полушарий мозга человека. Описание команд. Разработка интерфейса и тестирование программы. Листинг приветствия и задаваемых пользователю вопросов.
курсовая работа [387,1 K], добавлен 09.03.2014Процесс обучения ИТ-специалистов технологии MSF. Разработка информационной системы, моделирующей поведение "тестируемой программы" на стадии стабилизации для проведения практических занятий. Технология нефункционального тестирования, ее преподавание.
дипломная работа [2,3 M], добавлен 31.05.2016