Wednesday 16 March 2016

How to know app package and activities information without having apk | android app | Appium

How to know app package and activities information without having apk | android app | Appium
In Android app mobile automation,we need apk file of app but sometimes we have to perform action on inbuild app(pre installed) which come with device like call,sms etc.. for this we do not have apk file. Basically in android app automation we need app package information  and app activities. In case of apk it is easy to get above information with appium. But if we do not have apk and need the app package/activities information, we can use following command:
Precondition: 
1. Android mobile must have developer option set to true.
2. ADB (Android debug bridge) must be configure
3. Android SDK installed.
Step1. Open then command terminal type adb devices and press enter
It will confirm that your device is connected and able to recognize by android sdk.
Step2: Now in mobile, open the app of which you want to get app pkg info/activities. In your mobile, it should be current activated app with focus. Means current window of your mobile should be app like calling/msg/your app window. 
Step3: Now type adb shell and press enter to open the adb shell
Step4: type dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'  and press enter
Above command will show the current activated app info of  your mobile. Now check the value of mCurrentFocus. First highlighted text is pkg info
Second highlighted text is app activities info
Here you can see that we can use this:
 Thanks

How to use ADB (Android Debug Bridge) over WiFi | Android automation

Whenever we work with Android mobile app automation we have to connect the device using USB cable. We can connect the device over Wi-Fi. To get rid of from the USB there is a super simple way! All you need is a USB cable (for the initial setup) and have both devices in the same network. This will work for non-rooted devices also.
Precondition: 
  • Your system and device must be in the same network.
  • Android mobile must have developer option set to true.
  • ADB (Android debug bridge) must be configure
  • Android SDK installed.
Step 1. Attach mobile via USB
Step 2. Open then command terminal type adb devices and press enter
It will confirm that your device is connected and able to recognize by android sdk.
Step 3:   type:
adb tcpip 5555
Step 4:To find the mobile ip type:
adb shell ip -f inet addr show wlan0
Step 5: The ip address will be shown in second line like this:
inet 192.168.1.233/24 brd 192.168.1.255 scope global wlan0
where 192.168.1.233 is the ip address of your mobile.
Step 6:Remove USB cable and type:
   adb connect <mobile-ip>:5555
 like: adb connect <192.168.1.233>:5555 
Note: 
  1. Make sure: that you do not have Android studio running before executing the - 'restart adb in tcpip mode' command
  2. If you have IDE running then adb may have been already started and you may need to restart it in some cases: adb kill-server; adb start-server

Sunday 16 June 2013

Types of mobile Automation Tools



Automation tools for mobile application testing use one of two major technologies:


Object based tools : This approach is independent of screen size or resolution and provides a high degree of script reusability. This can be especially important for Android devices where variations in screen sizes and resolutions are widespread. Some object-based tools (e.g. Jamo Solutions) require changes to application source code while others (e.g. Robotium) do not require any source code changes.

Image based or bitmap based tools:
(such as Perfecto mobile and DeviceAnywhere) create automation
scripts based on screen coordinates of elements. For example, tapping a button on the screen is achieved
by tapping the coordinates (e.g. x=35, y=40). While this approach is agnostic to the type of application
(native, web, hybrid) and provides useful image matching capabilities, it typically requires jailbroken or
rooted devices and scripts to be re-written for each device with a different screen size or resolution (due
to change in coordinates). Jailbroken devices are typically incompatible with enterprise MDM security
policies and hence tools that rely on jailbroken devices may not be suitable for testing enterprise apps. 

Automation tools for mobile application testing


Here are some automation tools which are well recognized for mobile
app automation:

  •  Perfecto Mobile’s MobileCloud™Platform (plugs into QTP, supports Selenium)
  • SeeTest Mobile Cloud (plugs into QTP, TestComplete, C#, RFT, Java,Perl, and Python).
  • Keynote DeviceAnywhere
  • Testdroid Cloud
  • Jamo Solutions (plugs into QTP)
  • SILK for Mobile
  • FoneMonkey

and for many more, please visit
www.qatestingtools.com/mobile-testing-tools-table
Comparison of Mobile Automation Tools


SNNamesort descendingViews (popular)Since (maturity)
1Android GUITAR2,4720
2Android SDK1,9502009
3App Test6052003
4AppPerfect Web Test7052003
5Cucumber5,7612008
6eggPlant7,6212009
7FoneMonkey2,768
8Forecast1,0072003
9Frank7972011
10Googletest3,0732008
11IPhone Guitar330
12iPhone Simulator285
13iPhoneUnitTesting354
15KD Executor334
16Load Tester PRO1,3371999
17M-eux Test2,6642008
18mAutomate8442011
19MobileCloud for QTP8750
20MobileCloud-Automation6092006
21MobileCloud-Interactive1,2942006
22MonkeyTalk2,368
23MyVoIPSpeed PC2852007
24NeoLoad1,5902005
25Parasoft® Mobile Test356
26Ranorex Test Automation3,3912007
27RealMobile7262006
28Robolectric9342010
29Robotium2,6362010
30SandStorm1,1502011
31SeeTestMobile2,0939999
32Squish762003
33StressTester4992003
34T-PLAN ROBOT1,279
35Test Center1,379
36Test Studio8552002
37TestingBot8642011
38TestQuest CountDown920
39Toolbox for Mac3492008
40Tosca4,588
41Twist1,7330
43ZAP-fix529