Python API wrapper for TestObject
Project description
A Python library client for TestObject API
For more on the API you can visit TestObject’s docs here.
Getting Started
Installing
To install on your machine run:
pip install testobject
Once installed you can run something like:
import testobject
client = testobject.TestObject('myusername','my_api_key')
response = client.devices.get_devices()
devices = response.json()
us_devices = devices['US']
Running the tests
Tests are done with pytest. To run these simply run:
pytest
Docs
Get All Devices
response = client.devices.get_devices()
devices = response.json()
us_devices = devices['US']
Get Available Devices
response = client.devices.get_available_devices()
devices = response.json()
us_devices = devices['US']
Get Device
response = client.devices.get_device('iPhone_5_free')
device = response.json()
Update Appium Suite
data = {}
data['title'] = "New Suite Title"
response = client.suites.update_suite(suite_number,data)
content = response.json()
Start Appium Suite Report
report = {'className': 'TOTestClass', 'dataCenterId': 'US', 'methodName': 'testMethod', 'deviceId': 'iPhone_5_free'}
data = [report] # If more than one test and/or class add more reports to the data list
response = to.suites.start_suite(suite_number, data)
content = response.json()
Stop Appium Suite Report
response = to.suites.stop_suite(suite_number, suite_report_number)
content = response.json()
Stop Appium Suite Test
response = to.suites.stop_suite_test(suite_number, suite_report_number, suite_test_number, True)
content = response.json()
Skip Appium Suite Test
response = to.suites.stop_suite_test(suite_number, suite_report_number, suite_test_number)
content = response.json()
Skip Appium Test Report
response = to.watcher.skip_test_report('appium_session_id')
Send Appium Test Report
response = to.watcher.skip_test_report('appium_session_id',True)
License
This project is licensed under the MIT License - see the LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
testobject-0.1.2.tar.gz
(3.0 kB
view details)
File details
Details for the file testobject-0.1.2.tar.gz.
File metadata
- Download URL: testobject-0.1.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a563ba2c5db0678c12561e89604305af9beeed067900aaa76a35baac2fe35a53
|
|
| MD5 |
e5aaecb02ee9c21333477bc953bcd3ff
|
|
| BLAKE2b-256 |
353f0951da342912098c87a4a722a635e1bdbdcfb5b63f638d8804999cefd361
|