Is Automated UI testing on watchOS possible - watchkit

Automated UI testing/Unit testing is not a myth in iOS but can automated UI testing be done on the watchOS?? Any new feature with watchOS 2 or Xcode 7 that I missed. I looked into the profiler but I could not figure out how to automate testing on watch OS.
Any help is appreciated.

Since the beginning of watch apps, from WatchOS 1 on, there have been no test targets for watch apps. Nothing has changed with the launch of WatchOS 3: there are still no tests! Still, there are ways where we can perform the test Using PivotalCoreKit to Test Watch Apps
Please refer to the link below where author has explained it in detail. https://academy.realm.io/posts/cmduconf-boris-bugling-how-test-watch-apps/

Related

PWA and SPA support in Apple Watch

I was wondering if there is a complete documentation for creating PWA and SPA Web Applications which could be added/installed to Apple Watch
I mean a web application which has manifest(name, icon, etc) and can be added to Apple Watch menu
As of WatchOS 5, Apple have added webkit support to WatchOS and i guess it’s not a deal to render web pages because there are several web browsers for Apple Watch like parity and etc
I would be happy to hear your answers
One way to make a PWA or SPA as an app on mobile platform is to use a framework that uses the webview component of the platform to show the content as it was a native app.
Unfortunately [1] my source about a cordova apple watch plugin says, that
It is not possible to run a Cordova app directly on the Watch, as there is no support for a WebView [..]
Though, the source [1] is a project that gives some help on communicating between iPhone app and the Watch, but as the solution here is to write the showing of the data on native language anyways, I would probably more likely give a try for Xamarin [2] or any other native code generating framework, which DOES support Watch OS. I think your final goal anyways is to write an app for Watch, so that is the way to do so.
My source:
[1] https://github.com/leecrossley/cordova-plugin-apple-watch
[2] https://learn.microsoft.com/en-us/xamarin/ios/watchos/

Robot framework- Mobile automation test cases

I have written test cases for desktop application in maven project using robot framework.Now, I need to run the same test cases for mobile (both android and iOS). I really don’t have any idea how to do that, Can anyone please help me or give me suggestion how Can I do that?
Many thanks!

Project structure/methodology fo avoid/remedy xamarin forms.slow build times

Ive started my first a xamarin forms project. I have given up all simulators a while ago because of slow ...everything
The app performance itself is another thing, but Im talking about slow build and deploy times. This, in combination with that the app just crashes or gets a timeout when fetching the actual error is just gut-wrenching and I spend half my days waiting... ´nuff ranting right?
Are there specific project structure, for example so you can do most of your code through unit test for example? sadly the most trial and error I do has to do with gui-stuff.
I have trued Gorilla player, but it was harder that I thought to get it running, I have an open case at Gorilla-team..
Any tips to avoiding build->deploy to device is veeeee...extremely welcome.
Since I don't know your hardware setup I am going to propose different solutions. Maybe one of them might help.
Pick the platform that runs the fastest. When developing on a Windows machine, then probably the UWP project builds the fastest (since you cut out the Mac in the daisy build chain).
When using an Android simulator make sure to fully use hardware acceleration Making the Android emulator run faster
Visual studio for Mac beats its Windows counterpart hands down when it come to build times in my experience. I gave up on developing XF Apps on Windows since I was having countless build issues and some builds took forever. The situation improved dramatically when moving to a Mac.
Maybe you could also try using the Live Player which should give you immediate feedback when it comes to you UI https://learn.microsoft.com/en-us/xamarin/tools/live-player/
Adding unit tests might also speed up things considerably. NUnit is a pretty popular framework.
Another answer mentions that building to UWP is fastest, but I don't target UWP ever so I wouldn't know about that. I just do iOS and Android. Android is faster. We also have the question of simulator/emulator vs real devices. Of the full gamut of options out there to run the app, I've found that building to a physical Android device is the fastest way to build/run.
You could also check the project properties to make sure you have all optimizations set up for that, such as (for Android in particular):
Use Shared Runtime
Use Fast Deployment
Linking: None
DISABLE ProGuard
Aside from building all the way to a phone every time to test things, setting up your project for unit testing that incorporates mocks can also get you going faster. That would typically involve dependency injection and a unit testing framework. I have a Xamarin.Forms app that does just that on Github if you want to see how to do that.

Addressing awaiting/async steps with Protractor for Ionic

I am getting crazy trying to have a Protractor test suite for my Ionic 1 app.
So far I have managed to setup a working environment with basic tests, following the default tutorial, read the Protractor doc. I have also played with Elementor.
But I can't manage to handle the login use case of my app (step 1 for all other tests...), which needs an answer from a server, which takes some time. I have tried various approaches with ExpectedConditions, sleeps (even though Protractor says it does not need to this), nothing works in a deterministic way. The same tests sometimes work and sometimes don't.
So my question is: is there some tutorials or 3rd party doc that you would recommend to help me to develop reliable and deterministic Protractor tests especially to handle asynchronous stuff?
Many thanks (and merry Christmas)!

KIF: Can KIF access the filesystem for an iOS app under test?

Given an iOS 8 app that downloads some files for the purpose of caching them (i.e for offline use), is there a way that KIF can access the app's underlying file system to verify the files? I anticipate that someone will suggest that the app do this for us and display it in a help/about page for debug builds. I'm certainly open to that, but I want to know if that's the only real way to do it on a NON jailbroken iphone.
Thanks in advance.
I am not totally certain I understand the purpose of your question but let me try to answer anyway: KIF is for UI testing only. Files in a file system, that is backend not UI. What you want is to use unit testing, XCTest for example. KIF does run on top of Apple's XCTest framework but is only for Functional/UI testing. XCTest is very simple and if you know KIF you will be able to write XCTests too.
I am assuming you are testing against simulators.
Then yes it can. Basically, test and your app are in the same process, whatever you can do in app, you can do that in tests.

Resources