Effective Testing: Using LOGCAT for Android Testing

If you tend to use tools effectively, testing is easy and enjoyable. For mobile testing there are lots of challenges and to be honest if you don't push yourself to improve your ability as every developer does you can not test the mobile application good enough.

Instead of testing mobile application manually, we can automate the stories whenever the stories are prepared by business analyst with writing cucumber files and then we can start writing the code of automation and finally we can run it when the stories are developed by developer for agile development environment. This is iteration based approach, means you can repeat this steps for each iteration. At the end of the milestone you can run your whole automation code and see the result. For the remaining time you can still test application by using Exploratory Testing techniques to find-out any bugs. 

The important point is to make your job effective and efficient. For this you should automate or scripted some repetitive and annoying tasks such as creating dummy users, dummy accounts; deleting relationships and unnecessary records; and all related database jobs and api calls. Most of the time these kind of task are hard to perceive for the first try then it takes extra time.

Use LOGCAT to See What is Happing in the Background 

One of the efficient tool the Android Development Environment provides is LOGCAT which you can see all the log related to Android application. By this way you can also check if request to API is correct or not, or you can check if there is any unnecessary information received or send. By this way you can also grasp some performance related issue.

to start the Logcat: 
adb logcat

For specific activity filter by activity
adb logcat -s Retrofit
adb logcat ActivityManager:I Retrofit:D *:S


For specific activity filter and specific virtual device
adb -d devices
adb -s 192.168.56.101:5555 logcat -s Retrofit

A short video for my explanation:


Comments

Popular posts from this blog

Selenium Error "Element is not currently interactable and may not be manipulated"

Change Default Timeout and Wait Time of Capybara

Page-Object Pattern for Selenium Test Automation with Python

Performance Testing on CI: Locust is running on Jenkins

Getting the text of elements in Espresso