Category Page

Category:

Cross Platform Mobile Test Automation Using Appium

March 21st, 2018 by

Mobile Test Automation Using Appium

 
With growing demand in the market, enterprise mobility has undergone a paradigm shift. Speed, quality and user-friendliness are the need of the hour for modern enterprises. Mobile apps have become a major source of revenue boosters for enterprises today.

It is a well-known fact today that the numbers of platforms and device types are more varied now than ever before. Customers continue to demand the latest devices, features and functionality, as well as increased mobility and accessibility. With the proliferation of mobile and portable device platforms and the Internet of Things, the workload of developers, and especially testers, has greatly increased. As traditional testing practices of manual app testing prove unable to keep up with the demand, businesses of all types are experiencing significant product delivery delays and, in some cases, costly product defects. Naturally, there is a growing demand for more efficient and cost-effective testing across all platforms.

Appium: Addressing the complexities of mobile app testing

To address the demands of complex testing needs, an effective mobile app testing platform is needed which is secure, supports functional and automated testing without losing an eye on the speed and quality. So, in this era where consumers have adopted smartphones, use multi-platforms to access mobile devices, do you think your app is delivering the best experience to your users? If not, then Appium is the solution. Appium is an open source, cross-platform mobile automation tool to automate the test for native, hybrid and mobile web apps.

Appium being one of the best solutions for automation comes with support for Android and iOS real devices. In fact, it also comes with support for simulators and emulators. At its core, it an HTTP server written in node.js. It has similar working as Selenium which actually perceives HTTP requests from selenium client libraries and handles those requests in different ways depending upon the platforms.

Being the best and widely used option available today in the market, it is widely adopted by modern enterprises to create a comprehensive mobile automation framework. With a growing user base and a stronger community, it is easier to adopt and implement which is why enterprises are adopting it on a very large scale. The best thing about Appium is that it lets you write in any language supported by Selenium using WebDriver API.

While testing an Android app, Appium automates it with the help of UIAutomator library, a part of Android SDK. This actually makes the learning and implementation easier for Selenium users. Having the capabilities to test on both Android and iOS devices makes it the best cross-platform mobile app test automation tool. Automation scripts can be run on real Android and iOS devices using the WebDriver JSON Wire protocol.

Appium starts a test case on the device that spawns a server and listens for proxy commands. On iOS, Appium proxies command to a UIAutomation script running in instruments.

AppiumSource: cloud.netlifyusercontent.com

Appium: Why should you Choose?

 

  • Opens the door to cross-platform mobile testing which means the same test would work on multiple platforms.
  • Unlike other tools, it doesn’t require any third-party code to compile into your app to make it automation friendly.
  • Enables a variety of frameworks and programming languages by wrapping the vendor-provided frameworks in the WebDriver API that specifies a client-server protocol.
  • For a tester, the programming language and the whole experience would remain same irrespective of the automating platform as all complexities are under the hood of Appium server
  • Possible to Execute multiple tests on multiple platforms without the need to manage them.
  • Able to run test sequences with hundreds of test cases, across multiple platforms.
  • Enables the view and share of device interactions with colleagues using in real-time built-in collaborative screen casting
  • On-demand testing and leverage results directly
  • It supports automation frameworks like JUnit and TestNG



Appium has some challenges when it comes to scaling up with continuous integration. pCloudy brings to you a solution for this where you can automate your app tests with zero learning. Sign up on pCloudy and automate your tests on Appium for faster and better delivery of apps.

Welcome to pCloudy 5.0

February 20th, 2018 by

pCloudy 5.0

 

pCloudy is a unified mobile app testing platform which is trusted by its users for its excellent performance. We have more than 30,000 users across the globe, and we have received an overwhelming response for our platform. From bot testing to crowd testing, pCloudy has always been a front runner in the market. And with the launch of pCloudy 5.0, we are up for the challenge once again. It is a re-imagined and re-worked upon platform created in-line with intelligence to meet the market demands and accelerate delivery.

 

Let us have a look at what’s new here:

 

 

 

Features

 

a. iOS Connect
b. Automation Studio
c. Follow Me

 

a) iOS Connect: One of the very powerful features that we added is the iOS Connect. The major challenge iOS developers had been facing was the debugging of their iOS apps because of the difficult Apple guidelines regarding building any utility . We are proud to say that we have been successful in cracking that.
With iOS Connect, you can connect to an iOS Device which is present remotely and access the device as if the device is connected to your computer. With iOS Connect we are bridging the gap for the iOS development life cycle.

 

iOS Connect

 

b) Automation Studio: It is another promising feature that can revolutionize mobile app automation. We now have an in-built automation studio in pCloudy platform where you can access the devices to record your test scripts and execute it in parallel on multiple devices without writing any code.

 

There’s something more to it! If you already have your projects on Appium you can record your new workflows and export it to Appium Java format. This new integration would not only enable every user to start creating Automation scripts but it will also help Appium users to speed up their Automation. This makes pCloudy truly a Unified app testing platform.

 

Automation Studio Launch

 

c) Follow me: It is again one of the ‘wow’ features of pCloudy 5.0. This feature can speed up your App Testing exponentially. Follow me allows you to test your apps on 3 unique device while performing your test on only 1 device, thus saving your testing time multi-folds.

 

Follow Me

 

Re-Imagined UI

 

It has been designed to give a leaner, simpler and faster user experience. The look and feel of the pCloudy platform has been transformed keeping in mind the requirements, usability and ease of our users. All the pages have been made more intuitive. To simplify, we have grouped the actions together to save your time in figuring out the next step.

 

a. True Collaboration
b. Global File Storage
c. Comprehensive reports at a single stop
d. Test Scheduler

 

a) True Collaboration: We have introduced a powerful feature on our revamped Device Interaction page. Now, you can take the screenshot of the action you are performing and see the screenshot next to the device. But, the icing on the cake is that you can edit the screenshot, save it and log a bug directly to the JIRA enabling true collaboration between the developers and testers.

 

UI Design

 

b) Global File Storage: Heeding to the demands of our users we have reduced the clicks to perform any action on the File browsing /storage page. The file uploaded once will be available across all the different locations we have. It will also allow sharing of files across teams.

 

Global File Storage

 

c) Comprehensive reports at a single stop: Now, to make the user experience simpler and faster, we have placed all your reports at single stop be it manual or automation across all locations. Not just that, you can see all reports in the same format with much detailed information. Raising bugs after analyzing reports is also possible from here.

 

comprehensive-reports-at-a-single-stop

 

d) Test Scheduler: We have re-designed this page based on a Guided interface where the interactions are more thoughtful, straightforward, and guide you to the next step. It needs zero learning to run automation scripts on multiple devices.

 

Test Scheduler

 

pCloudy 5.0 is another breakthrough for us. After launching pCloudy 5.0, it is time to get feedback on a larger scale. We’re going to continue improving the UI, the navigation, and add some futuristic features to make your app testing simpler and faster. While we do that, we’d love to continue getting feedback.

Selenium for Mobile App Testing

January 19th, 2018 by

Selenium

 

All automation development and testing engineers are very well aware of ‘Selenium’ which is the de-facto testing framework for web applications. With the changing mobile landscape, Appium is the most used framework for testing mobile apps. But is it possible to use Selenium for mobile application testing? The direct answer is ‘Not really’ but there is a long and different approach to this answer.

 

Appium is the most popular mobile application test framework which can be used to test all native, hybrid, and mobile web apps for iOS and Android. It is also used for cross browser testing that involves testing on real devices and real browsers. The fact is that Appium has got its roots from Selenium and it uses JSONWireProtocol to interact with iOS and Android apps using Selenium’s webdriver.

 

Appium/Selenium Architecture

In a typical architecture, Appium is an HTTP server written in Node.js that produces and handles multiple WebDriver sessions. Appium starts tests on the device and gets commands from the main Appium server. The server is mainly the same as the Selenium server that gets HTTP requests from Selenium client libraries.

 

The image below is an example to show how test scripts can run on our pCloudy platform. Don’t forget to watch the video on ‘How to run Appium scripts on pCloudy‘ here.

Appium pCloudy

Now that we know a bit about Selenium and Appium testing framework, let us understand the new term in Android app testing – ‘Selendroid’ which is a framework based on Selenium for automated app testing.

 

In other words, Selendroid is a test automation framework which can interact with multiple devices concurrently that can be tested without any modifications. It is also known as “Selenium for Android” for testing native and hybrid mobile apps and mobile web.

 

Let us have a look at some of the features of Selendroid:

a) It is an Open Source and is free to use
b) It supports all Android versions
c) It supports Selenium as a scripting language
d) It supports webdriver compatible languages eg: Perl, Java, C#
e) It can work on both emulators and real devices
f) It works on all native, hybrid and web-based apps
g) It is effective while executing native and cloud-based apps as it supports Selenium grid
h) It is very easy to implement.
i) With its feature called ‘Hotplugging’, it can recognize the new devices automatically.
j) It has a built-in Inspector to simplify test case development.
k) It can support various Android API versions from Android API 10 to Android API 19.
l) It can fully support parallel testing by integrating a node into Selenium grid.

 

Selendroid Architecture:
Selendroid is based on the Android Instrumentation framework where tests are written using Selenium Webdriver client API, which is also called as Selenium 2 client. Hence, it can be fully integrated with existing Selenium frameworks. It is also compatible with JSON Wire Protocol.
Let us have a look at the architecture of Selendroid:

Selenium for Mobile App Testing

To conclude, Selenium has paved its path as a de-facto web test automation framework and Appium is providing high-level APIs that can be speedily adopted by Selenium developers, and it helps simplify the tests.

Automation Testing – Best Open Source Tools For Mobile Apps

May 18th, 2017 by

Why Mobile App Automation Testing?

Testing of Mobile Apps in quite cumbersome because of sheer magnitude of testing required on variety of devices. Moreover, Mobile Apps require changes faster than other kind of Applications (Web or Desktop). That’s the reason, more and more organizations have started realizing the need of using automation testing over manual testing as much as possible.

 

Mobile App Automation Testing can be a massive undertaking, and if unaware, one can end up complicating the process by selecting a bad tool. With a major trending shift to open-source mobile test automation tools, there have been a plethora of tools available in most open-source software markets.

 

So how do you know which are the best software testing tool available in the market? Which tools will give you the most efficient solution to fulfill your enterprise’s need for speed and integration? Will manual testing suffice your app testing needs?

 

This blog post is to help you quickly choose which open-source test automation tool will be right for your automation testing

 

Benchmarks for selecting the right tool

You would need a set of criteria to fulfil when assessing your selection of the right open-source automation tool. Here are a crucial few questions to ask:

 

  • Do you have the required skilled resource for automation tasks?
  • Is there ease of script development to support agile processes and shorter iteration cycles?
  • Does the tool support cross team collaboration for seamless use by QA and Dev?
  • Can it match app platform with test development language?
  • Will it have performance capabilities gaps while testing?
  • Will it support both real devices and emulators?
  • Does the app support multiple platforms — Mobile and Web?
  • Does it have multi device execution capability
  • How easily can it integrated with external Device cloud platforms?

 

Best Open-Source Mobile Testing Frameworks to use:

To take the final call, testers must have a strong awareness of the tool’s strong and weak aspects, what it can do and what it cannot, and find a balance between cost and benefit.

 

These are top highly adopted open source test automation frameworks available in the market. Each of these frameworks are backed by different communities due to their unique offerings to the target audiences and relevant platforms. The overall benefits are that they cover a wide range of devices. However, for technical clarity it’s important to know the pros and cons of the framework based on your mobile and web testing needs:

 

1. Appium: Widely adopted, it is the leading open-source test framework for mobile app (Android, iOS) test automation.

 

Pros:

  • Best suited for QA teams to test the functionality of mobile web, native and mobile hybrid apps across iOS and Android.
  • Its reports are limited from debugging and fast feedback loop.
  • Supports development tools using any WebDriver compatible language including Java, C#, Ruby etc.
  • Cross Browser Support and cross platform capabilities

 

Con: It is less suitable for performing and developing unit testing.

 

2. Calabash: It is a Behavior-driven development (BDD) test framework based on Ruby development language.

 

Pros:

  • Has a large community support
  • Cross platform development support (Android and iOS)
  • Provides solid reports and insights to QA and Dev teams
  • Easy path to both develop and test features in parallel
  • Simple and easy-to-read test statements

Con: It is not friendly to languages other than Ruby.

3. Espresso & XCTest UI: Both are very similar tools as they were designed for the target users. Espresso for Android and XCTest for iOS are fully maintained by Google and Apple, assuring the latest features for respective platforms.

Pros:

  • Latest feature integrations assure lead in market curve for developers and testers
  • Easy to develop techniques including test recorders
  • Support both types of unit testing and functional UI

Con: Both are app context only, which means limited ability to test for user condition scenarios

4. Selendroid: An open source automation framework which drives off the UI of android native, hybrid and mobile web application. A powerful testing tool that can be used on emulators and real devices. And because it still reuses the existing infrastructure for web, you can write tests using the Selenium 2 client APIs.

 

Pros:

  • Can interact with multiple Android devices and simulators simultaneously
  • Can simulate human actions like touch, swipe, drag etc. on devices
  • Supports development tools using any WebDriver compatible language including Java, C#, Ruby etc.

 

5. Robotium: Widely adopted open source Android test Automation framework.

 

Pros:

  • Easy to write powerful test scenarios
  • Full support for native and hybrid Android Apps
  • Easy to use recorder
  • Handles multiple Android routines automatically

 

6. EarlGrey: EarlGrey is a native iOS UI automation test framework that enables you to write clear, concise tests. It integrates with Xcode’s Test Navigator so you can run tests directly from Xcode or the command line.

 

Pros:

  • Works directly from XCode
  • Full support for native and hybrid Android Apps
  • Synchronization features which automatically synchronizes with the UI and network requests.

 

mobile app automation testing

 

Would you like to know how to use Automation Testing on Real Devices with pCloudy? Click Here

Automation Testing on Real Devices

October 13th, 2016 by

Mobile Automation Testing

 

pCloudy provides you the cloud platform to perform Automated Testing on Real Mobile Devices. To schedule automated testing over pCloudy, go to the Automator page. Here, you can use filter your devices based on mobile OS (android/iOS) and test automation framework (Calabash/Robotium). Further, you need to choose application file (.apk/.ipa), zip file of test script, enter time duration (default – 15 minutes), test cycle name (default – Test cycle). Now, browse, select and add desired device(s) to schedule test automation.  When test automation gets completed, you will get an email reminder for the test completion.

 

Mobile Automation Testing

Automation Execution on Multiple Devices in Parallel

September 19th, 2016 by

By using pCloudy Test Automation, you can execute your test automation Parallel Runs on Multiple Devices as well.

 

  • Navigate to Test Automator page of pCloudy.
  • Select the filter to choose if execution needs to be done Android or iOS.
  • Select the devices from the given list. User can select minimum one & maximum all the devices for the parallel run.
  • Choose the test framework for test automation execution.
  • Choose the application to be tested and test suite for the same.
  • If the test suite takes 25 minutes to execute completely on one device locally, then you need to add some buffer say for another 10 minutes and change the time to 35 minutes.
  • Finally set the test cycle name of your choice and click on the Schedule button.
  • Upon confirmation the same the platform will schedule the automation execution selected devices.
  • When test automation process gets completed on all devices, you will be informed through a mail with the link to see the test report.

Test Automation

Robotium Automation Execution

August 28th, 2016 by

Robotium automation testing tool for Android

 
pCloudy allows you to run your Robotium test script over android devices. Robotium is an open-source test framework for Android applications.

Here are steps to run Robotium test script over android device:

  • Login over www.pcloudy.com with your registered Email ID & Password
  • Go to the Automator Page
  • Select Android OS version & Manufacturer
  • Select and add desired device
  • Choose Robotium (to run Robotium test scripts)
  • Select Application .apk file (the App to be tested)
  • Select Test Script .apk file (the Test Script developed for testing)
  • Enter Single Device execution Time (Time required for the entire script to be executed on single device)
  • Enter Name of your Test Cycle (this name will represent your Test Cycle)
  • Click on Schedule Test Cycle

Robotium
 
In the next step, you need to confirm schedule of test automation. Here, you can see your selected application, test script, device etc.
robotium-confirm-test-cycle
 
Further, you get a pop up message of test automation schedule confirmation.
Click on OK to proceed.
robotium-simple-online-device-cloud
 
Finally, you get Cloud Automator Report of your scheduled test automation.
robotium-cloud-automator-report

Automated Testing Using Espresso

August 25th, 2016 by

Automation Testing With Espresso

 

Now you can run your Espresso Scripts on hundreds of Mobile devices over pCloudy.com.

Espresso is a testing framework for Android apps. The platform allows you to write concise and reliable Android UI tests. pCloudy.com provides you the platform to run these scripts on multiple mobile devices of your choice.

Here are the steps for running your Test Scripts on multiple Android Devices:

  • Login over www.pcloudy.com with your registered Email ID & Password.
  • Choose Instrumentation Type based on your Test Scripts you’ve written. pCloudy provides support for Instrumentation Type
  • (InstrumentationTestRunner, AndroidJUnitRunner) for Android. For more information, see Instrumentation in the Testing Fundamentals section of the Android Developer Tools documentation.
  • Go to the Automator Page
  • Select Android OS version & Manufacturer
  • Choose Espresso (to run Espresso Scripts)
  • Select Instrumentation Type (TestInstrumentationRunner/AndroidJUnitRunner).
  • Select Application .apk file (the App to be tested)
  • Select Test Script .apk file (the Test Script developed for testing)
  • Enter Single Device execution Time (Time required for the entire script to be executed on single device)
  • Enter Name of your Test Cycle (this name will represent your Test Cycle)
  • Click on Schedule Test Cycle

test-automator

In the next step, you need to confirm schedule of test automation. Here, you can see your selected application, test script, device etc.

confirm-test-cycle

Further, you get a pop up message of test automation schedule confirmation.

Click on OK to proceed.

test-cycle-scheduling-successful

Go to your mailbox and open pCloudy Automation Alert mail.
Click on the given link “Click to view Report”.

simplest-online-device-cloud

Finally, you get result of your scheduled test automation.

cloud-automator-report

Beginners Guide to Mobile Web Debugging on Real Devices Using Chrome DevTools

August 17th, 2016 by

Chrome Developer Tools

Introduction

Testing a Mobile Web App can get knotty, especially when there are issues like obfuscated HTML/CSS/javascript code, improperly implemented HTTPS, browser inconsistencies, page load performance and so on. Moreover, few things like can be extremely agonizing while striving to support as wide a range of mobile devices as possible. So how do you overcome these issues? Using a Web Developer Tools or debugging extensions make debugging your web application easier. Here we’ll talk about the most popular one – the open source Google Chrome Developer Tools.

The Google Chrome Developer Tools is a consolidated environment built into Google Chrome Browser. It is used for web authoring, debugging, monitoring, optimizing, and understanding web applications or websites. (Sourced from Google Chrome DevTools)

Here are some of the key Chrome DevTools features

  • Inspect and edit the DOM and CSS of your website in real-time
  • Run code snippets from any page
  • Debug Obfuscated code
  • Set advanced breakpoints and debug JavaScript using graphical debugger
  • Troubleshoot Security issues
  • Analyze run-time and page performance to improve the speed of your app
  • Trace reflows and repaints as your app loads

The Chrome DevTools provides almost all the gears required to inspect, debug and monitor the performance of a Web App/mobile web. It also provides additional capabilities to simulate Mobile Devices to test and build mobile-first, responsive web sites. You can even debug web content on a real Android Device from a development machine. But, is it enough to test your Web App on just one or two devices?

Remote debugging using Chrome DevTools in integration with pCloudy’s Mobile Device Lab

Device fragmentation is a very real problem when testing Web apps on real devices, particularly for UI and functional tests. The number of devices with unique specifications and proprietary build variations has increased. At an advanced level, to fully test your Web App’s responsiveness and performance on real devices you will need to experiment your site on various platforms, across a number of device form factors. pCloudy’s Mobile Device Lab offers complete integration with Chrome DevTools to test your apps on real devices. This integration allows you to test Web Apps on a myriad of android devices with different sizes and configurations.

Here’s how most App developers test their Web Apps

Inspect and live edit your site’s design and content

Test and edit your site in live mode by inspecting all the HTML and CSS in your page. In the Elements Panel, you can live-edit a DOM node by simply double-clicking a selected element and making changes.

Chrome Developer Tools

You can even live-edit style property names and values in the Styles pane. Examine and edit box model parameters.

Live-Edit_Styles

It is also possible to edit the current element’s box model parameters by making changes to top, bottom, left, right values for the current element’s padding, border, and margin properties using the Computed pane.

Box_Parameters

Remote Debugging on real devices to fix errors in the code

Debugging Obfuscated Code: Make your code readable and easy to debug even after you’ve combined, minified or compiled it. You can easily change the formatting of your minimized code by clicking on { }.
Debug-Obfuscated

Test the and optimize the performance of the Web App

The Network Panel allows you to see how your page renders, and time taken to render from start to end. To do this click into the “Network” panel, click on the camera icon and refresh the page on the device.

Chrome Dev Tools

The Timeline panel helps you to record and analyze all the activities in your application as it runs. It’s the best place to start investigating perceived performance issues in your application.

To make a recording of a page load, open the Timeline panel, open the page that you want to record, and then reload the page. The Timeline panel automatically records the page reload. You can also record page interactions on the page and view the performance details through the recorded timeline.

Here are some more details you can view using the Record Timeline

  • Record the Timeline to analyze every event that occurred after a page load or a user interaction
  • View FPS, CPU, and network requests in the Overview pane
  • Click on an event within the Flame Chart to view details about it
  • Zoom in on a section of a recording to make analysis easier

Timeline

Conclusion

“Using the right tools for the right job” is an old aphorism that applies to all domains including Software Development. As we’ve seen, Chrome Developer Tools has several features that helps you develop better, debug faster, and measure efficiently the performance of your website or application. The features discussed here are some of the most common ones used by developers, designers and testers to write, debug, monitor and optimize Websites and Web Apps. Using these features in integration with Mobile Device Lab like pCloudy can transmogrify the entire process of creating, testing and launching Websites and Web Apps.

Calabash Automation Execution

April 21st, 2016 by

Calabash Automation Execution for Mobile Apps

 

pCloudy provides automation execution environment to run your Calabash test script of android and iOS and hybrid applications as well.

Here are steps to run Calabash test script over android device:

  • Login over www.pcloudy.com with your registered Email ID & Password
  • Go to the Automator Page
  • Select Android or iOS OS version & Manufacturer
  • Select and add desired device
  • Choose Calabash (to run Calabash test scripts)
  • Select Application .apk/.ipa file (the App to be tested)
  • Select Test Script zip file (the Test Script developed for testing)
  • Enter Single Device execution Time (Time required for the entire script to be executed on single device)
  • Enter Name of your Test Cycle (this name will represent your Test Cycle)
  • Click on Schedule Test Cycle

Calabash

Click on Schedule to confirm schedule of test automation. Here, you can see your selected application, test script, device(s) etc.

calabash-confirm-test-cycle

You get a pop up message of test automation schedule confirmation.

Click on OK to proceed.

calabash-test-cycle-scheduling-successful

Go to your mailbox and open pCloudy Automation Alert mail.

Click on the given link “Click to view Report”.

calabash-simplest-online-device-cloud

Here, you can see result of your Calabash Automation Execution. This directory contains all important information of execution result.

calabash-cloud-automator-report