UI Testing external OS X application using xcode 7.2.1 - objective-c

I have a custom Cocoa Based app on my Mac OS X 10.11 but I don't have the source code for it. I want to run UI Tests on it using Xcode 7.2.1 's UI Testing feature.
What I want to know is that how can I make my UI Test launch the target application and then record the steps that are then executed?

Related

How to get the current running camera instance and give a particular file as input in IOS Real Device?

The problem
Can I get the current running camera instance and and give a particular file as input in IOS Real Device
Is this possible with appium ?
Please Advise
More Details:
I am trying to feed my camera an image during runtime. So basically my application has a feature: search a product by scanning a barcode, Since I am trying to automate this, I want to provide an image with barcode and have camera take that image while scanning.
Environment
Appium version: 1.3.2
Desktop OS/version used to run Appium: MAC OS High Sierra (10.13.4)
Mobile platform/version under test: iPhone 8 Plus, OS 11.3
Real device or emulator/simulator: REAL DEVICE
Please Advise
Appium is a black-box testing framework, so it cannot set image for your app directly in the runtime.
However, Appium exposes push_file functionality that places a file onto the device in a particular place.
For iOS it works only on Simulators (running Xcode SDK 8.1+)
driver.pushFile(
"/path/to/device/image.jpg",
new File("/Users/dev/files/image.jpg")
);
If your app supports image selection from gallery, you can push file and then select it in the gallery.
In case it doesn't work, you may look into writing tests directly using XCTest/XCUITest framework

Testing UWP app using random events

For test Android application we can use the command line tool Monkey. A long time ago, we used Hopper to check the app stability on Windows Mobile.
And now for Universal Windows Platform (UWP) apps? Is there any tool to generate ramdom events to test application? I'm not talking about achieve that by using Coded UI Test Builder.

How to test my app on ios 7 using Xcode 6 simulator

I'm trying to test my app with ios7 using Xcode 6's simulator but I can't find the option to change it. Currently it only loads ios8 while my deployment target is set to 7.
Also according to this message from Apple:
Starting February 1, 2015, new iOS apps uploaded to the App Store must include 64-bit support and be built with the iOS 8 SDK, included in Xcode 6 or later. To enable 64-bit in your project, we recommend using the default Xcode build setting of “Standard architectures” to build a single binary with both 32-bit and 64-bit code.
Does this mean that new apps cannot run on ios7 anymore?
Thank you for your help.
First, Change Deployment Target to 7.You can change Deployment target from target under Deployment Info.
Go to Xcode Preferences, Select Downloads tab and download iOS7 Simulator.
Now go to Xcode, you can find iOS7 Simulator on target device list, if not than quit and restart Xcode.
Hope it will help.
The deployment target is the minimum version of iOS that your application will be expected to run on. It effects how your app is BUILT and not where you run it. You need to choose an iOS 7 device from the run destinations menu and then do a Build&Run to build, install, and run the app on the iOS 7 device.
If you don't have an iOS 7 simulator device in the run destinations menu, go download the iOS 7 runtime from Xcode -> Preferences -> Downloads
Yes you can, go to xcode(7) preferences>select Components here you can download Simulater and Documents also.

Running XCTest on iphone device

I am trying to run XCTest on iphone device but Xcode show be following message.
"Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator." 
Is there any way by which I can run the XCTest on device?
Thanks,
Dev
Ok. I found that using GHUnit we can run unit tests on iphone device. Internally it uses xctest. Here is how you setup GHUnit.
I was able to follow the instructions and setup unit tests using xcode 5.

Obtaining 10.6 Base SDK for Xcode 4.5.2

How can I obtain and use 10.6 as base SDK in Xcode 4.5.2?
I downloaded Xcode 4.5.2 from the Mac App Store (through a link on the Apple developer site).
Is there a way I can somehow download the 10.6 SDK separately and start using it as a base SDK?
Strangely enough, I can download the documentation for the 10.6 SDK through Xcode's Preferences window, but not the SDK itself. Any ideas?
No, you can't download the 10.6 SDK separately.
Is there a reason you can't use the 10.8 or 10.7 SDK?
Keep in mind that just because you build against the 10.8 SDK, that doesn't mean you can't also have that built application work on 10.8, 10.7 and 10.6. (This is often a cause of confusion among new developers). You control backwards-compatibility through the Deployment Target setting like shown in the image below.
By default, the deployment target is generally set to the same version of OS X as the SDK is, but changing it to 10.6, for example, should allow it to run on a machine with OS X 10.6. (Of course, you should really test to make sure that's the case).
Download xcode with MacOSX10.6.sdk. Now copy MacOSX10.6.sdk inside /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
Its also working fine with Xcode 5.0.