Suyash Dubey | Posted on | 2 min Read

What is Android App Bundle?

It is a new publishing format by Google which is a more efficient way to develop and release app. App bundle helps to reduce your app size and deliver features on demand. Earlier, android operating system used android packaging kit (APK) to distribute and install applications on a device. These applications are downloaded by users across the world on various devices. These devices have different configurations and language inputs. To meet all the users demands, the application becomes bulky as all the features are to be downloaded.

Android App Bundle is a zip archive with .aab extension. It contains codes and resources for all the devices that the app supports. Google Play handles signing and generation, once it is uploaded for publishing. In app bundle, dynamic delivery is used to generate an optimized APK for users, based on their device configuration.

Benefits of .aab
The key benefit of android app bundle is that it the developers need to write less code to push the app in Play store. The users save space in their device by saving a small size APK. App bundles can use uncompressed native libraries in android 6.0 and up, that are stored in the APK instead of the users device. This lowers the download size and the size on disk. It serves users with functions they need on demand, instead of installing all the functions at one go. We don’t need to build and publish multiple APKs, therefore, app bundle also simplify the built and release management.

How Android App Bundle works
Android delivers APKs with the required resources using split APK mechanism. Google Play uses this mechanism to split large apps into smaller APKs, as per the device requirements.

According the Google, there are 3 types of APKs:
a) Base APK: This is the first mandatory APK to be installed. It contains the basic requirements for the application. This APK contains codes and resources that other split APKs can provide. Only the base APK’s contains full declaration of your app’s services, permissions, platform version providers and dependencies of system features. It is important that all codes and resources included in this module are included in the base APK.

b) Configuration APK: It contains specific data, based on the device requirements. Configuration APK is generated by Google Play from the app bundle that is uploaded to the store. Each of these APKs includes native libraries and resources for a specific screen density, CPU architecture or language. When a user downloads the app, their device downloads only the specific APKs for that device. You don’t create separate module for configuration APKs. If you use standard practices to organize alternative, configuration specific resources for your base and dynamic modules, Google Play automatically generates configuration APKs for you.

c) Dynamic Feature APK: These are the optional features installed required by the user. Each of these APKs contains code and resources for a feature of your app that is not needed when your app is first installed. Using the play core library, dynamic APKs may be installed on demand after the base APK is installed on the device to provide additional functionality.

Android Application Bundle Format
An Android App Bundle is a file with .aab extension which you can upload to Google Play to support dynamic delivery. App bundles are signed binaries that organize your apps resources into modules. Each of these modules may be generated as separate APKs. Google Play uses the app bundles to generate various APKs that are served to users.

Android-App-Bundle-pCloudy_blog

Image Source: https://developer.android.com/guide/app-bundle/


App Bundle’s files and directories:
Base/, feature 1/ and feature 2/: Top level folders that contain different modules of your app. The base directory contains base module of the app. The directory for dynamic feature module is given the name specified by the split attribute in the module’s manifest.

Bundle-Metadata: Metadata files include complete list of the app’s DEX files and Proguard Mappings. Files in this directory are not packed into the app’s APKs.

Module Protocol Buffer files (*.pb): Provides metadata that describe the content of each module to the play store. For example, native.pb and resource.pb describe the code and resources in each module, which is used when Google Play optimizes APKs for different device configurations.

Manifest/,DEX/: Unlike APKs, app bundles stores the androidmanifest.xml and DEX files for each module in a separate directory.

res/, libs/and assets/: These directories are used in the same ways as APK, except that for an app bundle, they are used by Google Play to package only the files that satisfy the target device configuration.

root/: This directory stores files that are later relocated to the root of any APK including corresponding module.

How to deploy App Bundle
Unlike APKs, App Bundles cannot be installed on a device. It is an uploaded format which contains compiled code and resources in a single build framework. Once we upload out signed app bundle, Google Play builds and signs the apps APKs and serve them to users through dynamic delivery.

Testing your app bundle with Google Play Internal Test Track
You need to generate signed in app bundle before you can upload your app bundle to the play console. Proceed with these steps to generate a signed app bundle.

  • Select Build then select Generate Signed Bundle/APK from the menu bar. In the Generate Signed Bundle/APK dialogue, select Android app bundle and click on Next.
  • In the Module dropdown menu, select the base module for the app you want to generate app bundle for.
  • Provide information for an existing key and keystore, or create a new. This is the same type of key and keystore information you provide when building a signed APK.
  • I you want Android Studio to also save your signing key as an encrypted file, check the box next to Export encrypted key. To be able to upload your app bundle and take advantage of dynamic delivery, you need to upload this encrypted file to the play console and enrol in app signing by Google Play.
  • Click Next and provide a Destination Folder for your app bundle. Select the Build Type and flavours that you want to generate app bundles for.
  • Click Finish.

Now you have generated a signed bundle, you can upload your app bundle to the play console.

Testing your .aab file on pCloudy
pCloudy supports .aab format and the user can upload the App Bundle instead of “.apk” to test their app on the device cloud.

Conclusion
Android Application Bundles is a big step forward in the area of application publishing and uploading. It has reduced the size of APK of your application which leads to more download of the application.

Suyash Dubey | Posted on | 2 min Read

Single Sign On

Single sign on is a process of authentication where user can access multiple applications and portals with one set of credentials. With SSO a user logs in with a single ID and password to gain access to a connected system. Single sign on must internally store the credentials for initial authentication and then translate them to the credential required for the different mechanisms.

SAML 2.0
SSO services uses security assertion mark-up language (SAML 2.0) which is an XML standard that facilitates the exchange of user authentication and authorization of data across secure domains. SAML simplifies the authentication and authorization process for the user, an identity provider and a service provider. When the user attempts to access an application, the service provider will send a request to identity provider for authentication.

Benefits of single sign on
SSO reduces risk for access to third party sites (user passwords not stored externally). It also alleviate password fatigue from different user name and password combinations. Reduces IT cost due to lower number of IT help desk calls about password. Reduces time spent re-entering password for the same identity.

pCloudy SSO integration architecture
Sequence of events for integration of SAML 2.0 Authentication

  • The user attempts to reach a web application at a service provider (SP i.e pCloudy Set Up).
  • The service provider generates a SAML request and redirects the user to the IdP’s SSO URL with the generated request.
  • The IdP authenticates the user and generates a SAML response.
  • The user is redirected back to the SP with the SAML response.
  • The SP verifies the SAML response.
  • The user is successfully logged-in to the SP’s web application.

Single Sign On feature in pCloudy_1

Note: pCloudy has included this feature in Enterprise set up Private Cloud and On-Premise Cloud.

SAML assertion
SAML assertion is the XML document that the identity provider sends to the service provider, that contains user authorization. There are Three types of SAML assertion:

Authentication assertion – It proves identification of the user and provide the time the user logged in and what method of authentication they used.

Attribute assertion – It passes the SAML attributes to the service provider. SAML attributes are specific pieces of data that provide information about the user.

Authorization decision assertion – It says if the user is authorized to use the services or if the identity provider denied the request due to password failure or lack of rights of the service.

SSO solves the problem of managing the increasing number of users across an ecosystem of application and services. It is a step forward in the optimization of pCloudy integrated architecture.

‘Metrics’. This term has become one of the widely used terms today in enterprise mobility especially for measuring mobile app performance.

Let us first understand why are the metrics are so important to analyze the performance of an app.

Generally, app developers consider mobile app performance testing as an afterthought. Mobility teams have to meet stringent deadlines and for them, testing the performance of an app has the least priority. To them, passing the functional tests meet all critical criteria for launching an app. Well, let us find out why is performance such an important criterion for mobile app testing.

Reasons why measuring Mobile App performance is such an important criterion:

1. Speed wins: As per the Compuware report, users expect their apps to load in about two seconds. This can even be proven right by the SEO reports from Google, which considers the site speed as an important parameter for Page ranking.

It is important for mobility teams to understand that your users want their apps to respond in about two seconds or less. Anything beyond two seconds, and you might lose your business.

Once the app starts taking anywhere close to five or 10 seconds, users start shifting to your competitors.

2. Mobile App Error Rates are probably much higher than it seems: You must have struggled with issues like images not loading, network errors, content feeds leaving blank holes in the app, timeouts, crashes, freezing, upload failure etc. Most of these issues are not errors of apps but caused by unreliable networks.
The error rates are highly variable and depend on network conditions. In the United States, we’ll typically see 3% error rates, whereas in India, China, and on challenging networks in Europe and Asia, we see error rates up to a frustrating 12%. Not measuring and then getting a handle on mobile app errors will quickly result in frustrated customers, uninstalls and 1-star reviews in the app stores. And no one wants that.

3. 5 star app rating: Reviews and ratings have become important aspects of judgment for any user before downloading your app. And the app should be perfect in all the ways to ensure a 5 star rating.

If you focus on functional tests and miss out on the mobile app performance not knowing, if too much battery is drained on a particular device, or is consuming too much data, then your Playstore might be full of negative reviews even before you market it well.

In this post, you’ll know how app monitoring performance works so that you can get the best out of your Smartphone software.

What is application performance management? 10 APM features that we can tick right off our fingers are:

  • Troubleshooting of disruption of frequent speed and uptime
  • Monitoring of the speed at which transactions are performed by end-users and systems
  • Use of a single integrated suite of software tools
  • Load-testing
  • Synthetic monitoring
  • Real-use monitoring
  • Root-cause analysis
  • Web-performance monitoring, to gauge app speed and uptime
  • An end-to-end overview of bottlenecks
  • Review of service interruptions

APM is integrated through the lifecycle of an application including the pre-deployment and post-deployment stages. It is therefore important for developers, testers, and business teams. A slow load can be prevalent due to a host of issues related to APIs, servers, or browsers. APM techniques are what help pinpoint the actual problem.

Basic availability monitoring involves testing IP protocols and network services, but a user needs to establish some optimal performance thresholds and real-time alerts to monitor and manage both speed and reliability.

Tips for monitoring app performance

Performance monitoring must take into account certain things in order to optimize user experience. These include measuring from the user’s point of view, i.e. performance, stability, and resource utilization in real time the way the user perceives them.

The context is crucial too. It’s important to determine how many users were affected by a slowdown, and what action on a specific operating device prompted the disruption. To truly experience a ‘mobile moment,’ you should follow these tips for monitoring your app performance:

a) Measure Frame rendering time
Only measuring network time doesn’t cut it out for users, who are interested in when the network resumes as well as when it responds.

Measuring response time by the device or operating system allows the product manager to focus on one platform at a time, respond to performance issues, and deploy resources accordingly.

b) Measure battery usage
It’s crucial to measure the battery consumption of your mobile app, along with data plan impact and memory usage. If the app is responsible for draining your battery, you should bring it in line with best practices.

Frequent updates can also be minimized so that user satisfaction can be increased.

c) Measure cell data consumption
Recent studies by Dimensional Research have shown that 20% of respondents stopped using apps that were heavy on data usage. This indicates that you should measure the consumption by app version, the total number of users, KBs of data consumed per minute, the amount of data being transferred per hit, and the percentage of data being consumed per hit.

d) Measure errors
HTTP errors from certain URLs need to be captured. This will help track the number of users who received an error, the actions that resulted in it, number of users with errors on app launch, the percentage of actions that led to at least one error, and the app version.

pCloudy helps you with performance profiling of your mobile apps. You can view the CPU usage, Memory usage, Data usage and Battery consumption while performing a series of actions on the app. The Real time mobile app performance monitoring feature helps you to keep track of the app’s performance while conducting manual tests. You can even check the performance consistency of the app by running automation test suites in parallel on multiple devices and by also simulating different network environments.

App Performance while conducting Manual Tests

The performance of an app can be viewed real-time while conducting functional tests. You can simply select the application installed on the device from the Tools section to view a graph of Memory and CPU usage, with the packets/bytes consumed in the Data Usage.

All information captured during a testing session is gathered by the platform and stored in a secure location to be used later. When a tester completes his testing session using a device, the performance related information can be found in the Cloud Drive.

Mobile App Metrics_pCloudy_2201_2

Battery Consumption
The Battery Consumption graph indicates Battery consumption by Device, Battery consumption by Application and Battery consumption in %.

CPU Consumption
The CPU consumption of an App is plotted as CPU consumption in percentage against Time Duration in seconds.

Memory Consumption
The CPU consumption of an App is plotted as Memory consumption in ‘Mb’ against Time Duration in seconds.

Mobile App Performance

You can listen to this webinar on Performance testing to find out how a cloud based solution can help your app perform well in all situations.

Priyanka Charak | Posted on | 2 min Read

Cross-browser Tests

 
There has been tremendous growth in the usage of the web in the past years. Internet users rose from 3.5 billion in 2017 to 4.1 billion in the year 2018 as per internet world stats. Also, according to internet live stats, there are around 1.5 billion websites in the World Wide Web network today. The development team puts in a lot of effort in building a website so it is important that the website should work hassle-free on all the browsers, equally. Moreover, almost everyone is dependent on the content that exists on the internet. On top of that, the content is available in more than 3000 different internet-enabled devices which is what is to be focused here. More devices, more ways to view the websites. So, here the real concern is-are all the users using different devices, able to view the website the way it is intended?

What is Cross-Browser Testing?
As the web grows, new technologies, tools to build the websites are also introduced simultaneously. But not all are browser compatible technologies. So, for browser compatibility testing, a developer needs to perform cross browser testing. It is nothing but to perform multiple browser testing for web applications and checking its compatibility with different operating systems, screen resolutions and devices to find out if it meets the developer’s expectations. When it is about web applications, it is an important task to ensure they are fully functional across multi-browser settings and it provides a good experience to the users, irrespective of the device and the browser they use. Browser test is a ‘must-have’ because there are chances that the users might not come back once they face any problem or do not get good site experience.

5 reasons why testing is incomplete without cross-browser tests

Let us understand more deeply as in why Cross Browser Testing is important and what purpose it serves.
1. Every Browser interprets differently:
Every browser is different and carries a unique ability to interpret things differently i.e not all the codes are understood by different browsers in the same way. So, a coder must ensure that all the browsers interpret the commands in a similar way to give the intended user experience through the website. Also, since there are multiple browsers with different versions, it becomes challenging to know if the website works well on all versions. Cross browser testing tools help in testing multiple browser and its different versions.

2. Different Mobile Platforms:

One of the main reasons why Cross browsing Test has become important is because of different mobile platforms available today. Multiple mobile devices are launched every year so it is imperative for a mobile website to open properly on each device correctly. There are different sets of browser combinations preferred by the users so the organizations can focus on those combinations of proper functioning on mobile devices. Testing teams need to test on different mobile browser versions because it becomes challenging to understand which version the user is using. Even the CSS runs differently on each version so cross-browser testing tools can check the same easily.

3. Fewer Bugs:
Cross-Browser testing is one of the rigorous tasks that the QA team has to perform but at the same time, it is a great move to introduce this practice because this would reduce time in testing across different browsers, simultaneously. To make every minute component and feature function properly and to avoid any last-minute complications and bugs, cross-browser testing should be performed to make sure all browsers and its versions are functioning correctly on all platforms. Web traffic data can be helpful to understand what browsers our users use frequently which can be used as information to focus only on important parts of testing.

4.Re-usable tests :
With Cross Browser testing, there’s no need for creating and maintain separate browser tests for each browser platform. The tests can be reused in different supported browsers with the help of different test automation technologies. The cross-browser tests can be created by custom scripts apart from the cases where the custom solution fails.

5. Free tools available:
There are many free tools available to perform web and mobile automation such as Selenium WebDriver and Appium. Most of the cross-browser test automation tools are based on open source automation tool i.e. Selenium which has a great User Interface making it easier to perform cross browser testing on multiple browsers.
There are many widely used web browsers, but not all browsers, and versions of those browsers work the same. A website may not look or function identically on each one, which can lead to lost revenue for an enterprise. We at pCloudy addressed the issue of choosing from the fixed set of browsers previously available. Heeding to the growing demands of our users, we have introduced the Launch and Upload browser feature for our Android users which will give him the freedom to choose the version of the browser that he wants to use. This is going to save their testing time and efforts to a great extent and also give better results for their cross browser test. For more information, visit pCloudy

Priyanka Charak | Posted on | 2 min Read

Trends in 2019

 
The mobile devices and applications have witnessed a constant progress in the year 2018 making the mobile app industry one of the largest. The burgeoning number of mobile apps can be seen in 3rd quarter statistics of the year 2018 with the numbers rising to 2.1 million for android based and 2 million for iOS based mobile apps. The mobile apps industry is estimated to generate approximately USD 189 Billion by 2020 according to Statista Research. Considering how greatly the mobile app market has grown in the past year, the mobile application testing trends in 2019 seems to bring out even the better version of the former .

With the innovative technologies introduced every year, the users and developers of mobile app ought to get the updated and enhanced versions of mobile apps which can be achieved through steady Mobile App test automation and deployment. Few trends that can be seen in 2019 are as follows:

1. Machine learning and AI in testing:
Machine learning and Artificial Intelligence in Testing has already been the talk of the town in 2018. It is going to bring revolution in the mobile testing world by bringing changes in the processes and workflows of the testing cycle. It is going to be used for test suite optimization to identify the inessential and unique tests. It is also going to be a great contributor in the predictive analysis of the test cases. Machine learning would also be responsible to perform log analytics meaning to identify the test cases that need to be executed automatically.

AI has already made its stand in mobile apps space by manifesting itself in the form of bots and virtual assistants. Artificial Intelligence in testing platform would certainly recognize any changes faster than a human along with the constant updates in the algorithms. Most importantly, it is going to be used to identify risks areas of the mobile application in order to prioritize regression testing. The growing demand for quality at speed is forcing enterprise mobility to test faster than ever. Automation testing alone is just not enough. AI powered bot tests to run deep exploratory tests or crash tests in lesser time with enhanced quality reports can solve the purpose.

pCloudy has launched Certifaya which is the AI-powered app testing bot which automatically tests the mobile apps over multiple devices giving the real-time insights about the app behavior and performance to its users. It also allows screenshots, session videos as well as provides detailed logs and quick fix rectification recommendations. It has analytics-driven testing engine uses machine learning algorithms to navigate through the app and detect issues. It also allows to generate reports on the critical issues like crashes, leaks , slow response time etc.

2. Popularity of IOT:
Just as AI in testing is gaining popularity, IOT is also gaining momentum alongside with more and more devices getting connected to the internet. With the introduction of IOT, IOT testing will make more sense. IOT testing would be applied on the IOT based devices to test the usability, compatibility of the IOT system; for the simulation of the sensors, for data validation integrity; for user authentication and data privacy, and finally test the performance of the connect IOT devices.

3. Impact of 5G: 5G will be the 5th generation of the mobile network. Move from 4G to 5G is a great shift in the network ecosystem. It will be responsible for greatest bandwidth for uploads and downloads.

eMBB (Enhanced mobile broadband) The introduction of 5G networks in the mobile devices is going to present the advantages of high speed, security, and reliability than ever. According to statista, there is going to be around 20 to 100 million 5G connections by 2021.Test automation, built in systems and monitoring would be required to test the 5G powered mobile apps by analyzing the performance of the network. Along with 5G, 3GPP identifies three main aspects of 5G technology that co-exist in the same network infrastructure, namely:

-eMBB: provides greater bandwidth for uploads and download speeds , reduced network latency and will enable rich media apps like mobile AR/VR and 360 degree video streaming.

-URLCC(Ultra Reliable Low Latency communications): URLCC provides benefits like , real time virtual reality gaming, robot-enabled remote surgery, autonomous driving, factory lien automation etc. The technologies that enable URLCC are in the process of being standardized and will enable high end latency sensitive tasks.

Massive Machine Type Communication: It is a narrowband access type to sense, meter and monitor the use cases.
Undoubtedly 5G is a paradigm shift towards user and application technology framework and testing the overall communication behavior of the devices would be the key focus in the testing space related to 5G.
mobile application testing trends in 2019


4. Performance testing to performance engineering:
There are many factors like usability, performance, security, hardware, software, configuration, etc. that contribute towards the performance of a mobile app. Now , the performance testing will not be about running the test scripts, rather it will be focused on prioritizing the factors and analyzing the highest value amongst them in order to deliver the high quality product.

5. Manual and Automation merger :
This practice has been followed in the previous times and it will be carried forward even in 2019 due to the combined benefits of both the types of testing. Although manual testing dominates the market specifically in the areas of usability and design, but it will still go hand in hand with the efficiency of mobile automation. We have already initiated that with our breakthrough feature Follow Me where we have tried to automate the use cases of manual app testing on multiple devices.

6. Shorter Delivery Cycle:
Up gradations in the technologies and the devices makes the software developers think a bit more about the development process i.e to shorten the delivery cycle. The choice of right mobile app testing tools and test management is going to play a major role in these decisions.

7. Cloud Apps:
Cloud apps have always been a part of the successful quality assurance decisions. Focus will be more on building the cloud apps that require minimum operational costs and high productivity. In 2019, it is estimated that the number of cloud based apps will increase from $30 Billion in 2014 to $66 Billion in 2019 and so would be the need for the cloud based testing for the cloud mobile apps.

The above stated trends would help testing team to acquire right skills and tools for investing time and effort to the right focus area. Smartphones being the future also allows the mobile apps to be a part of the process. Hence, making it noteworthy for the upcoming generations. To stay ahead of the challenging environment, one must be aware of the above trends in Mobile App Testing in 2019.