Demo App | ||
A | Requirement : | |
1 | Eclipse 3.7 | |
2 | ADT Plugin | |
3 | Android SDK | |
4 | MonkeyTalk (For Automation) | |
5 | ADJT Plugin | |
B | Test Scenarios | |
TestCase | Expected Result | |
1 | Login Tab | |
i | Verified the length of username and password field | Username and Password field should accept values of 4 character and more (for less than 4 character it should show message) |
ii | Verify the login page title after clicking on the login tab | It should be “Login” |
iii | Verified that the pre-filled gray text appear and is it aligned correctly in the fields | It is observed that expected pre-filled gray text appears with correct allignment |
iv | Verified the error message appears in case of any field left blank | Error message “Sorry! Username must be 4 or more characters.” should be shown |
v | Verified that Username and password field get highlighted when the cursor is in that field | The field should get highlighted when the cursor is in that field |
vi | Verify the welcome message after login | Welcome message should be shown as “Welcome, Username! |
vii | Log out as a user | It should be properly redirect to the Login page |
viii | Verified the aligment of each field on login screen and welcome screen | Alignment of each field should be proper. |
ix | Verify the spelling mistakes/typos | There should not be any spelling mistakes/typos |
2 | Forms Tab | |
TestCase | Expected Result | |
i | Verify the form page title after clicking on the login tab | It should be “Forms” |
ii | Check whether it should allow the user to select only one Radio button at a time i.e A,B or C | One option out off A,B ,C should be selected. |
iii | Verify that Selected Radio button option get highlighted | Selected Radio button should be highlighted by different color. |
iv | Check and Uncheck the check box control | ON lable and green tick sign should be appear for checked chechbox and OFF lable and no sign should be appear for unchecked chechbox |
v | Check the alignment of the label for the check box | Alignment should be proper. |
vi | Verified that on clicking on dropdown a list having some values should be displayed | Dropdown list with some values should be displayed |
vii | Verify that dropdown list is scrollable | List should be scrollable |
viii | Verify that Selected value of dropdownlist is display in textfield | Selected value of dropdownlist should displayed in textfield |
ix | Verify that dropdown values is non editable | Dropdown values should not be editable by user. |
x | Verify that we should not be able to type text in the box | |
xi | Verified that dropdown values should be Displayed according to the Atomic number | |
xii | Verify the minimum and maximum limit og slider | It should be 0-100 |
xiii | Verifiy the selected values of dropdown,radio button,checkbox and slider are displayed below the slider control | selected values of dropdown,radio button,checkbox and slider should be displayed below the slider control and separated by pipe symbol |
xiv | Verify that tabbing is correct | Tabbing should be proper |
xv | Verify the spelling mistakes/typos | There should not be any spelling mistakes/typos |
xvi | Verifiy the aligment of each field onForms screen | Alignment of each field should be proper. |
3 | Hierarchy Tab | |
TestCase | Expected Result | |
i | Verified that on clicking on Hierarchy tab a list/table having some values should be displayed | List /Table with some values should be displayed . |
ii | Verified that List /Table values should be Displayed according to the Atomic number | |
iii | Verify that List /Table is scrollable | List /Table should be scrollable |
iv | Verify that only one value can be selected from List /Table | |
v | Verify that after selecting a value or element from list all information regarding that element is displayed | All information(Atomic no,Full name of element etc) regarding that element should be displayed |
vi | Verify the spelling mistakes/typos | There should not be any spelling mistakes/typos |
vii | Verifiy the aligment of each item/value on Hierarchy screen | Alignment of each element should be proper. |
4 | Web Tab | |
TestCase | Expected Result | |
i | Verified that the pre-filled text appear and is it aligned correctly in the fields | Pre-filled text should appear and it should aligned correctly in the fields |
ii | Verified that fields get highlighted when the cursor is in that field | Fields should get highlighted when the cursor is in that field |
iii | Verified that on clicking on dropdown a list having some values should be displayed | Dropdown list with some values should be displayed |
iv | Verify that Selected value of dropdownlist is display in textfield | Selected value of dropdownlist should displayed in textfield |
v | Verify that we can select only one value from dropdown | One value should be selected at a time |
vi | Verify that dropdown values is non editable | Dropdown values should not be editable by user. |
vii | Check whether it should allow the user to select only one Radio button at a time i.e A,B or C | One option out off A,B ,C should be selected. |
viii | Verify that Selected Radio button option get highlighted | Selected Radio button should be highlighted by different color. |
ix | Check and Uncheck the check box control | ON lable and green tick sign should be appear for checked chechbox and OFF lable and no sign should be appear for unchecked chechbox |
x | Check the alignment of the label for the check box | Alignment should be proper. |
xi | Verify that after clicking on GO button after filling all fields information of all fields is appear | Information or fields data should appear in output section |
xii | Verify that tabbing is correct | Tabbing should be proper |
xiii | Verify the spelling mistakes/typos | There should not be any spelling mistakes/typos |
xiv | Verifiy the aligment of each field on web screen | Alignment of each field should be proper. |
5 | Versions of Android | |
TestCase | Expected Result | |
i | Test the app on all suppored versions of Android | App should work as expected on all supported versions of Android. |
Posts Tagged ‘Login’
MonkeyTalk Modifiers
Posted: October 4, 2012 in Android, Automation, MonkeytalkTags: ignore, Login, modifier, MonkeyTalk, retrydelay, Scripts, thinktime, timeout
MonkeyTalk Modifiers:
Modifiers are optional in command, you can use it when you needed.
Modifiers can be written as %name=value. Where the % prefix identifies it as a Modifier. There are various types of modifiers are available in MaonkeyTalk.
- %timeout
- %thinktime
- %retrydelay
- %ignore
1. %timeout Modifier:
%timeout Modifier is used for how long in ms to continue retrying a command before timing out.Written as %timeout=TIME_IN_MILLISECONDS.
Use of %timeout Modifier:
Button LOGIN Verify LOGIN %timeout=3000
2. %thinktime Modifier:
%thinktime Modifier is used for how long in ms to wait before executing the command for the first time.You can use this modifier to simulate human reaction time.
Written as %thinktime=TIME_IN_MILLISECONDS.
Use of %thinktime Modifier:
Button LOGOUT tap %thinktime =3000
3. %retrydelay :
%retrydelay is used for how long in ms to delay between retry attempts.
Written as %retrydelay=TIME_IN_MILLISECONDS.
Use of % retrydelay Modifier:
Button LOGOUT tap %retrydelay
4. %ignore Modifier:
%ignore modifier” can skip commands. It can also skip tests and setup/teardown on individual tests within the suite.
Use of %ignore Modifier:
Suppose you want to ignore the command then add the “%ignore=true” as argument at the end of the command.
For example: Label * Verify “Welcome, test!” %ignore=true
If you want to ignore a Test in a test suite then use
Test Script.mt Run %ignore=true
You can use same for SetUp and TearDown.
A Simple Script which having all these modifiers is given below:
In MonkeyTalk Form:
Input username tap
Input username EnterText test
Input password EnterText test
Button LOGIN Verify LOGIN %timeout=3000
Button LOGIN tap %thinktime=2000
Label * Verify “Welcome, test!” %thinktime=3000
Button LOGOUT Verify LOGOUT %thinktime=3000
Button LOGOUT tap %retrydelay
Result:
17:37:31.168: Connection set to Android Emulator or Tethered Device
17:37:42.725: Started Script Playback
17:37:42.733: Input username tap
17:37:43.455: Input username EnterText test
17:37:44.159: Input password EnterText test
17:37:44.956: Button LOGIN Verify LOGIN %timeout=3000
17:37:45.666: Button LOGIN tap %thinktime=2000
17:37:47.918: Label * Verify “Welcome, test!” %thinktime=3000
17:37:52.226: Button LOGOUT Verify LOGOUT %thinktime=3000
17:37:55.367: Button LOGOUT tap %retrydelay
17:37:56.133: Completed Script Playback – OK
You can also view tabular form of this Script in below given screenshot:
</ (more…)
MonkeyTalk Simple Script
Posted: September 5, 2012 in Automation, MonkeytalkTags: Automation, Login, MonkeyTalk, MonkeyTalk Simple Script, Programming, script
MonkeyTalk Simple Script:
MonkeyTalk script consists of some commands and having extension .mt.
Example:
Simple example/Script for login is as follows:
MonkeyTalk form:
Input username tap
Input username EnterText test1
Input password EnterText test1
Button LOGIN tap %thinktime=3000
Button LOGOUT tap %thinktime=3000
Javascript form:
load(“libs/<monkey_project_name>.js”);
<monkey_project_name>. <script_name>.prototype.run = function() {
this.app.input(“username”).tap();
this.app.input(“username”).enterText(“test1”);
this.app.input(“password”).enterText(“test1”);
this.app.button(“LOGIN”).tap({thinktime:”3000″});
this.app.button(“LOGOUT”).tap({thinktime:”3000″});
}
You can add comment in your MonkeyTalk script. for example:
# simple login script
Input username tap
Input username EnterText test1
Input password EnterText test1
Button LOGIN tap %thinktime=3000
Button LOGOUT tap %thinktime=3000
Currently, MonkeyTalk test scripts can be converted to Javascript. No other language bindings are supported.