Automating iOS 8 app with Appium causes app freeze - ios8

We have an app that we run automation tests on with Appium. We can launch the app on the device and simulator through Appium. However, the app hangs and freezes after Appium sends 2-3 tap commands. After the freeze, Appium can not find any other elements on the screen.
We looked into writing a test script using Xcode 6.0.1 Instruments, but when the script is run, the app hangs as well.
The app performs as expected when testing manually. It only hangs when we try to run automation on it either with Appium or with Xcode's Instruments. We are using Appium v1.3.0-beta1, and Xcode 6.0.1.
This seems to be a similar issue to this question, but our test device is already on 8.0.2.

So it turns out that with iOS 8, logging too much data (particularly the case when you're logging API responses) can cause a race condition during Automation. We were able to solve our automation freezing issues by disabling logging from the app.
The solution was discovered thanks to the wonderful analysis by #tbao on this post: https://discuss.appium.io/t/app-freezes-when-automated/1030/8

There is way to restart Appium Server during runtime , which helped us to overcome freezing issue:
Please have a look at my blog for more details:
http://www.qaautomationsimplified.com/android/restarting-appium-server-improve-various-server-freezing-issues-may-improve-execution-time/

Got the same problem when automating web application (Safari) on iOS, solved it by switching from appium 1.15.1 to 1.16.0-beta.3 that is available on mac by executing the install command:
npm install -g appium#beta --unsafe-perm=true --allow-root

Related

How to get macos app signing set up for packages

I am new to macOS development and am having a terrible time trying to get my code signed. The documentation to me seems to be horrible.
My specific situation...
I am building a cross-platform app that runs on Linux, Windows, macOS and eventually iOS and Android.
It is a console app that runs as a service or LaunchDaemon
It has a UI served by WebView, http, or console commands depending on the scenario.
It is built with Go 17 in VScode.
I am not using xCode other than the command line tools.
My goal on macOS it to distribute it as a package (pkg) and not as an app.
I have been using MunkiPkg to build it
I am hung up on understanding how the various certificates need to be set up. I have not been able to get a successfully signed package notarized.
Can someone please point me to some documentation that explains how my scenario works? Most of what I found requires it to be built in xCode. And the Apple docs seem mostly to focus on how great their tools are without actually explaining how to use them.
Help!

"Unable to contact test backend running in app" when trying to run Xamarin UITest locally

I am in the early process of learning how to automate Xamarin apps for my company. I started out by just cloning the TailWind Traders app from Microsoft to make sure my system is configured correctly, but I'm running into an issue. After modifying AppManager.cs to use the .app file and attempting to run a single iOS test, I see the app load in the simulator, I get a Mac alert saying "Do you want the application 'DeviceAgent-Runner.app' to accept incoming network transmissions", and then the test fails with this message:
System.Exception : Unable to contact test backend running in app. Check that your app is running and that it is properly configured:
For Xamain.iOS applications, https://learn.microsoft.com/en-us/appcenter/test-cloud/preparing-for-upload/xamarin-ios-uitest
For native iOS applications, https://github.com/calabash/calabash-ios/wiki/Tutorial%3A-How-to-add-Calabash-to-Xcode
Going to that website, I see that it is helping the user configure running tests AppCenter, but I don't want to do that. I simply want to run a test locally on my machine. In trying to fix this, I've uninstalled the Xamarin Test Cloud Agent package and deleted the #if ENABLE_TEST_CLOUD block from AppDelegate.cs. But, it's still happening. How do I run an iOS test locally? Thank you!
If you want to automate uitest using xamarin, it is necessary to add test cloud agent nuget in your xamarin ios project which enable linking to Calabash & install the device agent runner in your mobile. For more detail visit on Microsoft site.
https://learn.microsoft.com/en-us/appcenter/test-cloud/uitest/preparing-for-upload-ios
Whether you upload your test on app enter or run it locally. You have to add test cloud agent nuget in xamarin ios. If you are using native iOS, Calabash linking require to run xamarin uitest.

Tests don't work on Xcode 8, beta 2

When I run tests on my project in XCode, it builds, and then says Testing... which never ends.
When I use the stop button, the process stops with this text in the console:
*** If you believe this error represents a bug, please attach the log file at /Users/MY.NAME/Library/Developer/Xcode/DerivedData/APPNAME-gcsubmsjksdbljcswbefkgugjray/Logs/Test/C53D8988-3564-4C2B-A535-075D26D1E4A7/Session-APPNAMETests-2016-07-13_140704-t3DFd5.log
However, I am unable to run the tests again, and have to relaunch xcode to run them.
Is this an issue on XCode that may be known to the Apple developers?
EDIT
So, I figured, the simulator is not launching in time, and that fails the xcode to run the tests. It might be an installation bug with the simulator.
As I anticipated in my edit to the question the first time, XCode installation did not install the simulator correctly.
I trashed the old installed version and reinstalled XCode. And now everything works fine.
Thanks for all the help.
I found that the tests never ran if I was running anything other than iOS10 on the simulator, so use iOS 10. I guess backwards compatibility doesn't really matter.

Phonegap stuck at detecting iOS SDK environment

i'm trying to create my first app using Phone Gap, so i manage to Build a "generic" app, after installing node.js and phonegap.
So i'm trying to run the following command on the terminal:
phonegap build ios
And it always get stucked on [phonegap] Detecting iOS SDk Environment.
I have, xCode 5, and i do have all the profiles needed to develop, and distribute for iOS, in fact i couple of hours ago, i just send my first app to Itunes Connect, so i think my environment, is fine.
Any ideas? Thanks for the attention!
So, instead of using the command phonegap build ios, I tried phonegap run ios. The program runs, and also a folder was created with the xCode files.
I still dont know what was wrong, but it worked for me.

Xcode 4.3.2 and iOS 5.1.1 + jailbreak: App installs but crash on launch

I don't have the Apple 79€/year account. In iOS 5.0 and Xcode 4.2.1 I changed SDKSettings.plist ecc... And it works. In iOS 5.1.1 and Xcode 4.3.2 no, I already changed settings ecc but don't work, the app installs on device but crash on launch... How can I run my app on device without crashes? Thanks, and sorry for my english.
I have had this issue before on a jailbroken device. You have a few solutions depending on the exact issue. First you can install app sync in order to allow unsigned code to work on your device if you are not using a valid code signing identity. The second option is to actually get a valid code signing identity along with the provision profile so you can run the application correctly. This involves paying for the developer program so this may not be the best option.
Last is a very common issue with jailbroken devices. Which is that you will receive an error such as "failed to get the task for process xxxxx". This tends to happen a lot with jailbroken devices. This is because Xcode notices you are not using a provision profile that is required to report error logs. All you have to do is launch the application again on the device and everything should work.
This is just Xcode not being able to fully launch your application because of the missing provision profile so it results in a crash. If none of these solutions solve your problem please post a more detailed explanation of the issue you are having.

Resources