https://github.com/testingbot/testingbotclient
Python library to use the TestingBot API
https://github.com/testingbot/testingbotclient
python testingbot testingbot-api webdriver webdriver-python
Last synced: 3 months ago
JSON representation
Python library to use the TestingBot API
- Host: GitHub
- URL: https://github.com/testingbot/testingbotclient
- Owner: testingbot
- License: mit
- Created: 2015-11-13T08:29:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T14:28:34.000Z (about 1 year ago)
- Last Synced: 2024-09-29T02:05:45.115Z (8 months ago)
- Topics: python, testingbot, testingbot-api, webdriver, webdriver-python
- Language: Python
- Size: 39.1 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://badge.fury.io/py/testingbotclient)
# testingbotclient
Python client for TestingBot REST API
## Install
```shell
pip install testingbotclient
```## TestingBot
[TestingBot](https://testingbot.com/) allows you to run Selenium tests in the cloud.
With access to over +2600 different browser/device combinations, you can run your browser and mobile tests in parallel on the TestingBot Grid.## Getting Started
```python
import testingbotclienttb = testingbotclient.TestingBotClient('key', 'secret')
```It is also possible to use `TESTINGBOT_KEY` and `TESTINGBOT_SECRET` environment variables instead of specifying these in the TestingBotClient constructor. Or use a `~/.testingbot` file with `key:secret`.
*All API methods can throw these exceptions:*
```python
TestingBotException(errorMessage)
```### getBrowsers
Retrieves collection of available browsers```python
testingbotclient.information.get_browsers()
```### getDevices
Retrieves collection of devices```python
testingbotclient.information.get_devices()
```### getAvailableDevices
Retrieves collection of devices currently available```python
testingbotclient.information.get_available_devices()
```### getDevice
Retrieves information for a specific device```python
testingbotclient.information.get_device(deviceId)
```### updateTest
Update meta-data for a test- `String` status_message
- `boolean` success
- `String` build
- `String` name```python
testingbotclient.tests.update_test(sessionId, status_message=.., passed=1|0, build=.., name=..)
```### stopTest
Stops a running test```python
testingbotclient.tests.stop_test(sessionId)
```### deleteTest
Deletes a test from TestingBot```python
testingbotclient.tests.delete_test(sessionId)
```### getTest
Retrieves information regarding a test```python
testingbotclient.tests.get_test(sessionId)
```### getTests
Retrieves a collection of tests```python
testingbotclient.tests.get_tests(offset=0, limit=30)
```### getBuilds
Retrieves a collection of builds```python
testingbotclient.build.get_builds(offset=0, limit=30)
```### getTestsForBuild
Retrieves a collection of tests for a specific build```python
testingbotclient.build.get_tests_for_build(buildId)
```### deleteBuild
Deletes a specific build```python
testingbotclient.build.delete_build(buildId)
```### getUserConfig
Retrieves information about the current user```python
testingbotclient.user.get_user_information()
```### updateUser
Updates information about the current user```python
testingbotclient.user.update_user_information(userInformation)
```### getTunnels
Retrieves tunnels for the current user```python
testingbotclient.tunnel.get_tunnels()
```### deleteTunnel
Deletes/stops a specific tunnel for the current user```python
testingbotclient.tunnel.delete_tunnel(tunnelId)
```### uploadToStorage - Local File
Uploads a local file to TestingBot Storage```python
testingbotclient.storage.upload_local_file(localFilePath)
```### uploadToStorage - Remote File
Uploads a remote file to TestingBot Storage```python
testingbotclient.storage.upload_remote_file(localFilePath)
```### getStoredFile
Retrieves meta-data from a previously stored file```python
testingbotclient.storage.get_stored_file(appUrl)
```### getStoredFiles
Retrieves meta-data from previously stored files```python
testingbotclient.storage.get_stored_files(offset=0, limit=30)
```### deleteStorageFile
Deletes a file previously stored in TestingBot Storage```python
testingbotclient.storage.remove_file(appUrl)
```### get_share_link
Calculates the authenticationHash necessary to share tests```python
testingbotclient.get_share_link(sessionId)
```## Test
```python
python tests/test_client.py
```## More documentation
Check out the [TestingBot REST API](https://testingbot.com/support/api) for more information.