Is this a joke? Why is this so hard?!

Sorry for sounding sour but this is incredibly frustrating for me.

I’ve a self-taught junior QA Engineer, I’ve managed to learn automated testing for web apps using selenium running on node.js just fine. You install node.js, then you npm install webdriverjs and chromedriver and you’re good to go.

However gettign started on Appium has been soul-destroying for me.

The docs are possibly the worst I’ve ever seen in beginner terms. I can’t get a simple test to run. Here are the steps I took:

  1. Went to the appium repo in the node folder, thinking I could npm install -> npm run and see a test. Nope.

  2. From there they say first go somewhere else and read the docs to install appium. https://github.com/appium/appium/blob/master/README.md

  3. from there they link to the “Getting Started” guide

  4. From there: npm install -g appium
    But then they mention installing the driver so I go to the XCUITest Driver link.

  5. Go to https://github.com/appium/appium/blob/master/docs/en/drivers/ios-xcuitest.md

  6. From there they link to another doc for “Real Device Setup”

At this point I have 5 tabs open to start a simple test.

  1. From the docs I start following instruction: brew install libimobiledevice
  2. brew install ios-deploy

There’s a BUNCH of stuff after that but none of it makes ANY sense. Suddenly after brew install iOS deploy they say:

I created an .xcconfig file and put

DEVELOPMENT_TEAM = <Jon Ellman>
CODE_SIGN_IDENTITY = iPhone Developer

Because that’s all they say to put. WHERE to put this file, and where I need to go to point to it??? No help there. So I just created it in the root of the node test folder

At this point I’m angry and (a lot of fruitless googling and trial-and-error in between these steps) and decide to go back to the original node repo and try to run a test. I do npm run ios-simple And this is what happens:

I give up. Hoping someone here can help me out I’m on the brink!

1 Like

npm install -g appium
appium - - version
npm install -g appium-doctor
appium-doctor in terminal

You will be shown list of errors fix them all, if not move on to next step. Download the sample test cases from Appium GitHub repo and try to run them.

I’m the above gif there is a problem with your desired capabilities, are you trying to run on real device or simulator? Can you share your desired capabilities here

This is not issue of Appium but Apple itself you should use these words for them and not the hard working team of Appium

To keep it simple start with Android and for iOS try to run on Simulator instead of Real device. Once you’re comfortable then jump into real device configuration.

Hope it helps

5 Likes

Thanks for offering your insights Venkatesh.

As I wrote, above, I am interested in the “real device setup”.

Thanks for suggesting appium-doctor but I forgot to mention that I already completed that step. The only error it found was that I didn’t have the xcode command line tool sinstalled, which it fixed, so according to appium-doctor everything looks fine :slight_smile: .

As for the desired capabilities, here are the defaults:

This caused the errors mentioned in my original post. So I tried to change the device name and platform version to the ones of my physical device platformVersion: 11.0.3 deviceName: Jon Ellman\'s iPhone
and I got the same errors.

Like I said in my original post, apologies for sounding so angry, but this has been a very frustrating experience and as a beginner I’m not finding the documentation helpful at all, especially as all the steps required are spread out in different repo README.md's.

I don’t think so deviceName: Jon Ellman’s iPhone is necessary, just give it as iPhone 7, iPhone 6 etc

When you try to run on real device udid is very important, you can get that value by using itunes > iPhone page or set it to auto if only one device is connected.

This is my desired capabilities:

'deviceName': 'iPhone 7'
'automationName': 'XCUITest'
'platformVersion': '10.3'
'app': 'path_to_app',
'udid': 'auto',

Also check if this video helps,

https://www.youtube.com/watch?v=TprXEKBnfmA

Hi @Jon_Ellman,

Yes, automation for an iOS real device is tricky (android is much easier, so probably try to start with it if you have such possibility), so I understand your frustration. But title of the issue is a bit offensive (ppl are working on open source project, not requesting you to pay for that, and for you - such a solution is just a joke) :wink: .
But getting to the point of the question - as it was commented earlier all impediments that you facing caused due to Apple security strategy. In addition, comparing to Selenium, Appium is pretty young and evolving project.

In your particular situation, I would recommend installing Appium Desktop https://github.com/appium/appium-desktop/releases/download/v1.2.6/appium-desktop-1.2.6.dmg

After installing it as mac application (copy into Application folder), please open the app and try to follow these steps:

  1. click ‘Start Server v1.7.1’;
  2. then, on the next screen, click magnifying glass icon on the right top corner (‘Start inspection section’);
  3. leave Automatic Server selected;
  4. provide following desire capabilities, click ‘Save’ button and then ‘Start Session’
    { "bundleId": "com.apple.Preferences", "deviceName": "AnyName", "platformVersion": "11.0.3", "automationName": "XCUITest", "udid": "auto", "platformName": "ios", "xcodeConfigFile": "~/Desktop/wdaBuild.xcconfig" }

If it fails - try to run following command to get the clear message of why WDA build fails (most likely exactly WDA is a problem here): xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id={replace with udid of your phone} IPHONEOS_DEPLOYMENT_TARGET=11.0 -xcconfig ~/Desktop/wdaBuild.xcconfig. Let us know what error you see in the terminal output.

If it succeeds - you should see settings of the iPhone opened. If it’s happen - try to replace “bundleId”: “com.apple.Preferences” with “app”: “path to your IPA file”. Needless to say that IPA should be built with developer’s certificate and AdHoc profile and/or profile that has udid of connected iPhone inlisted.

If you succeed with app capability and your app would be deployed and executed on the targeted device - please update this topic with your progress.
Would be great to have you on board and see your PR to make Appium solution less painful for beginners.

Regards,
Oleksiy

3 Likes

Documentation has some limitation.

@Jon_Ellman https://github.com/appium/appium/issues/9035#issuecomment-323005773, check this while doing deep breathing meditation to avoid doing further mistakes :upside_down_face:

1 Like

Thank you all, I finally got tests working in the simulator, although ustill unsuccessful on real device, and also on cloud service Kobiton (might reach out to them for paid support).

Once I really understand how to get appium running on a fresh macos/windows install, I will make a video series on writein Javascript tests with appium. I have WebdriverJS series on youtube already, but there is urgent need for a plain english walkthrough on everything needed to get Appium tests working. Thanks again for your tips - they helped!

1 Like

After trying some days, I came across Appium Studio (community edition, so it’s for free): easily connected and automating tests was barely any different than “regular” web tests.
It really makes me wonder why Appium still has to be such a pain…
Did you meanwhile manage to make it work otherwise?

And no, I don’t own any shares of Appium Studio.

1 Like