Anshuman Chatterjee | Posted on | 2 min Read

Uncover Memory Leaks by Mobile Apps

 

Mobile apps can often crash for many reasons. Nothing is as excruciating as memory leaks. It starts with your app crashing often, or becoming slow or maybe making your entire phone slow down, taking longer time to load activities. Memory leaks are notoriously hard to detect, and thus can easily surprise you. Have we ever thought why most of the users uninstall the application after some use?

Which is why it is critical for Developers to understand the memory consumption by any mobile application. How do you detect memory leaks during Mobile Application Testing? And if so, how can you prevent them from hogging mobile resource consumption?

A little knack for Mobile Application Testing always comes handy.

 

mobile application testing
Figure 1: Image Credit- GadgetHacks

 

Want to test your Mobile App?

Join pCloudy Platform!

Memory is critical to device

 

Memory is one of the key resources of the mobile device.And memory leaks in Android is an important thing to be kept in mind. Java is a garbage collecting language, which removes the need for developers to dig deep to manage allocated memory. This reduces the chances of any segmentation fault crashing an app or any unfreed memory allocation from eating up space of the heap area, thus creating a safer code.

 

However, a garbage collector is never an insurance against memory leaks. There are other ways by which memory can be leaked within Java. This means that your android mobile application is still pretty prone to wasting unnecessary memory allocation and crashing with out-of-memory (OOM) errors.

 

Toptal
Figure 1: Image Credit- Toptal

 

Why are Memory Leaks Bad?

 

Cause: Memory leaks occur when some variable of the application still has references to some objects that are unnecessary, no longer in use or used to be with the app anymore, is bloating the allocated memory heap and the Garbage Collector is not being able to release that memory.

Effect: Android devices mostly run on phones with limited memory, so as a result of too many leaks, the app runs out of available memory. This triggers more frequent Garbage Collector events which paralyze the device (Stop-the-world GC events) by almost stopping the rendering of UI and processing of events. This leads to an Out of Memory Exception and translates to the user as the app being unresponsive.

 

Android App Testing

 

Testing for Memory Leaks

 

Memory Leaks are caused by the failure to not be able to de-allocate memory that is no longer in use, which is why they cannot be identified during black box testing. The best phase to find the memory leaks is when developers are developing the application, at a code level.

It’s best to check for memory leaks during unit testing. However, testers can follow these tips:

 

Release Unused Memory: Memory leaks can be present because of the bad design of the application and thus might consume lot of memory when the application is in use

 

Test on Multiple devices:The memory consumption by the application should be monitored while doing the system & functional testing. One shouldn’t rely on a single device testing as there are plethora of devices in the market.

 

Detecting Memory Leaks

There are quite a few techniques and tools devised by developers to pin point memory leaks. Android’s very own Android Studio has a powerful tool to monitor not only memory usage but also for network, GPU and CPU usage as well, called the Android Monitor.

Memory Monitor in this helps track memory usage, find de-allocated objects, identify memory leaks and helps get an overall sense of how your app allocates and frees memory. It’s done in three steps:

1. During and use and debugging of app, track the memory monitor. If the memory usage graph rises for your app and doesn’t fall even if put in background, it’s a memory leak.

2. Using the Allocation tracker, you can check the percentage of memory allocated to different types of variables in your app. This gives you a sense of how much memory is consumed by which object.

3. Create a Java Heap Option to create a heap dump that keeps a snapshot of the memory at any given point of time, thus providing the data consumption data.

Despite Android’s monitor to detect memory leaks, there are a few platforms from developers that help extract memory consumption data without so many steps for faster testing cycles.

pCloudy’s very own platform for example, generates the statistics for Memory consumption while doing the normal functional Mobile Application Testing on real mobile devices.It also generates other vital data such as CPU consumption, battery consumption & data consumption for testers and developers who reiterate several test cycles across multiple physical devices.

 

mobile application testing
Figure 1: Image Credit- Android Developers Studio

Want to test your Mobile App?

Join pCloudy Platform!

pCloudy 4.3

 

  • User can directly send input to the pCloudy Android devices by using their system keyboard.
  • CPU and Memory graphs on iOS.
  • New Improved Automator Page.
  • Automator now works on devices for all region
  • Live view for the Automation run for devices from all region
  • Bug Fix: Remaining Credits now revert back after an Appium session finishes earlier than booking expiration time.

Click Here to check our Previous Release.

Nilesh Tarale | Posted on | 2 min Read

How to create a world class Mobile Testing Lab?

 

It can be a big challenge to build a large scale Mobile Testing Lab from scratch. Look around you and you will see that with every single day, companies in adding mobile apps in their business strategy and with it the mobile app dev and testing market is becoming increasingly competitive, dynamic and fast paced. Older testing methods are becoming obsolete and the utter multiplicity of mobile platforms, devices and networks have made it important for any company to choose the right solution (Mobile Testing Lab) in order to strengthen themselves in the market.

While creating a testing program for these mobile applications can seem like a relentless chore and a massive undertaking, it doesn’t really have to be. Here are a few considerations to choose the right lab strategy for testing your mobile apps.

 

Key Considerations:

 

• Compatibility of Device OS, Screens and OEMs: The sheer number of different device variants, OS versions and screen resolutions form a large set of factors even though each of them are significant in their own rights. In 2012 there were about 4,000 Android device models on sale. 2015 saw about 24,093 distinct Android devices. Question is, can the lab I choose, cover maximum number of devices and come close to 100 percent of my end users’ device base?

 

mobile labs

 

• Device Control Infrastructure: After you select your target devices, it is also key to look at the other parts of a reliable architecture of your hardware. Regardless of the technology to be used in building the device lab, one needs servers to control and take care of managing devices and execute tests. Moreover, it is crucial for these servers to collect, process and store results of the tests seamlessly and without interruption.

 

mobile testing lab

 

A snapshot of Infrastructure needed to create a Mobile Device Lab

 

mobile testing lab

 

Facebook Device Lab Infrastructure

 

Click Here to know about pCloudy Device Cloud Infrastructure

 

• Wi-Fi Infrastructure: This is another very crucial area that is often ignored when creating large-scale test lab. As the number of device in a WiFi network adds up, so do problems when all these devices transferring data at the same time. Most WiFi access points are not designed for this kind of bandwidth and you are bound to see different types of timeouts on server responses.

 

• Importance of Automated Testing: The very obvious benefit of automation of testing of mobile devices on the cloud is that through this one can carry out tests on a wider range of OS and devices in a much shorter time and with lesser life-cycle management investment. This not only significantly reduce QA spending, it also expands coverage and speeds up the resolution of issues. You can use a single script and apply the same on different devices and operating systems.

 

Integration with CI/CD pipeline:

 

Today, almost all organizations have mobile apps and for some, the mobile app is their only way of interacting with customers. With this increasing emphasis on mobile, the pressure to routinely update mobile apps means embracing Continuous Integration (CI) and Continuous Delivery (CD) methodologies. Any Mobile Labs has to support the CI/CD process.

 

5 Tips to build a successful lab:

 

1. Using Real Devices
2. Tackling Multiple Devices
3. Using a Secure Mobile Device Testing Cloud
4. Automation Strategy
5. Increase Lab efficiency by integrating with your existing tool ecosystem

 

1. Using Real Devices: Some Devs/testers are using emulation technology for compatibility testing. However, it has been proven beyond doubt that testing on emulators is often not reliable. Real devices help you and your team to find real bugs in your App before customers do. It is only way to have a confident App release and increase the chances of success of your test lab.

 

2. Tackling Multiple Devices: With thousands of different devices, it can be a bit overwhelming when building a mobile testing lab that encompasses the coverage of testing in all of them. Luckily, the major mobile operating systems use logical screen sizes which are mapped to physical screen, hence, the representative devices will get the necessary coverage. The test strategy is not to test absolutely everything, but to test the crucial elements that are most represented in the popular devices in the market, and add or subtract devices as they come in and out.

 

3. Using a Secure Mobile Device Testing Cloud: Using a secure cloud is vital to enterprises, especially if they aren’t located under the same roof. Testing real devices for everything can become really costly and time consuming. Using a testing cloud keeps your budget in check, reduced project cost and thus helps achieve high return on investment. Be it public cloud for small businesses, or large enterprise projects that demand a private cloud infrastructure, high performance and security are essentials to have complete control over the cloud.

 

4. Automation Strategy: Creating Regression Automation suites once Application is ready is a passé. Agile methodology and CI/CD process demands automation creation in parallel to development. Automation strategy should be built keeping above aspect in mind.

 

Here is a depiction of what the automation process should look like.

 

Mobile Labs

 

As part of Automation Strategy, Mobile Testing Lab should provide the capability to allow automation run on multiple devices in parallel.

 

5. Increase Lab efficiency by integrating with your existing tool ecosystem: A lab is as good as how well can it be integrated within existing ecosystem. Can it integrate with your Test Management system or can it log bugs automatically after a failure? Can it integrate with your build management tool for CI process? Here is a depiction of how “Test Tools” fit in the larger ecosystem.

 

Mobile Testing Lab

 

Conclusion: A well thought strategy for setting up of Mobile Testing Lab is a necessity for every organization undertaking Mobility projects. In current times, organizations have plethora of choice related to setting up of Mobile Testing Lab. They can choose to setup an In-house lab or use a private-hosted service or use a cost effective Public Cloud lab.

 

Would you like to know more about Lab options with pCloudy? Click Here

Suyash Dubey | Posted on | 2 min Read

pCloudy’s Data Center

 

Ever had apps on your phone which suddenly crashed it and you couldn’t figure it out?

In today’s age, If you have a smartphone that needs to get you through most of the day, be it work or play, you must have experienced frustrating bugs on that app that is either slowing down the phone or stops you from using it when you need the most. So you uninstall it and be done with it. Try asking any app developer or tester what it is like to test usability of the app in thousands of devices across screens, operating systems and the carriers.

This is where pCloudy comes-in. A one stop solution for Developers and Testers to certify their App across variety of devices.

How does pCloudy work?

pCloudy has found an incredibly simple way of allowing users to remotely test their apps on different real and physical devices by using just a modern web browser. Alternatively, users can access the devices directly from their IDEs like (Android + Eclipse studio).

Device Data Center

Behind the scenes:

Use of Physical devices: Mobile App Testing is most effectively when done on a real physical device. That’s the reason, pCloudy currently has 500 + Android and iOS device (real device, no emulators) across various manufacturers and versions.

Data-center-2[A Device Rack in the Data center which contains pCloudy Hardware and set of devices]

Kind of hardware involved: pCloudy has a customized hardware setup, which runs the software to allow communication with real mobile devices. All the mobile devices are connected to the hardware using USB cables.

Network Setup for Devices: All the devices have a Wi-Fi connection. To ensure uninterrupted connectivity to the devices, all the racks are installed with dedicated Wi-Fi controllers and Wi-Fi access points. The Wi-Fi access points are deigned for interference mitigation and Noise (SINR) improvement. Besides, many of the devices also have real SIM cards.

pCloudy Device Data Center[Data Center: All the above is located in a secure, 24×7 operated data center]

When it comes to certification of Apps, one of the biggest concern for Users while using a solution like pCloudy is security and safety of their Data.

Why we decided Data Security was Critical?

It was important for our customers to feel safe about their Apps and data that they upload on pCloudy servers. Many a time these are not-yet-released app and related data. Today pCloudy is working with Global enterprises who are extremely concerned about safety of their Data.

Security of Data Center: A major component of the entire pCloudy offering is the data centers where physical mobile devices are connected. These devices are then made accessible through cloud via the web browser to the customers. pCloudy has hosted their cloud in a data center which meets all the global standards, including compliance with SSAE­16 (SOC­2) and ISO 270001 standard. pCloudy has 99.982% uptime commitment on the DC infrastructure which is measured quarterly, a failover redundancy mode for equipment’s setup and everything that does not get in the way of a creating an uninterruptible, stable working mobile network environment for the apps, round the clock, 24X7.

Secured Cloud Drive: Data uploaded by user (Apps/Test Data) is Stored in secured folder on our server in DC. User space is protected by username and password. Data is further protected by a layer of encryption. No access to user data by pCloudy admin.

Device Clean up: Device gets cleaned up automatically after each use. As soon user releases a device, user installed Apps get uninstalled, data uploaded get deleted and device gets powered cycle.

Are you Ready for the Challenge?

The pCloudy Mobile App Hackathon is a programming-focused Coding contest designed to inspire a creative and dynamic generation of tech professionals to put their skills to the test. For three weeks, top developers will compete for the chance to win prizes and job interview opportunities in a skill-based challenge. Think you got what it takes?

Code Challenge

pCloudy

mobile app hackathon mobile-app-testing-platform
The pCloudy Mobile App Hackathon Your Simplest Mobile App Testing Platform
register mobile-app-testing-platform

prizes

Eclipse IDE

 

An Overview

pCloudy provides a plugin for Eclipse IDE. Using the plugin you can perform both manual and automation testing of mobile apps. The plugin provides a user interface to connect to the pCloudy platform. You can upload apps, book devices and perform your testing right from your IDE.

 

For Manual Testing

Upload your app to the cloud drive, select the device, and perform the manual testing of your app right from Eclipse.

 

For Automation Testing

This plugin helps you get a pseudo code for your Test Scripts to run on multiple pCloudy Real Devices in Parallel. Just install the plugin, login to pCloudy.com, upload your app, select devices and get the pseudo code.

 

Prerequisites

  • You have an account over pCloudy with enough credits.
  • Latest web browsers on local machine
  • Latest version of Eclipse
  • Eclipse pCloudy plugin

Preparation

  • Reference the JAR files to Eclipse
  • Make a note the API Username and API Access Key

Steps to be followed

Launch Eclipse > go to Help menu of Eclipse > click Install New Software > Copy and paste the below Eclipse plugin address in Work with textbox.
http://eclipseplugin.pcloudy.s3-website-us-east-1.amazonaws.com/

  • Click on Add, a new pop up window of Add Repository will open
  • Enter Name and Location, click on OK
  • Check pCloudy checkbox and then click on Next

Available Software

Now, you need to install pCloudy Eclipse Connector. Click on Next to begin pCloudy Eclipse Connector installation.
pCloudy-Eclipse-Connector

Further, check I accept the terms of the license agreements checkbox and click on Finish.
review-licensed

Installation of pCloudy Eclipse Connector begins.
installing-software

On completion of pCloudy Eclipse Connector installation successfully, an alert message appears. Click on OK to proceed pCloudy plugin.
pcloudy-plugin

Now, enter Cloud URL of pCloudy along with registered Username and Access Key over pCloudy to login successfully. Click on Apply and then OK.
preferences

Now, you are able to perform Automation/Manual testing of apps based on Appium TestScripts/pCloudy/OpKey or Test as per your requirement.
 

Automation Testing of App

To perform automation testing of your app, here’s a checklist you need to prepare for Automation
Here, we are discussing about Test Automation of apps by over pCloudy.
Select Automation & pCloudy and then upload your app to be tested.
Click on Next to proceed.
upload-app

Select duration and filter list of devices by using given filter parameters (Android/iOS, Manufacturer, and Version). Select desired device (Ex. Samsung) and click on Next.
select-devices

Finally, you get pseudo code for performing Test Automation. You can copy it to clipboard or copy it manually by selecting entire pseudo code.
connect-device

You will need the pCloudy java connector jar file for the above code to work. The pCloudy-java-conector.jar contains the API wrappers, classes & methods to use the pCloudy RestfulAPIs(without knowing how to call rest webservices from java). The gson.jar is a well known, opensource google library. You should add the pCloudy-java-connector.jar in its build path as a reference within your java project containing appium scripts. See this link to learn how to add reference in eclipse.
You can download pCloudy-java-connector.jar & gson.jar(a dependancy of the pCloudy-java-connector.jar)

 

Manual Testing of App

If you want to perform Manual Testing of apps over pCloudy through Eclipse then select Manual way and pCloudy and upload app to be tested. Click on Next to proceed.
upload-app-manual

Select duration and filter list of devices by using given filter parameters (Android/iOS, Manufacturer, and Version). Select desired device (Ex. Samsung) and click on Next.
select-devices-automation

Now, you are recommended to open pCloudy in browser. Click on Open in browser and then on Finish.
open-in-browser

When you click on Finish, pCloudy login page opens in eclipse. Now, you can login and perform manual testing on selected device as well
login-to-start-testing

Five key iOS 10 Features

 

The upcoming iOS 10 has sparked great interest among app developers owing to it’s rich, better-than-ever features. The beta version of iOS 10 SDK includes new APIs and services that will power a whole new generation of apps. You can now extend your app capabilities to Phone Messages, Siri, VoIP, Maps, Apple Pay and much more to provide enhanced functionalities and enjoyable experience to your users.

Here are a few great features you can add to your apps:
 

Notifications

 
With iOS 10 you can create rich, interactive, and powerful notification experiences for your apps. The users can not just view photos, and listen to audio, but they’ll also be able to watch videos from inside a notification, view live information such as map updates in real time. As demonstrated at the Worldwide Developers Conference, you can even use 3D Touch to open a notification and respond to it directly from the lock screen.
 

Siri

 
You can create apps with extensions that work with Siri. Users will be able to access content and services using just their voice. The extensions developed using the new SiriKit will support new services such as booking a ride, managing workouts and sending or receiving payments, along with existing features like audio or video calling, messaging, and searching photos.
Maps: Apps that offer ride booking, restaurant reservations, and other location-related services are accessible from within Maps, allowing users to book, track, and pay. The Maps even suggest relevant apps for services in a user’s current location.
 

VoIP

 
The CallKit framework lets VoIP apps integrate with the iPhone UI. The framework lets users view and answer incoming VoIP calls on the lock screen and manage contacts from VoIP calls. CallKit also introduces app extensions that enable call blocking and caller identification. You can create an app extension that can associate a phone number with a name or tell the system when a number should be blocked.
 

Apple Pay Enhancements

 
In iOS 10, users can make easy and secure payments using Apple Pay from websites and through interaction with Siri and Maps. For developers, iOS 10 introduces new APIs you can use in code that runs on both iOS and watchOS, the ability to support dynamic payment networks, and a new sandbox testing environment. The new APIs will help you incorporate Apple Pay directly into your website. When you support Apple Pay in your website, users browsing with Safari in iOS or OS X can make payments using their cards in Apple Pay on their iPhone or Apple Watch. iOS 10 also introduces a new testing environment that lets you provision test cards directly on the device. The test environment returns encrypted test payment data.
 

Speech Recognition

 
iOS 10 introduces a new API that supports continuous speech recognition. The Speech Recognition API allows you to build apps that recognise speech and transcribe it into text. Using the APIs in the Speech framework (Speech.framework), you can perform speech transcription of both real-time and recorded audio.

These are the key developer-related features introduced in iOS 10. There are some more like interesting ones like Interactive Messages App, App Search Enhancements, Widget Enhancements, found in What’s new in iOS 10.

Need devices with the new iOS 10 beta to test new features in your app?
Try pCloudy’s Mobile App Testing Cloud. We provide real mobile devices with all versions of Android and iOS for app testing.

Here’s a quick video:
 

Gartner’s Market Guide

 

Delhi, June 23, 2016 – Smart Software Testing Solutions (SSTS), a leading provider of Mobile App Test Automation Tools, today announced that it has been identified as one of the Representative Mobile App Functional Test Automation vendors in the Gartner’s Market Guide for Mobile App Test Automation Tools(1).SSTS was named in the category of commercial vendors with functional test automation and device cloud capabilities.

 

According to Gartner, ‘’the need for automation in mobile app testing is driven by business time-to- market demands and digitalization initiatives. These push mobile app development teams to adopt agile development approaches to deliver high-quality mobile apps faster. This rapid pace, combined with a broad and changing device ecosystem, creates a challenging environment in which to maintain a high level of quality. Without automation, it will end up crushing all but the most trivial app efforts.’’

 

“We believe our inclusion as a representative vendor in the Gartner Market Guide validates why the world’s best-known brands rely on SSTS, to drive their Mobile Test Automation,’’ said Avinash Tiwari, Director, Smart Software Testing Solutions, explaining the unique position of the company in the Indian market.

 

pCloudy is the flagship product company of SSTS (Smart Software Testing Solutions). Avinash Tiwari opines that the market in India is becoming more and more receptive of automated testing solutions and cloud based testing platforms. More and more organizations are feeling pressure to make releases more frequently. Moreover, creating right test infrastructure for mobile Apps is a key concern for organizations. pCloudy is in a unique position to serve both the challenges.

 

If you have a Gartner Account, you can download the report by clicking on this link.

 

Gartner Disclaimer

 

Gartner does not endorse any vendor, product or service depicted in its research publications, and does not advise technology users to select only those vendors with the highest ratings or other designation. Gartner research publications consist of the opinions of Gartner’s research organization and should not be construed as statements of fact. Gartner disclaims all warranties,expressed or implied, with respect to this research, including any warranties of merchantability or fitness for a particular purpose.

 

(1) Gartner, Inc. ‘’Market Guide for Mobile App Test Automation Tools’’ by MaritessSobejana, Adrian Leow, 25 April 2016