Is it possible to run webdriverio app tests against AWS Device Farm without uploading the test suite? - appium

We currently have a suite of webdriverio/appium tests for our react native app, with separate wdio.conf files for local, simulator, BrowserStack etc.
All of the examples I can find for device farm either involve first uploading the test suite as a zip up front, or creating a custom test runner that obtains a selenium grid url from Device Farm and then triggers the wdio command (but I can only see this being used for Selenium, nothing for appium/app testing).
Is it not possible to run tests from my local machine whilst pointing to AWS Device Farm devices?

Unfortunately this is not possible with AWS Device Farm, as you have already noticed that they do not have a Selenium Grid for mobile devices. In general for me it has been a huge hassle to get Appium tests to work on AWS using CI/CD - both because of the setup and the inability to easily debug since I can't run the tests locally against their devices. I would advise using another cloud farm service like Browserstack which allows you to target their grid from your local machine

Related

iOS app not uninstall and reinstalling between tests on Browserstack App Automate

Currently running a smoke test suite on IntelliJ against Browserstack App Automate (Java, Appium, and Cucumber to write the test files).
The issue comes from running iOS tests as a series/suite. When one test ends and another begins, the app hasn't reset or reinstalled and starts from where the other app ended (with a new user created). For each test, we need the app to start from afresh and this doesn't seem to be happening. Android tests for our app work just fine, but this issue only happens when running them on iOS.
Has anyone encountered a similar issue?
Could you execute the tests by setting the capability "fullReset" to "true". Read more on this in the link: http://appium.io/docs/en/writing-running-appium/other/reset-strategies/index.html
Then execute the command "driver.resetApp()" after the execution of one test and before the beginning of the second?

AWS Device Farm - Run Stuck at Pending (with Errored Status)

I am working on automating testing for my company using Appium Python + AWS Device Farm for iOS devices.
However, when I uploaded my .ipa file and Appium Python test to AWS Device farm, the run stuck and showed me that the status is "Errored", and if I click into the run for a detailed view, it says "Pending" on all of the device runs (See screenshots below: )
I am pretty sure it is not the problem with my Appium Python test script, because when combining the same script with another .ipa file (from another App), the run works fine on AWS Device Farm. The thing is that by using the same handling, I was able to export .ipa off other App and had them run just fine on AWS Device Farm. This only happens to this particular .ipa file of the same App, but it is the company's official App that I must automate the test for, so I can't just not test it.
Does anyone know how I could fix this problem?
Thanks so much!
The question has been kindly answered and resolved by the AWS Device Farm team here:
https://forums.aws.amazon.com/thread.jspa?threadID=245483

Running appium scripts for ios in parallel

I have two mac machines with all the setup installed for appium. I want to run the appium scripts on two ios simulators in parallel.It is not possible in one mac machine by launching two simulators in parallel because mac uses only one instrument instance at a time.
Is there any way to approach this by using two machines?
Thanks.
For android you can run two emulators in parallel, So u can establish two appium sessions and run the scripts in parallel.But coming to ios xcode won't allow you to run the simulators in parallel.
You could use the Selenium grid to handle your two machines, as instructed at https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/grid.md
Otherwise you'll need to create a driver session against each of the servers in your script. To target a specific Appium server, simply change the url:port combination to match either of your servers when creating the Appium webdriver object/session.
As of now,
http://appium.io/docs/en/advanced-concepts/parallel-tests/
"With Xcode9 Appium supports parallel RealDevice and Simulator testing." for iOS

I want to make a Test Lab setup for Appium

I want to make a Test Automation Lab for Appium (Android & iOS)
Questions:
1. As per Appium limitation we can access Single device (ios) from Machine.
In this case If I connect multiple Ios/Android devices to MAC machine (Server) how I can access from other machine ?
If I make Windows machine as a server Can I access and Run scripts from MAC machine?
You can use the selenium grid with Appium to do that. parallel test with appium & selenium grid
you have to add the appium in environment variable
start the grid
start the node which you want then run in parallel
You can go for sauce labs, Sauce Labs allows users to run tests in the cloud on more than 500 different browser platform, operating system and device combinations, providing a comprehensive test infrastructure for automated and manual testing of desktop and mobile applications using Selenium, Appium and JavaScript unit testing frameworks.
https://saucelabs.com/

Using Selenium with ios-driver to test iOS mobile apps from a Windows machine

I am investigating the feasibility of testing native, hybrid, and web-based applications using Selenium for Windows (web only), Android, and iOS mobile devices (e.g. iPad).
The ideal setup for a tester would be a Windows machine with physical devices connected via USB. This works with Android as all that is needed (excluding the ADK and USB driver setup) is Selendroid's stand-alone server and a JAR dependency. However, from my understanding, this is not possible with iOS mobile devices using ios-driver. I have also checked out Appium, and they too state that a Mac computer would be needed to test iOS devices.
So that brings us to my question: Is there a way to test iOS mobile apps (web, hybrid, native) from a Windows machine?
Here is a list of preferences:
- Use Selenium and other Selenium-compatible plug-ins
- Run tests from Windows machine
- Cannot use iOS VM
- Cannot use Mac machine with "middle-man" application to communicate with Windows machine
- Have to test physical mobile devices
- No "hacks" (e.g. Jailbreaking)
It is also safe to assume that I have no experience developing iOS applications.
It is possible to run the tests from a Windows machine but not the way you are probably thinking. You will still need a Mac. Here are the requirements:
A mac on your network with Appium server running
Has Appium environment installed properly
Has the .app on the machine
If you have these three requirements fulfilled and there is no firewall blocking network access to the Mac then you can do it. You will have to actual tests on the Windows machine but instead of specifying 127.0.0.1:8080 in the setup method as the IP address of Appium server you will replace it with this: yourmacsipaddress:8080 and this should execute the test properly.
Remember that you have to specify the path of the .app in the test which is running from your Windows machine. But the catch is that the path has to be the path of the .app in the Mac and not on your Windows machine.
So the tests will run from your Windows machine but the installation of the app, the automation, and the testing will be done on the Mac but you will get the "pass" or "fail" update on your Windows machine.
If you do not want to set up appium in your local machine, You can also go with sauce lab.
sauce lab provide vm to you. select appropriate device and run using appiumDriver. Provide below capabilty and run using appiumDriver. your remote url will be like this
http://your_username:your_access_key#ondemand.saucelabs.com:80/wd/hub
For iOS Native,
{"driver.class":"io.appium.java_client.ios.IOSDriver","platformName":"iOS","browserName":"","platformVersion":"your os version","deviceName":"device Name","appiumVersion":"1.5.3","app":"sauce-storage:Your application name on sauce storage"}
Your application should be available on sauce storage. You can upload using sauce api .
You can also use this same for web application, android/ ios native application.

Resources