Skip to main content

Python API wrapper for TestObject

Project description

Build Status codecov PyPI version

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', password='password')
# Password only needed if using Session Reports
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()

Get Session Reports

response = client.devices.get_session_reports(last_days=30, offset=1, limit=50)
reports = 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)

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Project details


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.2.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

testobject-0.2.0-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file testobject-0.2.0.tar.gz.

File metadata

  • Download URL: testobject-0.2.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for testobject-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d98df512333a126507ee8d50c01cb8c9f6fb36d122e61b6a5d5e9d1eede2e74f
MD5 8cfd9767b67f7c3e12d018dcd0f189f1
BLAKE2b-256 97b50e718fecf37763652456430b1101b04261168cd0dfd1a60daee96e4d74da

See more details on using hashes here.

File details

Details for the file testobject-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for testobject-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d5a639f4b30928e1e820406f0661dd592be6119a46cb7d4ea0401c893c084749
MD5 4854c834a02fcdaa7f209af202a839d2
BLAKE2b-256 0276f487049b18b2cb6a4bda5eeb3544633a11b94b5a13845ddd8140588ec08a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page