@awam/ti.appium
v0.1.1
Published
Plugin for using appium as part of the Titanium build process
Downloads
5
Readme
ti.appium
Warning this project is purely for investigatory purposes in my own time, so please do not expect any advanced support other than being pointed to examples. However, if you do use it, awesome! :)
This is a Titanium CLI hook, that abstracts away the need for managing appium, webdriver bindings etc (all the horrible bits) when doing UI automation. All you need to worry about is deciding your webdriver package, and writing your tests.
- If you can think of any features that you'd like, file an issue. But there are no guarantees it would be implemented.
- If you find bugs, please file an issue, with as much information as you can.
- If you'd like to contribute, message me on ti-slack.
Usage
Getting started
To get started:
- Install the package using
[sudo] npm install -g @awam/ti.appium
- This will install the package for use
- Run
tiappium-init-hook
- This will add the CLI hook into your Titanium config
- Run
tiappium-init-project
(In a Titanium project root)- This will copy across a basic template into your project.
Writing tests
- You can choose from two webdriver implementations wd, and webdriverio. You can specify which one to use in the main config file at
e2e/config.json
, by setting thedriver
property to eitherwd
orwebdriverio
- There are currently two examples for the (standard Titanium template)[https://github.com/ewanharris/appium-test-repo] and KitchenSink-v2
Running the tests
- Building with the
--appium
flag with make the tests run at the end of the build process, under the hood this will add the--build-only
flag for you as we need to hand off the app to appium for installation. - You will need to setup the desired targets for the platform in the platform specific config at
e2e/<platform>/config.json
, this will eventually become a CLI option too. - It's not pretty, but yes you do need to run the build every time. Eventually I foresee a command that is solely designed to run the tests when you're just writing tests and not actually making edits to your app.
Resources
Appium site - Look here for getting started tips, you do not need to install appium itself as it is contained in this package. appium-doctor - Check if you're actually set up for doing this wd - One of the possible binding choices webdriverio - The other binding choice
Possible plans
This is just a brain dump of stuff that I'd like to try and implement, it should probably become GitHub issues.
ti appium
command that will only run the tests with the existing app.- Maybe move the webdriver/appium packages out of the dependencies and into peerDependencies/the app
- It takes forever to install this package (
added 1809 packages in 360.666s
....) - It's all overridable anyway
- It takes forever to install this package (