Category Page

Android App Testing

 

If you are anything like me, you’d agree that the armor of present day mobile phone technology has a few chinks on it. Nothing is worse than applications draining the battery resources of your mobile device faster than you can fill it back up. The sunnier side of course, is that you can create teachable moments for your kids better by hiding their phone chargers and watch the colors drain from their faces.

Studies show that battery life is a top priority for smartphone buyers. In fact, just recently, an IDC survey showed that 56% of Android buyers, 49% of iPhone buyers and 53% of Windows Phone buyers said that battery life was a key reason when they bought their particular device.

It is rare to find mobile app testing tools that assure proper usage of resource by the mobile app as, included in the overall test plan and strategy.

It’s rather a tedious and long process for conventional mobile app testing methods and as such, Let us talk about how resource consumption as an app takes top priority, because nothing stops a user to uninstall their resource draining apps from their phone. Also we’ll talk about how developers and testers efficiently test mobile apps for Android applications.

 

Android App Testing

Figure 1: IDC Survey

 

Why battery testing is important:

 

Thousands of new mobile apps are being launched every day. And these apps have gone beyond just utilities, games and shopping apps, nowadays, apps need to be integrated into self-driving cars, digital assistants, wearable devices etc. Billions of users need to install apps that are not only compatible with their varying devices, but also provide quality experience of the app so that it doesn’t prompt the user to uninstall it and move to an alternate app.

When you get worried about potential battery abuse, its fair economics to identify the markers that can cause increased consumption of energy by the mobile application. Critical are the functionality, usability, performance and security to make sure that the app does what it was meant to do, seamlessly. The growing need for perfect enterprise and consumer apps and the continuous need to upgrade the application to match it with what the consumer exactly wants is a job that creates high pressure for developers and testers alike, who are responsible to delivering them.

We would get deep into the best practices and tactics that should be kept in mind while testing for battery drain in your mobile app in a later blog post. For now, let us look at how developers can test for battery consumption during Android App Testing.

 

How to test battery consumption for mobile apps:

 

So far there hasn’t come a good automation method to test app battery drain. So testing Real Mobile Devices meets many requirements for efficiency in the process. Let us check out a few parameters to test battery drainage due to mobile apps.

 

  • Battery test flow

    This will vary based on the functionalities of the applications. But overall the below approach or points should be considered while testing for battery consumption.

    • Check the status of the battery before the test begins
    • Enable the location services for the application if app supports
    • Start the data sync of the application if app supports
    • Start the streaming service of the application if app supports
    • Check if the application send/receive the data when in the background
    • Check if the application send analytics to its server
    • Observe the battery consumption while doing above supported features by your application.

This will give us an idea as what is the battery consumption by the application.

 

  • Testing as end user

It is very critical to test the environment needs of the app from a real user perspective. Environments like device types, operating system, background popular apps installed and running, network conditions (WiFi, 2G, 3G, 4G, Roaming) as well as diverse set of devices with different battery states, brings DevOps teams as close as they can come to end users.

 

  • Android App Testing across varying devices

Android is guilty of OS fragmentation due to its open approach to OEM vendors. Different devices have varying battery capacity and each loses its battery chemistry over time, negatively impacting performance and battery hours. This is why we must check the battery consumption for the mobile app on variety of mobile devices. The best practice is to use multiple devices from device labs/ device clouds.

 

Different tools available in the market.

 

Android’s built in Battery App

Your Android Mobile Phone has a ubiquitous battery testing resource, as it comes preinstalled on all Android mobile devices. Android’s native battery analyzer, for example, (Settings> Device> Battery) is built into Android’s OS and helps analyze each app and let you know which are the ones draining the most fuel.

 

Commercial Battery Saving Apps

There are a few commercial Android Battery Analyzers which are available for free in the market, like:

 

GSam Battery Monitor can reset testing cycles as you go, which means there is no need for draining and recharging the battery like in android’s native battery app, and monitor app power usage without having to wait to get an information reset.

 

Clean Master on another hand, lets you know through its notification feature as and when an app is causing the phone’s battery/CPU to drain, which gives instant information on any CPU overuse.

Android App testing

 

pCloudy platform for Testing Battery Drain

pCloudy platform allows comprehensive features for Android App Testing. Moreover, Using pCloudy’s platform, one can monitor the battery consumption by the application. additionally, the user can also monitor memory, CPU and data consumption by the application.

The user can do the complete functional app testing on the application by touching all the critical/non-critical paths in the application. The pCloudy platform provides the necessary data for the work flow.

 

Performance Metrics

 

Conclusion

Google has said that this year their focus is on the ‘vitals’ of mobile phones, battery being one of the critical four. It’s always best to use varying angles of attack to test your app’s battery usage. And the only way to do that right now is to cover as many mobile device variants in the market and test against them.

 

To check battery consumption during Android App Testing Click Here.

 

Get 180 Device Testing Minutes Free




Introduction to iOS TestFlight

TestFlight is an online service used to distribute and test beta iOS applications. Developers can use Test Flight to evade the Apple’s bitter binding procedure for testing new versions of their apps. It provides over-the-air installation, testing, tracking and managing of Beta apps. In simple words, TestFlight acts as a link between the developer, the tester, and the Apple Developer Center.

How is it useful?

  • Distribution of the app over-the- air to Testers
  • Tracking and managing testing using TestFlight’s dashboard
  • Receiving feedback from testers to improve the app
  • To obtain reports about the device models, OS version used while testing the App
  • Automatically records any crashes the testers encounter and sends it to the Developer

This tutorial will walk you through integrating TestFlight into your own apps.

What do you need to start?

You have to have your certificates, app ID, and provisioning profiles in place before distributing your apps using Test Flight. Here’s the list of items you need:

  • A Developer ID to login to your developer account.
  • A Certificate for Distribution to export builds and distribute apps
  • An App ID
  • A Device UDID
  • Ad Hoc Provisioning Profile to distribute your app on testers devices
  • Sign your app with a valid ad hoc provisioning profile

These items will help you obtain an .ipa file that can be distributed for testing in iOS devices with UDIDs mentioned in the provisioning profile of the app.

Uploading your app for Beta Testing

Open up your project in Xcode, make sure you have a correct Bundle Identifier and that you’ve chosen the correct Distribution Certificate:

Choose Product\Archive from the top toolbar:

Once Xcode finishes archiving your project, click the shiny blue Submit to App Store… button:

Choose your development team

Hit Submit

Wait for your build to upload. Once done you will receive a “Submission Successful message”

Inviting Testers

Test Apps on Real Devices

 
Using Eclipse or Android Studio to code your app? Now with just a few simple mouse clicks test apps directly and in parallel on multiple real mobile devices.

Eclipse and Android Studio are two popular IDEs for mobile app development. The reason behind their popularity is, these are open source tools and have a great community of developers whom you can turn to for any support. Anyway, if you are one of those mobile app developers using these popular IDEs then there’s good news for you!

What if you could extend the capability of your IDEs to improve the quality of your apps? What if you could test your app on hundreds of mobile devices right from your IDE? What if you could with the help of simple plugins take your mobile app development process to a whole new level?

Well, you can – with a simple yet salient solution from pCloudy.com. With a cloud based device lab, pCloudy is contributing to the cause of redefining mobile app testing by providing remarkably useful platform and plugins to test your apps on real mobile devices. As mentioned in our previous articles, it is not enough if mobile apps are tested on Emulators alone. We need to ensure that the apps are tested on Real Devices as well. It is also important to test your mobile apps on different devices based on a carefully analysed device matrix to hit maximum downloads. To continuously develop, integrate and release mobile apps in your DevOps environment such solutions are crucial.
 

Here’s how can our plugins benefit you

 

Description:

Our Plugins act as a wizard that allows you to:

  • extend the ability of Eclipse to use real devices over a cloud platform
  • select and install an app from a Cloud Drive or from local
  • select multiple real devices from a cloud (Public, Private, On-premise) to test your app
  • run test scripts in parallel on multiple devices
  • perform Automation or Manual Testing

How does it work?

If you have already created Test Scripts ready for Test execution, then all you need to do is to select some real devices over the cloud platform and run the execution to test your app. To help you out with this, the Plugin generates a pseudo-code that can simply be copied into your existing test scripts using Android Studio or Eclipse. With simple changes in the test script, the app will get installed and test execution is performed on the selected mobile devices. In the end, a detailed automation report will also be generated through our platform.
 

With these plugins app developers and testers can:

  • choose from hundreds of mobile devices to test your App
  • effortlessly test their apps directly on real mobile devices
  • can view or perform an activity on mobile screen from directly within on your IDE
  • perform automation runs in parallel on multiple mobile devices

Download and install the plugin:

Choose the Right Testing Platform

 
As a mobile app maker, how sure are you about the success of your app? A small failure to recognize bugs can cost you thousands of dollars! A small mistake can turn you into a big failure among the users. Now, the question is, how to choose the best platform for testing.

Every mobile application is created differently from the other and the right platform to test can be the most important reason for your app’s success.

Right Testing Platform for Your App

 

Choosing the right platform among the various competing ones require a set of clear evaluation.

  • The nature of the targeted audience for your app. This will define the device matrix you should be targeting for your App Testing. Does that platform provide right device matrix for your testing needs?
  • Cloud based vs in-house setup – Does you testing process allow Apps to be allowed on outside cloud? Does your App have functionalities which work with in a secured network?
  • Type of Testing required for your App – Whether your current testing is manual or automated? Does your App require non-functional Testing?
  • Reliability and Scalability of the platform- Can it scale with your needs? Can the platform integrate with your existing tools and frameworks?
  • Return on Investment

 

Criterion

Description

Device Fragmentation

Can the platform handle you need of devices?

Availability

How critical for you instant availability of devices. Is you testing planned?

Automation

How much of testing is done using Automated scripts? Does the platform support the Automation tool that you are using or planning to use.

Type of Testing

What all functional features that you need to test? Does your App require non-functional Testing?

Extensibility ( integration with in-house frameworks)

Can the platform integrate with your in-house frameworks ( Automation, Test Management , Bug Management etc..)

DevOps

Can the platform support DevOps? Can it integrate with your build systems/dev IDEs or continuous integration systems.

Security

Can you upload your app on an external cloud? Does you App require interaction with your internal server?
Usage level and Cost

What is the usage pattern of your test and developing team and what is your budget?

 

Market Share: Andriod VS iOS

 

pCloudy provides the necessary tools for convenient, effective and immediate mobile app testing. Our device is based on cloud and it enables continuous development and testing on real devices. Our unique debugging feature recognizes potential errors that will significantly reduce costs and time. Our platform provides single-click access to end numbers of real Android and Ios devices.

To experience the best with your app, we have developed three different types of cloud environments for you.

Public Cloud

With pCloudy’s publicly accessed cloud, you can perform tests directly from your browser. You won’t get confused to choose between manual or automated because both are available in our public cloud environment. We allow our users to test on a comprehensive list of real IOS and Android devices. You can also test your app over various network conditions like 2G, 3G, 4G or Wi-Fi. You can either configure your own browser or choose from our wide range of pre-installed browsers.

Private Cloud

This option is similar to our public cloud environment, except it comes with additional benefits of personalized security and dedicated access. Here, we would provide you a host of devices in our enterprise grade data center and you can choose your own device. If you have a geographically distributed team, then they will have secured devices over a browser. We make sure that your data is safe on our platform, as we allow only authorized team members to access.

On-premise cloud

In this option, we provide you with the necessary hardware and give you the freedom to set up your own secure device lab. You will have complete control of your own on-premise lab.

In addition to have exactly the same features of our public cloud, on-premise model contains supplementary benefits. On-premise cloud gives you the freedom of plug-in with your existing set of devices and provides you access to a geographically distributed team. Manual and automated- both the testing techniques can be used and with a simple plug-in, you can access it from any rack. Also, there is no limit for the number of devices which can be linked!

At the end of the day, the developer has to choose the best platform for his app. But choosing the right one saves so much of hassles.

 

Test Your Mobile App on Different Devices

 
The Technology involved in mobile devices is changing rapidly. Mobile phones have literally personalized the choices in our lives, experts forecast that the future devices will be the remote controls of our lives.  The services or functions are run by apps in specified platforms. And each platform has its own set of parameters to run an app. Mobile phone or device manufacturers are going through a breathtaking pace of change over the years and keeps on innovating new ways of doing things!

 

app

 

Why Apps fail?

 

Why Apps fail?

 

 

 

Why Apps fail?

Above data clearly show that handling Device fragmentation is one of the biggest challenges for App developers. Android has more fragmentation issue compared to iOS. Because the number of mobile vendors, is comparatively higher. However, even iOS faces certain amount of fragmentation issue. As there are different software versions and devices. And different devices run different iOS versions.

 

                            iOS versions                                           iOS versions

Mobile browsers can be challenging too! There are end numbers of browsers like Safari, Opera, Goggle Chrome and Dolphin. And each one of them has different versions for different platforms!

 

“So, what’s the right choice? Buying every device available in the market?”

Not necessarily, right device matrix is the key to success.

You can choose one of the two approaches to arrive at your device matrix

Device diversity Approach

  • Decide the device matrix based on key parameters like OS versions, screen size/resolution, manufacturer/device family (Android), operator, CPU, and input method
  • Objective is to maximize the variety of devices

Market segment + Device popularity approach

  •  Choose devices with the highest market share
  •  Objective is to maximize market coverage

Once you have the right device matrix, Device Cloud is the best option to get quick access to your device matrix.

 

 

 

As a tester, you must consider the ever increasing number of physical devices. The most important implementations should be automation, quality assurance, security and device compatibility. Also, ensure that the software scripts cover the core functionality of the application, so that it can run across all the platforms.