Archive for the ‘Android’ Category

  • Verified that the link takes you to the page it said it would.
  • Ensure to have no orphan pages (a page that has no links, on buttons, tabs
  • etc to it)
  • Ensure that all referenced links or email addresses must be hyperlinked.
  • Check all mailto links and whether it reaches properly
  • Ensure that all the data’s inside combo/list box must be arranged in chronological order.
  • Check the maximum field lengths to ensure that there should not any truncated characters.
  • Assure that leap years are validated correctly & do not cause errors/miscalculations.
  • Include value zero in all calculations.
  • Assure that upper and lower values in ranges are handled correctly. (Using BVA)
  • Each field should get highlighted when the cursor is in that field.
  • Default values on page load/reload (Also terms and conditions should be disabled)
  • Ensure that division by zero does not occur.
  • Navigation should work correctly with the input methods offered by the device.
  • An application for a touch device should use touch interaction to navigate all functions/screens of the application, e.g. tapping buttons, navigating lists etc.
  • Ensure that all interactive elements such as buttons must respond to touch interaction on first use. It must not be difficult to touch an interactive element, such as a button, link, image, etc.
  • Checks weather all requirements and checkpoints are covered.
  • Give multiple inputs (Text inputs) at a time and the app should work according to that.
  • Check the app weather it syncs with native functionalities.
  • Whether checks for optional and mandatory fields carried out like a mandatory field should not be left blank and an optional should allow the user to skip the field.
  • Closing of the application should result in “Are you sure?” message.(Depends upon app)
  • Verify if the application continuous from the same place after minimizing and restarting it.
  • Ensure that home page of an app should be loaded quickly within 8 seconds.
  • If the device is tilted from portrait mode to landscape mode and vice versa, the app should self adjust as per the device resolution (condition: if the application supports both landscape and portrait modes).
  • If the device is tilted from portrait mode to landscape mode, the screen should display an error message asking the user to switch the device back to landscape mode or the screen resolution should not change (condition: if the application supports only portrait mode)
  • If the device is tilted from landscape mode to portrait mode, the screen should display an error message asking the user to switch the device back to portrait mode or the screen resolution should not change (condition: if the application supports only landscape mode)
  • Verify the functionality for the Background music [If any]
    • When music running in the background of the App/game
    • App goes into idle mode
    • When app comes from the idle mode

Expected behavior: Background music should be running.

  • When the Application uses network capabilities, it must be able to handle network delays and any loss of connection.
    Launch the Application.
    Start the network access from the Application.
    Put the phone in a place where there connection will be lost.
    Observe the result.
    Expected behavior: The Application will work until time out and then give an error message to the user indicating there was an error with the connection.
  • When the Application uses network capabilities, it must be able to handle the device being in Airplane mode.
    Set the device to Airplane mode
    Start the Application.
    Observe the result.
    Expected behavior: The Application will give a meaningful error message to indicate that the device is in Airplane mode and the application cannot run successfully.
  • Verify for the Network Reachebility.
    Expected behavior: Popup should be detect when the network is unavailable and provide a (pop-up) message informing the user.
  • Verify the Materials or Advertisements.
    Expected behavior: Marketing materials or advertisements should not be there at the app (app will be rejected)
Advertisements

Test Cases for Android Apps (Test Cases Regarding External Influence):

Senario no.1

Ensure that the Application works correctly following a memory card insertion action when the Application is suspended and resumed.

Steps to Scenario:

1. Launch the Application.

2. Suspend Application

3. Insert the memory card into the phone, and mount the card.

4. Fill the card to its capacity

5. Unmount the memory card.

6. Resume and operate the Application

Expected Result:

The Application continues to operate as designed based on the Application specification and is not affected by the memory card insertion or mounting/unmounting.

Scenario no.2

Ensure that the Application works correctly during a memory card insertion and removal.

Steps to Scenario:

1. Launch the Application.

2. Insert and remove the memory card.

3. Verify that Application works correctly.

Expected Result:

1. The Application should work correctly following memory card insertion.

2. The Application should work correctly with memory card removed.

Scenario no.3

Ensure that the Application with memory card functional screens works correctly with memory card inserted and removed.

Steps to Scenario:

1. Launch the Application.

2. Navigate to screen where Application works with memory card.

3. Insert the memory card.

4. Verify that Application works correctly.

5. Remove the memory card.

Expected Result:

1. The Application should work correctly following memory card insertion.

2. The Application should work correctly following memory card removal.

Test Cases for Android Apps (Test Cases Regarding Storage):

a) Storage/Cache (verification points)

Go to the Device>Settings> App>

Here, all the Downloaded apps will be listed. It will show the location of app whether its Downloaded on internal memory, SD Card or currently in Running status.

Test Cases for category a):

1. Verify how much memory space (internal/SD Card) occupied by app.

(Occupied space shown just below the App name.)

2. Click on the app> it will redirect to the ‘App Info’ page

(I) we can verify here whether the App name and App version is as per the requirement

(ii) Under ‘Storage’ section:

a) Verify the ‘Total’ space occupied by the App, it should be as per the requirement

b) Verify ‘App’ storage, it should be as per the requirement

c) USB storage app: verify whether it occupies the space as expected

d) Data: verify whether the app uses the defined limit of data while running

e) SD Card: If app is installed in SD Card, very that app occupy as per the expected space

f) Cache: verify that cache space should be as expected (notice the behavior of app if cache space exceeded)

b ) App Storage

Test Cases for category b)

1.On installing the app into device, it should occupy the expected space

2.On moving app to SD Card, it should release the internal memory

3.On uninstalling the app from the device, it should released all the occupied memory (saved files that contain games level, application setting etc should be released)

4.If cache exceeded from expected memory, check the behaviour of app

5.If app provide the upgrade option (like Skype, Facebook etc) then check whether app provide the details of the size which it suggest for upgrading (if device memory will be less and we start upgrading then check whether app prompt the message regarding less memory or app crashes out)

MonkeyTalk all Actions/methods  with their Description and Examples:

MonkeyTalk Action Description Example for android
Device Rotate This method is used for Change the device orientation.
Android:Landscape,Portrait
Ios:Left,Right
Device *  Rotate Landscape
Back iOS: Pops the current UINavigationItem (if there is one)
Android: Presses the hardware device key
Device *  back
forward iOS: Pushes the next UINavigationItem, if there is one
Android: ignored.
N/A on Android.
search iOS: ignored.
Android: Presses the device search key.
Device *  Search
Screenshot This method is used to create screenshot folder in running project and we can capture screenshot at any point Device *  Screenshot
Menu Android: Presses the device menu key.
iOS: ignored
Device * Menu
Shake This method is used for specific apps.  Device * Shake
Get This method returns “iOS” or “Android”. Device * Get a
Table Select This method is used to select an element from the table. Table * Select Boron
SelectRow Select a row.
row – the row to select
section – the section containing the row. (Ignored on Android).
Where row and section are arguments.
ScrollToRow(by row) Scroll to a row by row number.
Row – the row to select
section – the section containing the row. (Ignored on Android).
Where row and section are arguments and both args should be integer.
ScrollToRow(by Value) Scroll to a row by value.
value (int)- the value of the row to scroll to.
SetEditing Enable/disable table editing. iOS: Enabled editing mode for table. Android: ignored. N/A on Android.
Insert Insert a row into the table. iOS: Inserts a row. Android: Ignored. N/A on Android.
Remove Remove a row from the table.  iOS: Deletes the row. Android: Ignored. N/A on Android.
Move Move a row. iOS: Moves a row. Android: Ignored N/A on Android.
SelectIndex Selects an item by index. Table * SelectIndex 3
Where 3 is item no i.e index and index should be integer.
LongSelectIndex Long press an item by index. Table * LongSelectIndex 4
Where 4 is item no i.e index and index should be integer.
View verify Verifies that a property of the component has some expected value.If  Expected value is null then it  verifies the existence of the component. Syntax: ComponentType MonkeyId  Verify arg
where for argument pass expected value for verification and componenttype can be any component of monkeytalk like label,button,tabbar etc.
Example: Label #1 Verify “Welcome, test!” %thinktime=8000
Label LOGOUT Verify LOGOUT %thinktime=3000
or
View  LOGOUT Verify LOGOUT %thinktime=3000
verifyNot Verifies that a property of the component does not have some value.If  Expected value is null then it  verifies the non-existence of the component. ComponentType MonkeyId  VerifyNot arg
Label LOGOUT VerifyNot Login %thinktime=3000
or
View LOGOUT VerifyNot Login %thinktime=3000
verifyRegex Verifies that a property of the component matches some regular expression.
verifyNotRegex Verifies that a property of the component does not have a value matching a regular expression
verifyWildcard  Verifies that a property of the component does have a value matching some wildcard expression
verifyNotWildcard  Verifies that a property of the component does not have a value matching some wildcard expression
Get Retrieves a property value from the component Syntax: ComponentType MonkeyId Get Variable PropPath
Example: Button LOGIN Get b :text
Label #1 Get a
Tap Taps on the component. On Android, plays a “click”. On iOS, plays a TouchDown/TouchMove/TouchUp sequence. Button LOGOUT Tap
Swipe Swipe(scroll)  the component in direction Left, Right, Up, or Down (case insensitive) WebView webview swipe Down
Table * Swipe Up
Slider * Swipe Right
Drag Touch down, drag across the component, then up Input username Drag 43 154 181 162
where 43 and 154 are x1,y1 i.e starting cordinates and 181 & 162 are x2,y2  i.e ending cordinates.
TouchDown Start touching the component. Input username TouchDown 43 154
where 43 and 154 are x and y cordinates of touch and x,y should be integer.
TouchMove Drag across the component.
one or more (x,y) coordinate pairs specifying the path of the drag gesture
Input username TouchMove 146 170
TouchUp Stop touching the component Input username TouchUp 43 154
where 43 and 154 are x and y cordinates of touch where touch is released and x,y should be integer.
Pinch Pinch the component.
scale – The scale factor relative to the points of the two touches in screen coordinates
velocity – The velocity of the pinch in scale factor per second (read-only)
Exec Call a method on a component. The method must take zero or more String arguments and return a String result. Not implemented yet by gorilla logics.
LongPress Performs a long press on the component. On Android, plays a “longClick”. On iOS, plays a longPush gesture View LOGOUT  LongPress
Button LOGIN  LongPress
ButtonSelector Select Select an item by value. ButtonSelector forms_radios select A
SelectIndex Selects an item by index.
LongSelectIndex Long press an item by index.
Input EnterText Enter text into the input field.
text – the text to enter
hitDone – iOS: if true, hit Done key after entering text. Android: ignored.
Where text and hitdone are arguments of entertext action.
Input username EnterText test
Clear Clear text from the input field Input username Clear
Script Run Run the script with the given args. Script test1.mt Run john “my password” %thinktime=3000
RunWith Run the script with the given CSV file. Script datdriven.mt RunWith credentials.csv
Slider Select Select a numeric component value Slider forms_slider_bar Select 52 %thinktime=3000
TabBar Select Select an item by value. TabBar * Select hierarchy %thinktime=1000
SelectIndex Selects an item by index. TabBar * SelectIndex 2 %thinktime=5000
LongSelectIndex Long press an item by index.
Vars Define Define the named variables used in the script. Vars * Define user pass
CheckBox On This action sets or returns the checked state of a checkbox. CheckBox forms_checkbox on
Off This action sets or returns the Unchecked state of a checkbox. CheckBox forms_checkbox off
ItemSelector Select Select an item by value. ItemSelector * Select Carbon
SelectIndex Selects an item by index. ItemSelector * SelectIndex 8
LongSelectIndex Long press an item by index. ItemSelector * LongSelectIndex 8
Button Tap Taps(click) on the Button. On Android, plays a “click”. On iOS, plays a TouchDown/TouchMove/TouchUp sequence. Button LOGOUT Tap
DatePicker EnteDate Change the current date value.
A date with the format YYYY-MM-DD where YYYY is the year, MM is the month (01-12), and DD is the day (01-31).
NumericSelector select Select a numeric component value
RatingBar select Select a numeric component value
Scroller scroll Scroll to the specified coordinates.
x – the x-coordinate (horizontal)
y – the y-coordinate (vertical)
TextArea EnterText Enter text into the input field.
text – the text to enter
hitDone – iOS: if true, hit Done key after entering text. Android: ignored.
Where text and hitdone are arguments of entertext action.
TextArea * enterText “This is a textarea”
Clear Clear text from the input field TextArea * Clear
ToolBar SelectIndex Selects an item by index.
LongSelectIndex Long press an item by index.
VideoPlayer Play Play the video from the current playback point.
Pause Stop the video at the current playback point
Stop Stop the video and set playback to the starting point.
Menu Select Select an item by value. Menu * select About
Verify Menu * Verify About
SelectIndex Selects an item by index.
LongSelectIndex Long press an item by index.
Doc vars Document the named variables used in the script.
script Document the script itself.
Label All methods of view are applicable on label. Label #1 Verify “Welcome, test!”
Label LOGOUT VerifyNot LOGIN
Setup Run Run the setup script with the given args. SetUp login.mt run john “my password”
RunWith Data-drive the setup script with the given CSV data file. SetUp login.mt runwith cre.csv
(where the first arg is the data file filename )
Teardown Run Run the teardown script with the given args TearDown logout.mt run
RunWith Data-drive the teardown script with the given CSV data file. TearDown logout.mt runwith logout.csv
Test Run Run the test script with the given args. Test testcase1.mt run
RunWith Data-drive the test script with the given CSV data file. Test testcase1.mt runwith login.csv
Toggle On Enabled the switch on. Toggle MonkeyId On
Off Disabled the switch. Toggle MonkeyId Off

MonkeyTalk Test Suite:

MonkeyTalk Test Suite is a file with extension .mts in which you can manage the number of scripts. You can use SetUp, TearDown and Test commands in test suites. A test suite can only contain three types of commands.

Test is a script which runs as part of test suite.

Setup-A script to run before each test in the script.

TearDown – A script to run after each test in the script.

Steps to create Test Suite:

  • Right click on Project.
  • Select new.
  • Then Select Test Suite.

Scripts which you want to run through testsuite should have extension .mt.

Test Suite Must contains at least one Script.

Advantage:

We can Run no of scripts in one go and Screenshots are captured and stored in screenshot folder under project in report folder for failures automatically.

Test suites output the standard XML report, making MonkeyTalk easy to integrate into existing systems.

Results:

The results are displayed in the JUnit panel at the bottom of the screen.

You can also view Results from Test Xml file under project in report folder.

List of MonkeyTalk Component Types:

MonkeyTalk Android IOS
Device Device Device
Table ListView UITableView
View View View
ButtonSelector RadioGroup UISegmentedControl
Input EditText UITextField
Script
Slider SeekBar UISlider
TabBar TabHost UITabBar
Vars
CheckBox CheckBox UISwitch
ItemSelector Spinner UIPicker
Button Button UIButton
DatePicker DatePicker UIDatePicker
NumericSelector
RatingBar Slider RatingBar
Scroller Scroller UIScrollView
TextArea TextView UITextView
ToolBar ActionBar UIToolBar
VideoPlayer VideoView MPMoviePlayerController
Menu Menu TabBar
Doc
Label TextView UILabel
Setup
Teardown
Test
Toggle ToggleButton UISwitch