Run unit tests which check each method and commands, URL, using the webmock.
$ bundle install
$ bundle exec parallel_test test/unit/
Run functional tests which require the Appium server and real device, Simulator/Emulator.
- Start Appium server
$ npm install -g appium
$ appium
- Conduct tests
$ bundle install
$ rake test:func:android # Andorid
$ rake test:func:ios # iOS
- Launch the Appium server locally.
- Run the following script.
test.rb
require 'rubygems'
require 'appium_lib_core'
opts = {
caps: {
platformName: :ios,
platformVersion: '11.0',
deviceName: 'iPhone Simulator',
automationName: 'XCUITest',
app: '/path/to/MyiOS.app'
},
appium_lib: {
wait: 30
}
}
@core = Appium::Core.for(self, opts) # create a core driver with `opts` and extend methods into `self`
@driver = @core.start_driver
# Launch iPhone Simulator and `MyiOS.app`
@driver.find_element(:accessibility_id, 'some accessibility') # find an element
- Run the script
# shell 1
$ appium
# shell 2
$ ruby test.rb
Use appium_thor to release this gem.
$ thor bump # bumpy,
$ thor release
- Fork it ( https://github.com/appium/ruby_lib_core/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Apache License v2