Protractor - Appium - iOS - Multiple real Devices - Test Automation - protractor

I am new to Appium.
I am able to run protractor e2e tests, on 1 Android device connected to MAc using USB cable. Appium server started as shown below.
appium -a 127.0.0.1 -U DEVICEID
however this does not seem to be ideal option when planning to run on multiple devices (around 20 iOS, Android devices).
Would you please advise, if its possible to run tests on Multiple Android + iOS Devices over wi-fi, by specifying device details in Protractor.conf.js.
Kindly please share your thoughts or experience on this.
Thanks in advance.

Yes, you can run same test on multiple devices. All you need to do to run Appium ports as many as you want to run on devices. Mention the UDID and port in your script and run it. For more info, read this.

Related

Is there a way to run flutter from vs code to a real device like iphone 11 pro? Working on windows

So i'm new at flutter and i want to run my app to my real device. Working on windows 10 with vs code. I want to do this because when i run my app with android emulators my pc starts going slow.
Thanks!
You can follow this tutorial if you want to run your application on an actual device with USB connection: https://www.youtube.com/watch?v=aohkII1C4JY&ab_channel=JohannesMilke
And also there is another way to run your app on an actual device which you can do it wirelessly: https://www.youtube.com/watch?v=BymD9pxtVwY&t=161s&ab_channel=AppMakingAcademy

How to prevent launch Ionic app on emulator

I'm working on ionic App and I'm trying to run App on real Android device, But when I run ionic run android in terminal, I get the following error:
Running command: "C:\Program Files (x86)\nodejs\node.exe"
D:\wamp\www\pars-app\pars-app\hooks\after_prepare\010_add_platform_class.js
D:\wamp\www\pars-app\pars-app
add to body class: platform-android
ANDROID_HOME=D:\Sdk\android-sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_45
No target specified, deploying to emulator
ERROR running one or more of the platforms: No emulator images (avds)
found.
1. Download desired System Image by running: "D:\Sdk\android-sdk\tools\android.bat" sdk
2. Create an AVD by running: "D:\Sdk\android-sdk\tools\android.bat" avd HINT: For a faster emulator, use an Intel System Image and install
the HAXM device driver
You may not have the required environment or OS to run this project
How to prevent run app on windows emulator? I want to run app on real device that conected to my computer.
I am using windows 8 and Huawei with Android 4.2.2
::note
I have read these questions, But I didn't got the answer!
Why not work Ionic app testing on android real device?
Ionic run android does not run app on device
ionic run android - configurations not running app on device
As a complement to #OClyde answer, you could try :
adb kill-server
adb start-server
To have infos about these commands :
adb --help
Nb : Sometimes, for a reason i do not know, the connection between my phone and the computer break. Running this fixes it.
To make sure that your app is not installed to an emulator but to your device, take the following steps:
Open up your console and run adb devices. This should give you a list of all devices available (real devices as well as running emulators) to the Android Debug Bridge. If the adb command is not recognized check that you have installed the Android SDK correctly and that you've set all the necessary environment variables accordingly.
The adb devices command might give you output similar to this:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
This indicates that the ADB wasn't ready before, so in this case just try to un- and replug your device and run adb devices again to see if the device is listed afterwards.
If your device is still not showing, check that USB Debugging is enabled on your device. Therefore you first have to enable developer settings, which you can do by tapping the build number (Settings => About Phone) 7 times (no, that's not a joke ;) ). After that, you'll have the developer options in your settings menu. Open these and check "USB Debugging"
If still your device isn't recognized by the ADB, change the USB connection mode. You can either do this in the developer options as well or tap the notification shown when the phone is connected to your PC. Try MTP as well as PTP, on of those should do the job.
After these steps, it should be nearly impossible that the device is still not recognized by your PC. As soon as there is a phone available, Ionic will install the app on the phone automatically instead of launching an emulator.

ADB Cannot Find Android Device

Yes I know this problem has been brought up many times, and I have looked through many of the possible solutions over this past afternoon. I'm running Windows8 and have an LG Lucid 3 Device. Android Version 4.4.2
-Usb Debugging is turned on.
-I have tried adb start-server / adb kill-server
-I have tried setting the connection to "PTP mode"
-I have tried that universal google usb thing
-I've tried the the installer for my device specifically.
One thing that I've noticed that is different from other people's problems is that when I go to device manager, it shows my device under "portable devices" instead of "other devices".
"Universal driver":https://plus.google.com/103583939320326217147/posts/BQ5iYJEaaEH
Also, when I installed the universal driver, it didn't show up under my list of available drivers to install for the device under device manager.
Has anyone had a similar problem and know how to solve it?
There were a usb connection option "Internet" in LG phones. Select that and try. It worked for me in some LG devices

Can I automate with webdriver an iOS web application from Windows PC?

I have seen on http://code.google.com/p/selenium/wiki/IPhoneDriver that to use selenium webdriver tests on a real device for UIWeb, you need the iphone SDK and a provisioning profile. I want to write my selenium webdriver tests for iphone in Java (Eclipse).
Can i run test cases for ios as from a windows machine?Mac machine is compulsory to run tests? indeed, testers who design tests are used to on Windows and have no knowledge on Mac. Thank you
May I also ask if one can use webdriver to automate native, hybrid ios mobile app?
Once Iphone SDK is checked out from repo, may I run tests with any browser, like safari, firefox, chrome...?
Please help me
Only solution is Virtual Machine + Hackintosh but is not legal.
Download this
Read guide and install it, if your machine is Intel feel lucky,
there are a lot of issues with AMD
Run VM with MacOS and download on it xCode and install it
Get trunk project from checkout from here
Build trunk in xcode
Now it will open emulated Iphone or Ipad (from what you choosed)
Go to emulated iphone and get IP
Run WebDriver app from emulate Iphone
Now run test like that WebDriver driver = new RemoteWebDriver(new URL("yourip/wd/hub"), DesiredCapabilities.iphone());
P.S. I don't remeber all points correctly so good luck

Running Instagram on AVD

I wanted to use Instagram on my computer, so I decided to use an Android Virtual Device for that task.
I downloaded the Android SDK and the newest apk for instagram for my computer.
Then I created a new AVD and ran it. After it was booted, I installed the instagram apk using adb install instagram.apk.
It installed smoothly and after clicking the app, it started.
Now here's my problem: From there on nothing works.
When I try to login and I press the login button, nothing happens like there would be no internet connection.
Browsers and other apps using an internet connection work just fine, just instagram doesn't work.
How can I fix this?
I think it has something to do that the android Emulator can't really handle a global proxy.
Therefore hostnames get resolved directly to their IP which violates HTTP 1.1 standarts and the request doesn't get send properly.
To fix this, it is needed to change it so the hostname gets send instead of the IP.
You should try creating an AVD with different settings. More RAM and allowing GPU emulation is a good idea. If you insist on using an AVD and you have an appropriate intel CPU then you can make the emulator run much faster by following these steps. They are a bit complicated, but worth it if you want the emulator to run quicker.
I typically try to avoid using the Android emulator while I am developing apps. It has its uses, but it tends to be slow and doesn't have all of the capabilities of actual devices.
As an alternative to using an AVD, I would recommend downloading and installing BlueStacks. BluesStacks was written from the ground up to allow running Android apps on your Windows PC or Mac. I have used it before and it does a great job. Much better than an AVD.
Try visual studio emulator for android. Instagram works on it with enabled and connected wifi. This emulator works better than BlueStacks.