appium/ios-test-app

test fails to run on the simulator

Closed this issue · 9 comments

i went through all the basic setup instructions on the appium website and then found my way to this sample code to try it out.

npm install
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

fsevents@1.1.3 install /Users/me/Projects/ios-test-app/node_modules/fsevents
node install

[fsevents] Success: "/Users/me/Projects/ios-test-app/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node" is installed via remote

ios-test-app@2.8.0 install /Users/me/Projects/ios-test-app
node install-npm.js

[14:53:28] cleaning apps
[14:53:31] cleaning app for iphonesimulator11.2
[14:53:32] finished cleaning app for iphonesimulator11.2
[14:53:32] finished cleaning apps
[14:53:32] building apps
[14:53:32] building app for iphonesimulator11.2
[14:53:43] finished building app for iphonesimulator11.2
[14:53:43] finished building apps
[14:53:43] renaming apps
[14:53:43] renaming for iphonesimulator
[14:53:43] finished renaming apps
finished installing
npm WARN prepublish-on-install As of npm@5, prepublish scripts are deprecated.
npm WARN prepublish-on-install Use prepare for build steps and prepublishOnly for upload-only.
npm WARN prepublish-on-install See the deprecation note in npm help scripts for more information.

ios-test-app@2.8.0 prepublish /Users/me/Projects/ios-test-app
gulp prepublish

[14:53:48] Using gulpfile ~/Projects/ios-test-app/gulpfile.js
[14:53:48] Starting 'prepublish'...
[14:53:48] Starting 'clean'...
[14:53:48] Finished 'clean' after 13 ms
[14:53:48] Starting 'transpile'...
[14:53:49] Finished 'transpile' after 138 ms
[14:53:49] Finished 'prepublish' after 154 ms
npm notice created a lockfile as package-lock.json. You should commit this file.
added 958 packages in 44.44s

me:ios-test-app me$ npm test

ios-test-app@2.8.0 test /Users/me/Projects/ios-test-app
gulp once

[14:54:14] Using gulpfile ~/Projects/ios-test-app/gulpfile.js
[14:54:14] Starting 'once'...
[14:54:14] Starting 'clean'...
[14:54:14] Finished 'clean' after 64 ms
[14:54:14] Starting 'eslint'...
[14:54:16]
/Users/me/Projects/ios-test-app/index.js
1:1 error Parsing error: The keyword 'import' is reserved

/Users/me/Projects/ios-test-app/install.js
5:1 error Parsing error: The keyword 'import' is reserved

/Users/me/Projects/ios-test-app/lib/logger.js
1:1 error Parsing error: The keyword 'import' is reserved

✖ 3 problems (3 errors, 0 warnings)

events.js:137
throw er; // Unhandled 'error' event
^
ESLintError: Failed with 3 errors
npm ERR! Test failed. See above for more details.

@lechium this repo is not meant to be used directly. check out https://github.com/appium/sample-code instead.

its not immediately apparent how to actually test this sample after copying this build directory as directed
https://github.com/appium/sample-code/tree/master/sample-code/apps/TestApp

this is not an appium sample code repo. this is a repo that holds the code for a test app

what is the purpose of this repo then? i dont see any clear cut way for someone entertaining using this as a testing platform for iOS to install and run a pre-made test solution. the sample code you sent me to only has a prebuilt app and instructions for copying build files from this build directory to that one, with zero followup instructions. i've read through everything on the main appium page and on the test driver for iOS and don't see anything useful for samples to work from if i want to see this in action without writing a bunch of tests myself.

the purpose of this repo is to house the code used to build a test app. in other words, this repo is an ios app which, if you want, you could build to use with appium. but there's no appium code examples or samples in this repo.. what language are you trying to use appium with?

probably javascript. i was just trying to see the viability of the platform to do automated testing for iOS. is there any sample code anywhere for me to run without having to write my own test cases? i want to see ios testing in action with as little overhead as possible.

There are lots of JS examples here: https://github.com/appium/sample-code/tree/master/sample-code/examples/node

just clone that repo, navigate to that dir, run npm install, then (assuming you have an appium server running, and the right ios sdk installed): $(npm bin)/mocha ios-simple.js. it will execute that test against your appium server. you can modify the code if you want to change which version of ios it runs against.

thanks i appreciate it!

We have been working on the sample code, since it has gotten into a bad state. The current version for JS is in a branch on the main site. I would recommend looking at that to avoid the frustration of working through some out-of-date samples.

See https://github.com/appium/appium/tree/sample-code/sample-code/javascript-wd