Our tech-savvy QA Ninja Oleksiy Berlin has made for us the review of the main android developer options and Android SDK tools at our last TechTalk. We have improved our awareness in a usage of developer tools for android apps that are used for facilitating the testing process. He has shown us why possibilities of android developer tools can really help in QA engineer everyday work!
The usage of Android tools is a great help for QA during testing. If we have more instruments available, the testing process becomes easier and the quality of the product higher, since the program helps in testing.
The understanding of how the application works, which is being tested, gives us the opportunity to choose from the given list of instruments the one that fits the best.
Here you'll find out about:
- main android developer tools
- android SDK tools
- developer tools - top list features
- tools & libs used by Good&Co Android developers
The most important android tools are:
- allow mock location (faking GPS)
- Show layout bounds
- Don't keep activities
... but we will go through all available tools
Developer options - How to install
- Go to the settings menu, scroll down to “About phone” and tap it.
- Scroll down to the bottom again, where you see “Build number”.
- Tap it seven times. After the third tap, you will see a dialog that says: “you’re four taps away from being a developer”. Keep on tapping until you have got your special setting appear.
Note: it’s hidden by default starting from android 4.2
Android developer options structure####
- Debugging options
- Input options
- Drawing / hardware accelerated rendering options
- Monitoring options
- Apps options
- “USB debugging” - connecting device via usb.
- “Take bug report/Bug report option” - collection info with logs about device state with sending e-mail message.
- “Desktop backup password” - allows to use ADB to backup and restore things like apps and their associated data to and from your computer.
- “Stay awake/Always stay awake” - screen will never sleep while charging
- “HDCP checking” - protecting files, which are shared via Wi-Fi, Bluetooth, etc.
- “Allow Mock Location” - forcing user location using GPS and 3-rd party resources etc.
- “Show touches” - displaying finger touches on the display (useful while screen-recording)
- “Pointer Location” - this setting places an information bar at the top of your screen telling you the screen coordinates of the last place the screen was touched.
- “Surface update” - makes the edge of a "window" flash when its contents are updated.
- “Show layout bounds” - marks the edges of all the elements in a dialog so you know where any touch will activate them.
- “Force RTL direction” - forces screen orientation for the right to left language support.
- “Window animation scale” - sets the speed for window animation. A lower number is faster.
- “Simulate secondary displays” - this setting allows us to simulate different screen sizes.
Drawing/Hardware accelerated rendering options
- “Show hardware layers updates” - displaying screen flashes when device updates surface (useful when developing widgets).
- “Debug GPU overdraw” - overdraw happens every time the application asks the system to draw something on top of something else. This setting lets you see when and where this is happening so you know if it is a problem.
- “Strict mode enabled” - this setting flashes the screen when an application uses the main thread to perform long, intensive operations.
- “Show CPU usage” - places a window in the upper right of your screen with information about the CPU and how it is being used.
- “Don’t keep activities” - destroys every activity as the user leaves it (if enabled, going to background will destroy current app activity, if disabled - app will run in background) - In other words Android will destroy and activity as soon as it’s stopped. We can simulate the case that Android will kill an activity in the background due to memory pressure
- “Background process limit” - limiting number of process which can run in background (may be useful when testing apps on slow devices)
- “Show all ANRs” - displays all “application not responding” dialogs while using the device
Android SDK tools
- Android Device Monitor:
- DDMS - tool to debug android applications
- Hierarchy Viewer - detailed displaying of app views, layouts
- PixelPerfect - comparing implemented app design with target design
- Retrieving data from device (SQL, SharedPreferences)
- Using AdbRun
- Displaying application view, layouts with resource identifiers
- Android Monkey
- Simple automation tool for light smoke run (useful to increase crash-free users)
If you want to find out more information about ADB commands, android monkey and other interesting tools check this presentation!