What’s New In pCloudy 5.6?

Suyash Dubey
By Suyash Dubey
April 19, 2020
5 min Read
Share This Article
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to make app testing simpler than ever. Our customers trust us because we believe in exceeding their expectations and add new useful features to enhance the platform’s capabilities. For those who are new to pCloudy, it is a cloud-based continuous testing platform designed to enrich your apps. In this new version of pCloudy, we have addressed the concerns of our users and added new features like Wildnet, Capability configurator, Object spy, and more. Let’s know more about all these features.

Wildnet

An application server is accessible only from within your lab and if you want to test your mobile application with that server, you are forced to work within that lab. If you move with the device in hand outside the lab, you will not have access to that server. How do you test such kind of setup using pCloudy? Because if you are using pCloudy, that means the devices are outside your network. The answer is Wildnet.
wildnet ss
This feature enables our users to test private or internal servers on any Android or iOS devices present on pCloudy. For this, you just need to download the executables for OS (Mac, Linux, Windows) on your local machine, Then fetch the user name and API access key for your pCloudy account settings and use it in the terminal to build a link between a device in pCloudy and your internal staging server. To connect a booked device to your internal staging server, you need to click on the Wildnet icon as shown in the picture below.

Object Spy

While creating automation test cases you need the object names of the objects that are available in your application. For example, if your app is launched on a device and you want to click on a particular button, you have to mention the object name in the script to perform that action in the app. Earlier testers used to extract the object name using Appium desktop, but now they don’t need Appium desktop for that. pCloudy now has an inbuilt object spy through which you can run the inspector sessions directly on Android and iOS devices. One big advantage is that its bilateral view which makes it easy for users to click on any element on one side and view the details another side. Also, the generated code can be copied for future use.

object spy ss
In the picture above you can see on the right side we have the object inspector where you will get all the attributes and values for any application. You can select any attribute and perform an action using the tap, send keys, clear and the more option. Following the action, an XPath will be generated which can be used in the automation script.

Data-Persistence

This feature will enable System-admins of our Private and On-Premises cloud to delete older reports based on pre-defined settings. To use this feature, system administrators will have to go to control settings in their pCloudy account and under Infrastructure Management there is an option for Data-Persistence. Whenever any user tests an app on any device in pCloudy, certain artifacts are generated in the form of test reports. Each report will have videos, logs, screenshots, and other elements. These artifacts take up a lot of space so now system admin can delete the older data using the data persistence feature.
data per
As shown in the pic, the system admin can select the date, time and the number of days for which the data has to be deleted. This will help in managing the limited space provided for every team account.

Capability Configurator

In an automation script, we have to include certain capabilities like device name, platform version, etc., to execute the test cases. But now you won’t have to gather the capabilities from different sources, capability configurator will generate the desired capabilities directly using certain filters.
capability
As you can see in the pic, you just need to go to the Devices page in pCloudy and click on the Capabilities tab. Under the capabilities tab, you can choose the parameters like OS, Automation type, Device location, Device name, etc., and the capabilities generated can be copied and pasted directly into the Appium script.

More updates

iOS is a close operating system, and there are many restrictions for testing apps on Apple devices. In pCloudy 5.6, you will have two more functions on iOS devices; close app and lock/unlock the device. The close app function will enable pCloudy users to close any launched application on a connected iOS device using the soft button. The second function will allow any connected iOS device on pCloudy to be locked and unlocked. These two functions will enhance user interaction on iOS devices by saving time and effort. One more new update is that pCloudy now supports Appium 1.15.1 which is one of the latest stable versions of Appium. This will make it easier to perform test automation on iOS 13 devices in pCloudy.

To sum up

The new features added to the platform will help our users to perform live testing on remote devices. Features like the latest Appium support and better user interaction on the iOS devices will empower our users to speed up automation. We are working on some new features, based on our customer feedback, which will be included in the next release. So stay connected for more updates.

Suyash Dubey
Suyash Dubey

Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

Related Articles

April 28, 2020
Test Local And Internal Servers Before Deployment Using Wildnet

Some testing teams set up their own staging environment to test internal servers but as there is no public access which makes it difficult to perform local testing on remote devices. So how would you test your app which can…

Learn More Arrow

March 17, 2020
Ensure Continuous Productivity By Leveraging Remote Devices For Mobile App Testing

Remote working is going to be a new normal and remote access tools and platforms will play a key role in maintaining productivity. Working from home has many advantages both for enterprises and teams. There are many tools that help…

Learn More Arrow

January 31, 2020
5 Best Python Frameworks For Test Automation In 2020

Testing framework plays a crucial role in the success of any automated testing process. Choosing the right test automation framework is important as it will maximize the test coverage and improve test efficiency which means a better return on investment.…

Learn More Arrow

How to Choose The Right Automation Testing Tool

Suyash Dubey
By Suyash Dubey
November 15, 2019
6 min Read
Share This Article
How to Choose The Right Automation Testing Tool

Test automation is gradually taking over manual testing as it saves time and improves the quality of testing. Especially in the case of regression testing, automation can improve efficiency by manifold. It is a waste of time and resources to do repetitive testing manually. Also, there is a scope for an error as repetitive testing can be exhausting but the chances of errors occurring in automation are slim. But what is automation testing? In simple terms, automation testing is replacing the manual human activity with a system that performs test cases by repeating predefined actions. To get the most out of automation it is necessary to select the right automation testing tool.

Types of Automation Testing Tools


Record & Replay: Tools in this category provide a recording option for the automated script. Every interaction on the screen like tapping, scrolling or typing will be recorded and converted into automation steps. The recorded scripts can be replayed to perform the actions and to verify the AUT.

Coordinate based recognition: Tools in this category interact with the application under test with the help of x/y coordinates, to automate and verify the application.

Native object recognition: Tools that use the native object recognition detect the UI or control elements on their given element tree. This tree is built by XPATH, XML or CSS to identify the elements, verify and automate the script.

Text recognition: Text recognition: Text recognition or (OCR) Optical Character Recognition tools identify elements based on their text. These tools use visible texts to drive automation and to verify the app.

Image recognition: These tools take screenshots of the UI elements in the product to add them to the automation scripts. The AUT will be automated with the help of these screenshots.

A lot of test automation tools support more than one recognition approach which can be useful to get more robust automation scripts. Now let us look at the factors to consider while selecting the automation testing tools.

Platform Support

Are you looking for automation testing tools for web apps or mobile apps? If mobile app then is it hybrid, native or PWA? The scripting language is also an important factor in many cases as mobile automation testing tools do not support all the languages. So if you developed your app using JavaScript then it’s not recommended to use UFT for test automation. In that case, go for a tool like Selenium that is flexible with the scripting language.

There are a lot of test automation tools that support freeware frameworks like Selenium and Appium. Framework integration helps in reducing the effort put into the testing and increasing the collaboration between the teams. Tool integration forms an ecosystem of a collaborative effort that helps in object identification, bug logging, test case management, report sharing, and shared repository.

Ease of Adoption

Ease of adoption can be measured on the basis of the skills required to use the tool and the learning curve. If there are resources available easily on the internet to learn the functioning of the tool then it is a plus point. Also, the support should be good and it’s an advantage if there is an active community that will give a rough idea about the complexities of the tool. We have observed that the installation process is also lengthy for some tools and frameworks. But overall the team should be able to use the tool easily with the skill set or the experience they have.

Ease of Scripting

Most of the automation testing tools provide flexible scripting options. It allows testing teams to write test scripts in their preferred languages. A good test automation tool helps in getting better reusability of test components and provides flexibility in scripts that can be reused across projects. Scripting time with object identification, speed of script execution, support for CI/CD tools like Jenkins, usually these attributes are considered before selecting the tool.

Integrations

If the testing team is using a test case or a bug management tool then the team would prefer an automation tool that can be easily integrated into those tools. It helps in managing the app development lifecycle properly.

The keyword-driven or data-driven automation framework should be easily integrated into any data source. It is convenient if the tool provides connectivity with different data sources easily.

Test Analytics

Analytical reports form the backbone of test automation as it provides insights into the success of the process. Automation tools must provide customizable dashboards to view different types of reports shared across various teams.

Real-time reports traceability and sharing ensure feature validation and efficient test coverage. Quality metrics such as injection rate, defect density, and test execution status allow you to maintain quality at every stage of continuous testing. It’s convenient to analyze results to identify bugs, patterns, and do a root cause analysis with a good automation tool.

License Type and Cost

It’s better to go for open-source tools but not every open-source automation tool has all the attributes that you might be looking for. Even if you opt for the proprietary licensed tools, you need to figure out how much you need to spend on the maintenance.

Some companies offer live support and training for premium plans. So you might want to upgrade to avail of these services. There is also something called runtime license if you just want to execute the automation on different machines. Apart from that, there are options for a node-locked license for a single machine and a concurrent floating license to use the tool on multiple systems.

giphy-min

To Sum Up

If you are still confused and want to further simplify the tool selecting process, then use a tool comparison matrix. Jot down your preferred 2,3 or even 5 tools and then rate them on the basis of all the factors that we have discussed earlier in this blog. This way it will be easier to make a decision on the basis of your requirements.

As far as mobile test automation tools are concerned, device coverage holds the key. It is recommended to use a cloud-based testing platform to run your automated test on multiple devices. Automation is the soul of any CI/CD pipeline and for the successful implementation of DevOps, it is crucial to choose the right automation testing tools.

Suyash Dubey
Suyash Dubey

Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

Related Articles

April 28, 2020
Test Local And Internal Servers Before Deployment Using Wildnet

Some testing teams set up their own staging environment to test internal servers but as there is no public access which makes it difficult to perform local testing on remote devices. So how would you test your app which can…

Learn More Arrow

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

January 31, 2020
5 Best Python Frameworks For Test Automation In 2020

Testing framework plays a crucial role in the success of any automated testing process. Choosing the right test automation framework is important as it will maximize the test coverage and improve test efficiency which means a better return on investment.…

Learn More Arrow

How to use Appium Inspector for Test Automation

Suyash Dubey
By Suyash Dubey
October 1, 2019
2 min Read
Share This Article
How to use Appium Inspector for Test Automation

Quick Links:

Suyash Dubey
Suyash Dubey

Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

Related Articles

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

November 15, 2019
How to Choose The Right Automation Testing Tool

Test automation is gradually taking over manual testing as it saves time and improves the quality of testing. Especially in the case of regression testing, automation can improve efficiency by manifold. It is a waste of time and resources to…

Learn More Arrow

September 12, 2019
How To Install Appium On A Mac Machine

[xyz-ihs snippet="quickLinks-Appium"]   In the last blog in this series we learned how to start the Appium server and launch app from the code. In this blog we will understand how to setup Appium on a Mac machine.   Pre-requisite…

Learn More Arrow

Starting Appium Server and launching the app from code

Suyash Dubey
By Suyash Dubey
August 21, 2019
3 min Read
Share This Article
Starting Appium Server and launching the app from code

Quick Links:

Suyash Dubey
Suyash Dubey

Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

Related Articles

April 28, 2020
Test Local And Internal Servers Before Deployment Using Wildnet

Some testing teams set up their own staging environment to test internal servers but as there is no public access which makes it difficult to perform local testing on remote devices. So how would you test your app which can…

Learn More Arrow

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

January 31, 2020
5 Best Python Frameworks For Test Automation In 2020

Testing framework plays a crucial role in the success of any automated testing process. Choosing the right test automation framework is important as it will maximize the test coverage and improve test efficiency which means a better return on investment.…

Learn More Arrow

Writing The First Appium Test Automation Script (Android)

Suyash Dubey
By Suyash Dubey
August 14, 2019
4 min Read
Share This Article
Writing The First Appium Test Automation Script (Android)

Quick Links:

Suyash Dubey
Suyash Dubey

Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

Related Articles

April 28, 2020
Test Local And Internal Servers Before Deployment Using Wildnet

Some testing teams set up their own staging environment to test internal servers but as there is no public access which makes it difficult to perform local testing on remote devices. So how would you test your app which can…

Learn More Arrow

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

January 31, 2020
5 Best Python Frameworks For Test Automation In 2020

Testing framework plays a crucial role in the success of any automated testing process. Choosing the right test automation framework is important as it will maximize the test coverage and improve test efficiency which means a better return on investment.…

Learn More Arrow

Appium Setup for Windows

Suyash Dubey
By Suyash Dubey
July 17, 2019
3 min Read
Share This Article
Appium Setup for Windows

Quick Links:

Suyash Dubey
Suyash Dubey

Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

Related Articles

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

November 15, 2019
How to Choose The Right Automation Testing Tool

Test automation is gradually taking over manual testing as it saves time and improves the quality of testing. Especially in the case of regression testing, automation can improve efficiency by manifold. It is a waste of time and resources to…

Learn More Arrow

October 1, 2019
How to use Appium Inspector for Test Automation

[xyz-ihs snippet="quickLinks-Appium"]   In our previous chapter on Android, we learned about UI Automator Viewer, Which is available on Android SDK, to get the properties of the application object. In the case of iOS, Appium itself provides an Inspector which…

Learn More Arrow

Basics of Appium Mobile Testing

Suyash Dubey
By Suyash Dubey
July 10, 2019
5 min Read
Share This Article
Basics of Appium Mobile Testing

Quick Links:

Suyash Dubey
Suyash Dubey

Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

Related Articles

April 28, 2020
Test Local And Internal Servers Before Deployment Using Wildnet

Some testing teams set up their own staging environment to test internal servers but as there is no public access which makes it difficult to perform local testing on remote devices. So how would you test your app which can…

Learn More Arrow

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

March 17, 2020
Ensure Continuous Productivity By Leveraging Remote Devices For Mobile App Testing

Remote working is going to be a new normal and remote access tools and platforms will play a key role in maintaining productivity. Working from home has many advantages both for enterprises and teams. There are many tools that help…

Learn More Arrow

Cross Platform Mobile Test Automation Using Appium

shivani
By shivani
March 21, 2018
4 min Read
Share This Article
Cross Platform Mobile Test Automation Using Appium

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.

shivani
shivani

She is a Product Marketer with over 9 years of diversified experience across content, branding, and product marketing. Her experience ranges from global brands to nimble startups. She is a custodian of Brand & Content, telling stories about the brand that delights customers and provides compelling business value.

Related Articles

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

November 15, 2019
How to Choose The Right Automation Testing Tool

Test automation is gradually taking over manual testing as it saves time and improves the quality of testing. Especially in the case of regression testing, automation can improve efficiency by manifold. It is a waste of time and resources to…

Learn More Arrow

October 1, 2019
How to use Appium Inspector for Test Automation

[xyz-ihs snippet="quickLinks-Appium"]   In our previous chapter on Android, we learned about UI Automator Viewer, Which is available on Android SDK, to get the properties of the application object. In the case of iOS, Appium itself provides an Inspector which…

Learn More Arrow

Help Guide for pCloudy-java-Connector for Appium

Avinash
By Avinash
December 14, 2015
3 min Read
Share This Article
Help Guide for pCloudy-java-Connector for Appium

pCloudy Appium integration

1. pCloudy-java-Connector for Appium

1.1 Overview

Appium is an open source test automation framework which is used with wide range of mobile apps that supports only android/ios or both. pCloudy is a popular mobile testing platform integrated with Appium script which enables you to automate test of mobile apps as well. If you have your Appium Scripts (or you plan to build them) in Java then you can use the pCloudy-java-connector.jar to integrate with the pCloudy platform. In case, you don’t have your Appium script then, you will need to use the rest web services APIs which are given in the end of this document.

1.2 Objective of this document

This user help guide has been developed for pCloudy end users. This help guide will help you to understand the APIs that pCloudy platform provides to integrate your existing Appium Scripts with pCloudy. After the integration, you will be able to execute your Appium scripts from your PC directly to the pCloudy real device cloud.

1.3 System Requirements

  • Java based Appium Script
  • Eclipse or Netbeans
  • >APK or IPA file
  • pCloudy Account
  • pCloudy-java-connector jar

NoteThe APIs are evolving and we will come back with a better set of APIs & the jar soon. You might need a little tweaking in the code.

1.4 Stepwise Workflow of the APIs for getting an Appium Driver

The basic steps to get APIs for Appium Driver are given below:

appium testing

1.5 How to get my API Key for using the services

If you are a registered user then you just need to follow few simple steps to get API key for using our services.

Login to pcloudy.com –

Appium

After successful login, Instant Access page opens. Now, you finds different devices which can be filtered from the above given dropdown list of devices. From this page, you can book your device by clicking on Book your Device link. Furthermore, you can connect with any given device to perform mobile testing but you will be given 10 minutes only. While performing testing operation on selected device, you cannot perform testing on other device simultaneously.  For this, you need to release previously connected device.

When you click on settings option, support page opens by default which helps you to drop support ticket. It also includes various options like support, History, Test Runs, UDID, Profile, Credits, Unsubscribe, and API.

1.6 How to integrate my existing Appium Scripts on Java with pCloudy

You need pCloudy java connector jar file and corresponding APIs for Appium based mobile testing platform, pCloudy. You should add the pCloudy-java-connector.jar in its build path as a reference within the your java project containing appium scripts. See this link to learn how to add reference in eclipse.You can download pCloudy-java-connector.jar from this link –

http://support.pcloudy.com/solution/articles/9000062255-adding-reference-to-jars-in-eclipse

While downloading such file, you may come across message as given below which alerts you regarding safety of your computer.

pCloudy java connector jar file

Now, you can reference the JAR file in Eclipse or Android studio. Please refer the link.

The pCloudy-java-connector.jar comprises the following methods which gives you a wrapper code over the web services. Furthermore, you will not need to call the Rest APIs if you are working on JAVA:

Appium Automation Testing

1.7 Useful Codes to get Web-Driver Object

A. Run on Android Native

public void runExecutionOnPCloudy() {
Connector pCloudyCONNECTOR = new Connector();

// User Authentication over pCloudy
String authToken = pCloudyCONNECTOR.authenticateUser(“abc@gmail.com”, “asd53sd3fa4asd5fsasda”);
ArrayList selectedDevices = new ArrayList<>();

// Populate the selected Devices here
selectedDevices.add(MobileDevice.getNew(“Gionee_Ctrl-V6L_Android_4.4.2”, 73, “Ctrl-V6L”, “Ctrl V6L”, “android”, “4.4.2”, “Gionee”));

// Book the selected devices in pCloudy

BookingDtoDevice[] bookedDevicesIDs = pCloudyCONNECTOR.bookDevicesForAppium(authToken, selectedDevices, 5, “friendlySessionName”);
System.out.println(“Devices booked successfully”);

// Upload apk in pCloudy
PDriveFileDTO pDriveFile = pCloudyCONNECTOR.uploadApp(authToken, new File(appPath));
System.out.println(“ipa file uploaded successfully”);
pCloudyCONNECTOR.initAppiumHubForApp(authToken, pDriveFile);

// Get the endpoint from pCloudy
URL endpoint = pCloudyCONNECTOR.getAppiumEndpoint(authToken);
System.out.println(“Appium Endpoint:” + endpoint);

// Create multiple driver objects in multiple threads
for (int i = 0; i < bookedDevicesIDs.length; i++) {
Thread.sleep(5000);
new Thread(getTestCaseClass(endpoint, bookedDevicesIDs[i])).start();
}
}

private Runnable getTestCaseClass(final URL endpoint, final BookingDtoDevice dto) {

// this will give a Thread Safe TestScript class.

// You may also like to have this as a named class in a separate file

return new Runnable() {
@Override

public void run() {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“newCommandTimeout”, 600);
capabilities.setCapability(“launchTimeout”, 90000);
capabilities.setCapability(“deviceName”, dto.capabilities.deviceName);
capabilities.setCapability(“browserName”, dto.capabilities.deviceName);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“appPackage”, appPackage);
capabilities.setCapability(“appActivity”, appActivity);
capabilities.setCapability(“rotatable”, true);
AppiumDriver driver = new AndroidDriver(endpoint, capabilities);

// Your Test Script Goes Here…

}
};
}

B. Run on Android Web

public void runExecutionOnPCloudy() {
Connector pCloudyCONNECTOR = new Connector();

// User Authentication over pCloudy

String authToken = pCloudyCONNECTOR.authenticateUser(“uttam.kumar@sstsinc.com”, “sadf54sad65fds6sdsdsw”);
ArrayList selectedDevices = new ArrayList<>();

// Populate the selected Devices here
selectedDevices.add(MobileDevice.getNew(“Gionee_Ctrl-V6L_Android_4.4.2”, 73, “Ctrl-V6L”, “Ctrl V6L”, “android”, “4.4.2”, “Gionee”));

// Book the selected devices in pCloudy

BookingDtoDevice[] bookedDevicesIDs = pCloudyCONNECTOR.bookDevicesForAppium(authToken, selectedDevices, 5, “friendlySessionName”);
System.out.println(“Devices booked successfully”);
pCloudyCONNECTOR.initAppiumHubForBrower(authToken, “Chrome”);

// Get the endpoint from pCloudy
URL endpoint = pCloudyCONNECTOR.getAppiumEndpoint(authToken);
System.out.println(“Appium Endpoint:” + endpoint);

// Create multiple driver objects in multiple threads
for (int i = 0; i < bookedDevicesIDs.length; i++) {
Thread.sleep(5000);
new Thread(getTestCaseClass(endpoint, bookedDevicesIDs[i])).start();
}
}

private Runnable getTestCaseClass(final URL endpoint, final BookingDtoDevice dto) {

// this will give a Thread Safe TestScript class.

// You may also like to have this as a named class in a separate file
return new Runnable() {
@Override

public void run() {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName(“chrome”);
capabilities.setCapability(“newCommandTimeout”, 600);
capabilities.setCapability(“deviceName”, dto.capabilities.deviceName);
capabilities.setCapability(“platformName”, dto.capabilities.platformName);
AppiumDriver driver = new AndroidDriver(endpoint, capabilities);
// Your Test Script Goes Here…
}
};
}

C. Run on IOS

public void runExecutionOnPCloudy() {
Connector pCloudyCONNECTOR = new Connector();

// User Authentication over pCloudy
String authToken = pCloudyCONNECTOR.authenticateUser(“uttam.kumar@sstsinc.com”, “sadf5sd5fds5sfd5a5fdas1”);
ArrayList selectedDevices = new ArrayList<>();

// Populate the selected Devices here
selectedDevices.add(MobileDevice.getNew(“Apple_iPad2_Ios_7.1.2”, 70, “iPad2”, “iPad 2”, “ios”, “7.1.2”, “Apple”));

// Book the selected devices in pCloudy
        BookingDtoDevice[] bookedDevicesIDs = pCloudyCONNECTOR.bookDevicesForAppium(authToken, selectedDevices, 5, “friendlySessionName”);
System.out.println(“Devices booked successfully”);

// Upload apk in pCloudy
PDriveFileDTO pDriveFile = pCloudyCONNECTOR.uploadApp(authToken, new File(appPath));
System.out.println(“ipa file uploaded successfully”);
pCloudyCONNECTOR.initAppiumHubForApp(authToken, pDriveFile);

// Get the endpoint from pCloudy

URL endpoint = pCloudyCONNECTOR.getAppiumEndpoint(authToken);
System.out.println(“Appium Endpoint:” + endpoint);

// Create multiple driver objects in multiple threads
for (int i = 0; i < bookedDevicesIDs.length; i++) {
Thread.sleep(5000);
new Thread(getTestCaseClass(endpoint, bookedDevicesIDs[i])).start();
}
}

private Runnable getTestCaseClass(final URL endpoint, final BookingDtoDevice dto) {
// this will give a Thread Safe TestScript class.
// You may also like to have this as a named class in a separate file

return new Runnable() {
@Override
public void run() {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“newCommandTimeout”, 600);
capabilities.setCapability(“launchTimeout”, 90000);
capabilities.setCapability(“deviceName”, dto.capabilities.deviceName);
capabilities.setCapability(“browserName”, dto.capabilities.deviceName);
capabilities.setCapability(“platformName”, “ios”);
capabilities.setCapability(“bundleId”, bundleId);
IOSDriver driver = new IOSDriver(endpoint, capabilities);
// Your Test Script Goes Here…
}
};
}

2. Rest APIs if needed to be used in platforms other than Java

https://s3.amazonaws.com/pcloudy-content-distribution/v2/API_USAGE_V2.pdf

Avinash
Avinash

Avinash Tiwari is a thought leader, a recognized keynote speaker, and the co-founder of pCloudy.com. He has 15+ experience in Product development and Testing. He brings with him a passion for emerging technology and quick adoption, both of which have solidified his reputation as a leader in the mobile app testing field.

Related Articles

April 19, 2020
What’s New In pCloudy 5.6?

pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

Learn More Arrow

November 15, 2019
How to Choose The Right Automation Testing Tool

Test automation is gradually taking over manual testing as it saves time and improves the quality of testing. Especially in the case of regression testing, automation can improve efficiency by manifold. It is a waste of time and resources to…

Learn More Arrow

November 4, 2019
Flutter App Automation Using Appium Flutter Driver

Flutter has been creating waves in the app development space since its launch. The reason is simple, it solves the problem of creating two different codebases for a single app to run on Android and iOS devices. Some experts say…

Learn More Arrow

Experience pCloudy Today

Tickmark No Credit Card Required
Tickmark Exceptional Security

Copyright All Rights Reserved © 2020