Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/badoo/ios-device-server
A server to manage remote iOS simulators and devices for parallel testing
https://github.com/badoo/ios-device-server
ios test-automation
Last synced: about 1 month ago
JSON representation
A server to manage remote iOS simulators and devices for parallel testing
- Host: GitHub
- URL: https://github.com/badoo/ios-device-server
- Owner: badoo
- License: mit
- Created: 2018-05-11T16:25:41.000Z (over 6 years ago)
- Default Branch: dev
- Last Pushed: 2024-07-23T17:30:27.000Z (5 months ago)
- Last Synced: 2024-07-23T20:37:02.437Z (5 months ago)
- Topics: ios, test-automation
- Language: Kotlin
- Homepage:
- Size: 1.15 MB
- Stars: 42
- Watchers: 16
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iOS Remote Device Server [![Build Status](https://travis-ci.org/badoo/ios-device-server.svg?branch=master)](https://travis-ci.org/badoo/ios-device-server)
A server for managing, booting, and controlling simulators and devices on remote host machines.
## Features
- Enables control of simulators and devices connected to remote host machines
- Enables tests to run using remote simulators and devices
- Enables custom actions on simulators like clearing safari cookies or fast reset of a simulator
- Hides away satisfying desired capabilities, i.e. based on requested model or os will choose an appropriate host to create a simulator## Requirements
### Java
* [Download](http://google.com/#q=download+java+se) and install Java SDK 10
* set environment variable JAVA_HOME
```bash
export JAVA_HOME=$(/usr/libexec/java_home -v 10 -F)
```### Dependencies
Device Server uses fbsimctl, libimobiledevice and other tools under the hood.
To install dependencies run:
```bash
brew update
brew bundle
```#### Simulators
It might take some time to build dependencies used for physical devices. You can skip it by running following instead:
```bash
brew update
brew bundle --file="homebrew/Brewfile"
```#### Devices
Some of the dependencies needed for physical devices have outdated stable releases and have to be installed from the latest head.
After installing Brewfile you might still need to run
```bash
brew upgrade usbmuxd libimobiledevice --fetch-HEAD
```## Usage
Build and run Device Server
```bash
./bootstrap.sh
cd device-server
./run_device_server.sh
```Allocate Device
```bash
curl -X POST -d '{"model":"iPhone 6", "headless":false}' http://localhost:4567/devices
```Query Device Server
```bash
curl http://localhost:4567/status
curl http://localhost:4567/devices
```Release device by reference
```bash
curl -X DELETE http://localhost:4567/devices/${DEVICE_REF}
```Ruby sample
```ruby
require 'ios-device-server-client/remote_device'server_url = 'http://localhost:4567'
provider = IosDeviceServerClient::DeviceProvider.new(server_url)
rv = provider.create(model: 'iPhone 6', os: 'iOS 11.4', headless: false)
remote_device = IosDeviceServerClient::RemoteDevice.new(server_url, rv['ref'])begin
remote_device.await(timeout: 30)
remote_device.open_url('https://github.com/badoo/ios-device-server')
readline
ensure
remote_device.release
end
```- [ ] command line utility will be published soon