Skip to content

Instantly share code, notes, and snippets.

@sebv
Created January 16, 2015 15:12
Show Gist options
  • Select an option

  • Save sebv/2dc91961650376ecee20 to your computer and use it in GitHub Desktop.

Select an option

Save sebv/2dc91961650376ecee20 to your computer and use it in GitHub Desktop.
ios61 appium tests
➜ appium git:(master) ./bin/test.sh --ios6 --no-xcode-switch
/usr/bin/xcode-select
RUNNING IOS 6.1 TESTS
---------------------
settings
✓ should return a settings object even if none specified (69ms)
✓ should be able to store a setting (89ms)
✓ should overwrite new settings (351ms)
✓ should leave non-specified settings unchanged (149ms)
crash recovery
1) should be able to recover gracefully from an app crash after shutdown
crash commands
✓ should not process new commands until after crash shutdown (1588ms)
file movements - pullFile and pushFile
✓ should not be able to fetch a file from the file system at large
✓ should be able to fetch the Address book (71ms)
✓ should not be able to fetch something that does not exist
✓ should be able to push and pull a file (45ms)
for a .app @skip-ci
✓ should be able to fetch a file from the app directory (101ms)
file movements - pullFolder
✓ should pull all the files in Library/AddressBook (621ms)
✓ should not pull folders from file system (53ms)
✓ should not be able to fetch a folder that does not exist (44ms)
testapp - active
✓ should return active element (444ms)
testapp - autoAcceptAlerts cap = ""
✓ does not auto-accept alerts (3435ms)
testapp - autoAcceptAlerts cap = false
✓ does not auto-accept alerts (3615ms)
testapp - autoAcceptAlerts cap = "false"
✓ does not auto-accept alerts (3431ms)
testapp - autoAcceptAlerts cap = true
✓ auto-accepts alerts (3590ms)
testapp - autoAcceptAlerts cap = "true"
✓ auto-accepts alerts (3544ms)
testapp - autoDismissAlerts cap = ""
✓ does not auto-dismiss alerts (3636ms)
testapp - autoDismissAlerts cap = false
✓ does not auto-dismiss alerts (3423ms)
testapp - autoDismissAlerts cap = "false"
✓ does not auto-dismiss alerts (3432ms)
testapp - autoDismissAlerts cap = true
✓ auto-dismiss alerts (3541ms)
testapp - autoDismissAlerts cap = "true"
✓ auto-dismiss alerts (3578ms)
testapp - basics - calc app 1
✓ should fill two fields with numbers (4371ms)
✓ should fill two fields with numbers - sendKeys (4995ms)
✓ should fill two fields with numbers - setValue (4104ms)
✓ should confirm that button is displayed (1108ms)
✓ should confirm that the disabled button is disabled (1174ms)
✓ should confirm that the compute sum button is enabled (1048ms)
✓ should interact with alert (6090ms)
✓ should find alert like other elements (4506ms)
✓ should get tag names of elements (1905ms)
✓ should be able to get text of a button (975ms)
testapp - basics - calc app 2
✓ should lookup two fields by name and populate them with random numbers to finally sum them up (7150ms)
✓ should receive correct error
✓ should be able to get syslog log type
✓ should be able to get crashlog logs @skip-ci (79ms)
testapp - clear
✓ should clear the text field (10258ms)
✓ should hide keyboard using "Done" key (4300ms)
✓ should hide keyboard using "pressKey" strategy with "Done" key (4313ms)
✓ should hide keyboard using "pressKey" strategy with "Done" keyName (4529ms)
✓ should hide keyboard using "press" strategy with "Done" key (4916ms)
- should hide keyboard using "swipeDown" strategy
testapp - context methods
✓ getting list multiple times should not crash appium (76201ms)
✓ setting context to 'null' should work (10792ms)
✓ setting context to 'NATIVE_APP' should work (10764ms)
✓ setting context to non-existent context should return 'NoSuchContext' (status: 35)
testapp - device
real device
✓ shouldn't try to validate against sims (11172ms)
testapp - find element
✓ should find a single element on the app (352ms)
✓ should not find any invalid elements on the app and throw error (5517ms)
✓ should find alerts when they exist (3867ms)
✓ should not find alerts when they dont exist (5424ms)
✓ should get an error when strategy doesnt exist
✓ should find all elements by class name in the app (388ms)
✓ should not find any elements on the app but fail gracefully (5245ms)
✓ should find element by valid name (400ms)
✓ should not find element by invalid name but return respective error code (5621ms)
✓ should find an element with accessibility id containing an apostrophe (469ms)
✓ should not find element by incomplete class name but return respective error code
✓ should find multiple elements by valid name (599ms)
by id
✓ should first attempt to match accessibility id (785ms)
✓ should attempt to match by string if no accessibility id matches (734ms)
✓ should use a localized string if the id is a localization key (1253ms)
✓ should be able to return multiple matches (833ms)
testapp - get attribute
✓ should get element attribute (775ms)
testapp - keyboard
typing with strategy:undefined
✓ should send keys to a text field (6053ms)
typing with strategy:oneByOne
✓ should send keys to a text field (5948ms)
typing with strategy:grouped
✓ should send keys to a text field (4437ms)
typing with strategy:setValue
✓ should send keys to a text field (3436ms)
typing
✓ should send accented text (4075ms)
✓ should send backspace key (3212ms)
✓ should send delete key (3321ms)
stability @skip-ci
sendKeys test 1
✓ should send keys to a text field (10927ms)
sendKeys test 2
✓ should send keys to a text field (10902ms)
sendKeys test 3
✓ should send keys to a text field (10806ms)
sendKeys test 4
✓ should send keys to a text field (11008ms)
sendKeys test 5
✓ should send keys to a text field (11555ms)
sendKeys test 6
✓ should send keys to a text field (11354ms)
sendKeys test 7
✓ should send keys to a text field (11169ms)
sendKeys test 8
✓ should send keys to a text field (10673ms)
sendKeys test 9
✓ should send keys to a text field (11582ms)
sendKeys test 10
✓ should send keys to a text field (11126ms)
localization - calendarFormat @skip-ios8
changing to gregorian calendar
✓ should have gregorian calendar format (341ms)
changing to buddhist calendar
✓ should have buddhist calendar format (408ms)
localization - language @skip-ios8
changing to fr
2) "before all" hook
changing to de
3) "before all" hook
localization - locale
default locale
✓ should be english @skip-ios8 (334ms)
changing locale
✓ should be fr (337ms)
changing back
✓ should be en (333ms)
testapp - location - 1 @skip-ci
✓ should return the right x/y coordinates (717ms)
✓ should not error with valid lat/lon and no options (351ms)
✓ should error with invalid lat/lon and no options (468ms)
testapp - location - 2 @skip-ci
✓ should be able to be turned on (793ms)
testapp - location - 3 @skip-ci
✓ should not work without bundleId (66ms)
testapp - location - 4 @skip-ci
✓ should be able to be turned off (701ms)
testapp - location - 5 @skip-ci
✓ should be able to be turned on when using a zip/ipa file (726ms)
testapp - pinchOpen/pinchClose
✓ should pinchOpen and pinchClose map after tapping Test Gesture (19069ms)
testapp - rotation gesture
✓ should rotate map after tapping Test Gesture (14051ms)
testapp - sessions
✓ should return appear in the sessions returned @skip-ci
testapp - simple
using calc app
✓ should fill two fields with numbers (6095ms)
testapp - size
element size
✓ should return the right element size (820ms)
✓ should return the window size (377ms)
testapp - source
✓ should return page source (513ms)
testapp - timeout
implicit wait
✓ should set the implicit wait for finding elements (14528ms)
✓ should work with small command timeout (10297ms)
✓ should work even with a reset in the middle (40071ms)
testapp - timeout
mobile reset
✓ should die with short command timeout even after mobile reset (34939ms)
testapp - timeout
short timeout
✓ should die with short command timeout (5558ms)
testapp - timeout
via desired caps
✓ should die with short command timeout (5519ms)
testapp - timeout
zero timeout
✓ when set to 0 should disable itself (3408ms)
testapp - touch actions
tap
✓ should tap on a specified element (5824ms)
wait
✓ should move the page and wait a bit (22644ms)
pinch
✓ should do some pinching (4955ms)
✓ should do more involved pinching in and out (10031ms)
testapp - swipe actions
swipe
✓ should work with: press {element}, moveTo {destEl} (2845ms)
✓ should work with: press {element, x, y}, moveTo {element, x, y} (2817ms)
✓ should work with: press {x, y}, moveTo {x, y} (1808ms)
✓ should work with: {element, x, y}, moveTo {destEl, x, y} (2842ms)
✓ should work with press {x, y}, moveTo {destEl} (2431ms)
testapp - wait-for-apps
just waiting
✓ should work (974ms)
waiting for one element
✓ should work (752ms)
bad script
✓ should work (440ms)
uicatalog - alerts @skip-ios7up
✓ should detect Show Simple (6257ms)
✓ should detect Show OK-Cancel (6613ms)
✓ should detect Show Custom (6813ms)
uicatalog - basic @skip-ios7up
api
✓ should confirm element is not visible (2327ms)
✓ should confirm element is visible (2245ms)
✓ should confirm element is selected @skip-ios7up (4294ms)
✓ should confirm element is not selected returns false (3272ms)
appium ios @skip-ci
✓ should go back to using app from before (381ms)
uicatalog - controls @skip-ios7up
✓ should be able to get and set a picker value (4393ms)
✓ should be able to get and set a slider value (5303ms)
uicatalog - device @skip-ios7up
lock device
✓ should lock the device for 4 of seconds (+/- 2 secs) (5785ms)
background app
✓ should background the app for 4 of seconds (+/- 6 secs) (9552ms)
uicatalog - execute @skip-ios7up
✓ should do UIAutomation commands if not in web frame (310ms)
✓ should not fail if UIAutomation command blows up (434ms)
✓ should not fail with quotes (355ms)
uicatalog - find element @skip-ios7up
✓ should find a single element using elementByName (375ms)
✓ should find an element within descendants (1065ms)
✓ should not find an element not within itself (5860ms)
✓ should find some elements within itself (737ms)
✓ should not find elements not within itself (393ms)
✓ should not allow found elements to be mixed up (6043ms)
find elements using accessibility id locator strategy @skip-ci
✓ should find an element by name (565ms)
✓ should find a deeply nested element by name (424ms)
✓ should find an element by name beneath another element (928ms)
✓ should return an array of one element if the plural "elements" is used (431ms)
findElementsByClassName
✓ should return all image elements with internally generated ids (398ms)
findElementsByClassName textfield case
✓ should find only one textfield (2140ms)
findElement(s) containing name
✓ should find one element (2376ms)
✓ should find several element (2829ms)
findElement(s)ByXPath
✓ should return the last button (3078ms)
✓ should return a single element (2206ms)
✓ should return multiple elements (2035ms)
✓ should filter by name (2479ms)
✓ should know how to restrict root-level elements (6872ms)
✓ should search an extended path by child (2462ms)
✓ should search an extended path by descendant (4802ms)
✓ should filter by indices (2320ms)
✓ should filter by partial text (2316ms)
FindElement(s)ByUIAutomation
✓ should process most basic UIAutomation query (1178ms)
✓ should process UIAutomation queries if user leaves out the first period (1181ms)
✓ should get a single element (817ms)
✓ should get a single element (781ms)
✓ should get single element as array (525ms)
✓ should find elements by index multiple times (769ms)
✓ should find elements by name (828ms)
✓ should find elements by name and index (824ms)
start from a given context instead of root target
✓ should process a simple query (1044ms)
✓ should find elements by name (1012ms)
uicatalog - gestures @skip-ios7up
flick @skip-ios7up
✓ should work via webdriver method (4501ms)
✓ should work via mobile only method (4524ms)
✓ should not complete instantaneously (3032ms)
✓ should work via mobile only method with percentage (4589ms)
flick element @skip-ios7up
✓ slider value should change (5508ms)
✓ should work with mobile flick (5692ms)
✓ should work with mobile flick and percent (5784ms)
complex tap
✓ should work with custom options (4086ms)
✓ should work in relative units @skip-ios7up (3519ms)
✓ should work with default options @skip-ios7up (1371ms)
complex tap on element
✓ should work in relative units (2429ms)
✓ should work in pixels (2162ms)
scroll to element @skip-ios7up
✓ should bring the element into view (1530ms)
mobile: scroll
✓ should scroll down and up (2297ms)
✓ should scroll down and up using element (2465ms)
mobile shake
✓ should not error (334ms)
uicatalog - basic @skip-ios7up
load zipped app
✓ should load a zipped app via path (424ms)
uicatalog - basic @skip-ios7up
load zipped app with relative path
✓ should load a zipped app via path (385ms)
uicatalog - basic @skip-ios7up
load zipped app via url
✓ should load a zipped app via url (388ms)
uicatalog - move @skip-ios7up
moveTo and click
✓ should be able to click on arbitrary x-y elements (2612ms)
uicatalog - reset @skip-ios7up
app reset
✓ should be able to find elements after a soft reset (31909ms)
uicatalog - contexts @skip-ios7up
✓ getting contexts should do nothing when no webview open (880ms)
webview - basics
✓ getting current context should return NATIVE_APP when none set
✓ getting list should work after webview open (918ms)
✓ getting list multiple times should not crash appium (254ms)
✓ contexts should be strings
✓ setting context to 'WEBVIEW_1' should work (3173ms)
✓ setting context to 'WEBVIEW_1' should work without first getting contexts (3106ms)
✓ setting context to 'WEBVIEW' should work (3094ms)
✓ setting context to 'null' should work (68ms)
✓ returning to 'NATIVE_APP' should work (50ms)
✓ setting context to non-existent context should return 'NoSuchContext' (status: 35)
webview - orientation
✓ should get and set - LANDSCAPE (1227ms)
✓ should get and set - PORTRAIT (1098ms)
webview - auto
✓ should go directly into webview (2846ms)
203 passing (1h)
1 pending
3 failing
1) crash recovery should be able to recover gracefully from an app crash after shutdown:
AssertionError: expected promise to be rejected with an error including '6' but it was fulfilled with '<?xml version="1.0" encoding="UTF-8"?>\n<AppiumAUT>\n <UIAApplication name="" label="" value="" dom="" enabled="false" valid="false" visible="false" hint="" path="/0" x="4.511569358975017e-34" y="6.646703335714831e-39" width="-1.9983816146850586" height="6.798248719957089e-38">\n </UIAApplication>\n</AppiumAUT>'
2) localization - language @skip-ios8 changing to fr "before all" hook:
Error: [init({"language":"fr","app":"sample-code/apps/TestApp/build/Release-iphonesimulator/TestApp.app","browserName":"","deviceName":"iPhone 5s","launchTimeout":60000,"platformName":"iOS","platformVersion":"6.1"})] The environment you requested was unavailable.
at /Users/sebv/Documents/Work/appium/node_modules/wd/lib/webdriver.js:129:15
at Request._callback (/Users/sebv/Documents/Work/appium/node_modules/wd/lib/http-utils.js:85:7)
at Request.self.callback (/Users/sebv/Documents/Work/appium/node_modules/wd/node_modules/request/request.js:364:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/Users/sebv/Documents/Work/appium/node_modules/wd/node_modules/request/request.js:1318:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/Users/sebv/Documents/Work/appium/node_modules/wd/node_modules/request/request.js:1266:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)
3) localization - language @skip-ios8 changing to de "before all" hook:
Error: [init({"language":"de","app":"sample-code/apps/TestApp/build/Release-iphonesimulator/TestApp.app","browserName":"","deviceName":"iPhone 5s","launchTimeout":60000,"platformName":"iOS","platformVersion":"6.1"})] The environment you requested was unavailable.
at /Users/sebv/Documents/Work/appium/node_modules/wd/lib/webdriver.js:129:15
at Request._callback (/Users/sebv/Documents/Work/appium/node_modules/wd/lib/http-utils.js:85:7)
at Request.self.callback (/Users/sebv/Documents/Work/appium/node_modules/wd/node_modules/request/request.js:364:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/Users/sebv/Documents/Work/appium/node_modules/wd/node_modules/request/request.js:1318:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/Users/sebv/Documents/Work/appium/node_modules/wd/node_modules/request/request.js:1266:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)
➜ appium git:(master) DEVICE=ios6 mocha -g 'crash recovery should be able to recover gracefully from an app crash after shutdown' test/functional/ios/crash-specs.js
crash recovery
✓ should be able to recover gracefully from an app crash after shutdown (10999ms)
1 passing (41s)
➜ appium git:(master) DEVICE=ios6 mocha -g 'localization - language' test/functional/ios/testapp/localization/language-specs.js
localization - language @skip-ios8
changing to fr
✓ should be fr (362ms)
changing to de
✓ should be de (345ms)
2 passing (1m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment