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

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?

Related

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

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

Chrome browserless Selenium on bamboo

I've developed a framework which runs selenium tests with no problem on my local computer.
I also have developed a pipeline on Bamboo to execute those tests. It does, problem is I have no chrome browser installed on bamboo and I get the error saying "There is no chrome binary" obviously. There is no chance to install anything on bamboo, so I need to run these tests with no browser (also headless).
I've checked this: https://github.com/browserless/chrome
Sounds good to what I want to achieve but I don't know how to do it.
Do I need to run docker by command and then point my driver to the port or what?
Can anyone shed some light? I pretty lost and there are not much examples (or I don't know how to find them)
Thanks!!

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

Is it possible to run Calabash-IOS, iOS automated tests on Ubuntu?

I know that it's impossible to code the test on Ubuntu since I need Apple's XCODE, but I would like to know if, once coded, it is possible to run the automated tests on Ubuntu.
Thanks.

TeamCity fails to run iOS appium tests when auto-launched

Description
We are using appium in our cucumber suite within TeamCity 8 on an Apple MacMini running Mavericks. The problem is that appium seems to fail to interact with the iOS Simulator when it is ran from TeamCity at login (via Automator).
The only combination that I have found to work is to run the following from the Terminal in an interactive session:
sh /Applications/buildagent/bin/agent.sh start
What does not work?
running agent.sh start from an ssh session
creating a shell script with Automator that launches at login (the macmini is set to login automatically)
Theory
My theory is that it has something to do with Preferences -> Security & Privacy -> Accessibility. The only way that it works when launching from Terminal is if Terminal is added to this list of allowed applications. I'm not sure what I need to add to this list in order for this to work automatically at login.
Any help would be greatly appreciated.
Many iOS tests will not run without an interactive session. For example, unit tests using the iOS simulator will not work.
Edit: By interactive session, I mean the TeamCity agent must be started from the desktop, not via an SSH session. Otherwise nothing can communicate with the Simulator.
You are correct, you need to allow Appium to interact with Automator.
Solutions straight from the documentation:
If you're running Appium from an NPM install: sudo authorize_ios
If you're running Appium from source: sudo grunt authorize
If you are running Appium.app, you can authorize iOS through the GUI. This prompt pops up the first time you click "Launch/Run" on the GUI and it tries to open the simulator

Resources