TestingBot API Documentation
TestingBot exposes a REST API which you can use to access or modify all your data, in a simple and secure way.
All API responses are in JSON format.
Our API endpoint is: https://api.testingbot.com
The most recent version: v1
API Clients
We have created open source client libraries to easily interact with our API:
List of browsers
This call will return a list of browsers our grid currently supports.
No authentication is required for this API call.
- (string) type - either "webdriver" or "rc"
Authentication
You can authenticate to our TestingBot API by providing your API key and API secret which you can obtain in the member area.
Authentication to the API needs to happen via HTTP Basic Auth.
All requests must be made to our endpoint via HTTP. You must authenticate for all API requests, except for List of browsers
.
Access your user info
This call will return the data associated to your account.
You can edit this data by issueing a PUT request to our API.
None required
Edit your user info
This call will return the data associated to your account.
You can edit this data by issueing a PUT request to our API.
- (string) first_name
- (string) last_name
Get Team Info
If you are part of a team, you can fetch information regarding the team with this API call.
The response will include the maximum allowed concurrency for both VM based testing and physical mobile device testing.
Next to that, the response will include the current usage of the entire team, for both VM based testing and physical mobile device testing.
Get users in your team
Retrieve all users that are part of your team.
{
"data":[
{
"id":337,
"first_name":"test",
"last_name":"user",
"seconds":12000,
"last_login":"2021-05-12T19:37:35.000Z",
"plan":"Free Trial",
"max_concurrent":2,
"max_concurrent_mobile":2,
"company":"",
"street":"",
"city":"",
"country":"",
"vat":null,
"read_only":false,
"roles":[],
"current_vm_concurrency":0,
"current_physical_concurrency":0
}
],
"meta":{
"offset":0,
"count":1,
"total":1
}
}
The roles
field indicates if you have one of the roles in the team:
- ADMIN
Retrieve a specific user in your team
Retrieve a specific user that is part of your team.
- (string) :id - a unique string identifying the user
{
"id":337,
"first_name":"test",
"last_name":"user",
"seconds":12000,
"last_login":"2021-05-12T19:37:35.000Z",
"plan":"Free Trial",
"max_concurrent":2,
"max_concurrent_mobile":2,
"company":"",
"street":"",
"city":"",
"country":"",
"vat":null,
"read_only":false,
"roles":[],
"current_vm_concurrency":0,
"current_physical_concurrency":0
}
The roles
field indicates if you have one of the roles in the team:
- ADMIN
Create a user in your team
Adds a new user to your team. You can use this API call to add TestingBot accounts for colleagues or people in your team.
Usage of this API call requires an upgraded account and
ADMIN
role.
- (string) :first_name
- (string) :last_name
- (string) :email
- (string) :password
{
"id":337,
"first_name":"Bruno",
"last_name":"Mars",
"seconds":12000,
"last_login":"2021-05-12T19:37:35.000Z",
"plan":"Free Trial",
"max_concurrent":2,
"max_concurrent_mobile":2,
"company":"",
"street":"",
"city":"",
"country":"",
"vat":null,
"read_only":false,
"roles":[],
"current_vm_concurrency":0,
"current_physical_concurrency":0
}
Update a user in your team
Updates details for a user in your team.
Usage of this API call requires an upgraded account and
ADMIN
role.
- (string) :id
- (string) :first_name
- (string) :last_name
- (string) :email
- (string) :password
- (string) :credits - how many credits (in seconds) this user for running tests on VMs
- (string) :device_credits - how many credits (in seconds) this user for running tests on physical devices
- (string) :concurrency - how many tests this user is able to run in parallel on VMs
- (string) :concurrencyPhysical - how many tests this user is able to run in parallel on physical devices
{
"id":337,
"first_name":"Bruno",
"last_name":"Mars",
"seconds":12000,
"last_login":"2021-05-12T19:37:35.000Z",
"plan":"Free Trial",
"max_concurrent":2,
"max_concurrent_mobile":2,
"company":"",
"street":"",
"city":"",
"country":"",
"vat":null,
"read_only":false,
"roles":[],
"current_vm_concurrency":0,
"current_physical_concurrency":0
}
Reset credentials for a specific user in your team
This API call allows you to reset the secret credentials for a user in your team, which are required to connect to the TestingBot grid.
Usage of this API call requires an
ADMIN
role.
- (string) :id
Only the
client_key
will be returned. Theclient_secret
will also be reset, but will only be visible to the user in the member area.
Retrieve your tests
Will return all the tests you have created together with details for every test.
You can use the offset and count parameters to paginate your tests.
- (int) offset (optional) (default 0) - paginate tests starting from this number
- (int) count (optional) (default 10, max 500) - number of tests to fetch
- (string) group (optional) - retrieve tests that belong to this group
- (string) build (optional) - retrieve tests that belong to this build
- (int) browser_id (optional) - retrieve tests that ran with this browser_id
- (string) skip_fields (optional) - skip these fields. For example: ?skip_fields=logs,thumbs
{
"data":[
{
"created_at":"2011-07-30T23:21:23Z",
"completed_at":"2011-07-30T23:22:44Z",
"extra":null,
"id":3,
"name":"MyTest::testTitle",
"session_id":"f7903f9e93e74fe1b0e924bf9d2ce9fc",
"status_message":"Failed asserting that 1 equals 0.",
"device_name": null,
"platform_name": null,
"status_id": 1,
"success":false,
"test_environment_id":1,
"thumbs":[],
"video":"https://s3.amazonaws.com/rectestingbot/sample.mp4",
"groups":["testingbot.com"],
"browser":"IE8",
"browser_version":8,
"os":"WINDOWS",
"duration":13,
"build":"buildid",
"logs":{"vm":"https://s3-eu-west-1.amazonaws.com/eulogtestingbot/session.txt"}
}
],
"meta":
{
"offset":2,
"count":3,
"total":789
}
}
- 404 Not found - test not found
Specific test info
This call will return info for one of your tests.
In the example below, the response will contain info for a test with Selenium sessionId 3.
You can fetch all the various test sessionIds that belong to you by fetching your tests.
- (string) :webdriver_session_id - a unique string identifying your test (= Selenium sessionId)
- (string) skip_fields (optional) - skip these fields. For example: ?skip_fields=logs,thumbs
{
"created_at":"2011-07-30T23:21:23Z",
"completed_at":"2011-07-30T23:22:23Z",
"extra":null,
"id":3,
"name":"MyTest::testTitle",
"session_id":"f7903f9e93e74fe1b0e924bf9d2ce9fc",
"status_message":"Failed asserting that 1 equals 0.",
"device_name": null,
"platform_name": null,
"success":false,
"state":"COMPLETE",
"unknown":false,
"thumbs":["https://s3.amazonaws.com/euthumbtestingbot/3_f93782fji.jpg"],
"video":"https://s3.amazonaws.com/eurectestingbot/sample.mp4",
"logs": {"selenium":"https://s3-eu-west-1.amazonaws.com/eulogtestingbot/session.txt"},
"groups":["testingbot.com"],
"build": null,
"browser":"IE8",
"browser_version": 8,
"os":"VISTA",
"duration":60,
"type":"WEBDRIVER",
"assets_available": true,
"steps": [
{
"command":"/session",
"arguments":"{\"capabilities\":{\"alwaysMatch\":{\"browserName\":\"chrome\",\"version\":\"108\"},\"firstMatch\":[{}]},\"desiredCapabilities\":{\"platform\":\"WIN8\",\"browserName\":\"chrome\",\"version\":\"108\"}}",
"response":"cb7503d4b57a-1df17d3a749a-bb324331da31-167601846491-06317943",
"time":1676018469521
}
]
}
- 404 Not found - test not found
Update a test
This call will update a test.
You can use this call to update the success status, add a name or extra data, ...
To update a specific test, pass its unique test ID or its Selenium session ID.
- (string) id - a unique string identifying your test (= Selenium sessionId, a UUID)
- (boolean) test[success] - indicating if the test was successful
- (string) test[status_message] - the status/error message of your test
- (string) test[name] - the name of your test
- (string) test[extra] - extra data for this test
- (string) groups=...,... - a comma-separated string of groups for this test
- (string) build=... - what build this test belongs to
- 404 Not found - test not found
Delete test
Will delete a specific test, together with possible thumbnails.
In the example below, we'll delete a test with id 3.
You can fetch all the various test ids that belong to you by fetching your tests.
- (string) id - a unique identifier identifying your test
- 404 Not found - test not found
Stop test
Will terminate the running test job.
This will end the test and mark the test as completed.
Any test assets and metadata gathered will be available for download.
- (string) :session_id - a unique number identifying your test
- 404 Not found - test not found
Retrieve all builds
Will retrieve all builds for your account.
A build is a group of tests.
- (int) offset (optional) (default 0) - paginate tests starting from this number
- (int) count (optional) (default 10, max 500) - number of tests to fetch
Tests for a build
Will return all tests for a single build.
- (string) buildId - a unique string describing the build
{
"data":[
{
"created_at":"2011-07-30T23:21:23Z",
"completed_at":"2011-07-30T23:22:44Z",
"extra":null,
"id":3,
"name":"MyTest::testTitle",
"session_id":"f7903f9e93e74fe1b0e924bf9d2ce9fc",
"status_message":"Failed asserting that 1 equals 0.",
"success":false,
"thumbs":[],
"video":"https://s3.amazonaws.com/rectestingbot/sample.mp4",
"groups":["testingbot.com"],
"browser":"IE8",
"browser_version":8,
"os":"WINDOWS",
"duration":13,
"build":"buildid",
"logs":{"browser":"https://s3-eu-west-1.amazonaws.com/eulogtestingbot/session.txt"},
"assets_available": true
}
]
}
Delete a build
Will delete a build. Does not delete the tests in the build.
- (string) buildId - a unique string describing the build
Retrieve all Devices
Will fetch all Real Mobile devices, including devices currently in use.
The response will include all public devices, and private devices associated to your subscription (if any).
[{
"id":1,
"available":true,
"model_number":"SM-G950U1",
"resolution":"1080x2220",
"width":1080,
"height":2220,
"cpu":"Octa-core (4x2.3 GHz Mongoose M2 & 4x1.7 GHz Cortex-A53)",
"name":"Galaxy S8",
"platform_name":"Android",
"free_trial": true,
"version":"9.0",
"multiple_browsers":[
{
"id":1727,
"name":"chrome",
"version":"103.0.5060.129"
},
{
"id":2133,
"name":"firefox",
"version":"98.2"
},
{
"id":2953,
"name":"samsung",
"version":"13.2.1.70"
},
{
"id":2954,
"name":"opera",
"version":"67.1"
}
]
},
{
"id":5,
"available":false,
"model_number":"MRY42B/A",
"resolution":"828x1792",
"width":828,
"height":1792,
"cpu":"ARM - Single-core - 2390Mhz",
"name":"iPhone XR",
"version":"16.3",
"platform_name":"iOS",
"free_trial": false
}]
Retrieve all Available Devices
Will fetch all available Real Mobile devices.
The response will include all public devices, and private devices associated to your subscription (if any).
[{
"id":1,
"available":true,
"model_number":"SM-G950U1",
"resolution":"1080x2220",
"width":1080,
"height":2220,
"cpu":"Octa-core (4x2.3 GHz Mongoose M2 & 4x1.7 GHz Cortex-A53)",
"name":"Galaxy S8",
"platform_name":"Android",
"free_trial": true,
"version":"9.0",
"multiple_browsers":[
{
"id":1727,
"name":"chrome",
"version":"103.0.5060.129"
},
{
"id":2133,
"name":"firefox",
"version":"98.2"
},
{
"id":2953,
"name":"samsung",
"version":"13.2.1.70"
},
{
"id":2954,
"name":"opera",
"version":"67.1"
}
]
},
{
"id":5,
"available":true,
"model_number":"MRY42B/A",
"resolution":"828x1792",
"width":828,
"height":1792,
"cpu":"ARM - Single-core - 2390Mhz",
"name":"iPhone XR",
"version":"16.3",
"platform_name":"iOS",
"free_trial": false
}]
Device Detail
Retrieves details for a single device.
{
"id":12,
"available":true,
"model_number":"E",
"resolution":"1440x3200",
"width":1440,
"height":3200,
"cpu":"ARM - Quad-core - 1593Mhz",
"name":"Galaxy S20",
"platform_name":"Android",
"free_trial": false,
"version": "10.0",
"multiple_browsers":[
{"id":2598,"name":"chrome","version":"101"},
{"id":2919,"name":"firefox","version":"98.2"},
{"id":2957,"name":"samsung","version":"13.2.1.70"},
{"id":2958,"name":"opera","version":"67.1"}
]
}
Take Screenshots
With this API call you can request TestingBot to take screenshots of a specific URL with the browsers you specify.
Important: Please specify the application/json
Content-Type header and specify the post body as JSON.
$ curl -H 'Content-Type: application/json' -X POST "https://api.testingbot.com/v1/screenshots" \
-u key:secret \
-d '{"url":"https://www.google.com", "resolution" : "1280x1024", "browsers" : [{ "browserName" : "chrome", "version" : 61, "os" : "SIERRA"}, { "browserName" : "safari", "version" : 11, "os" : "HIGH-SIERRA"}]}'
- (string) url - the URL of the page you'd like to take screenshots of
-
(string) resolution - the screenresolution of the OS:
- 800x600
- 1024x768
- 1280x960
- 1280x1024
- 1600x1200
- 1920x1200
- 2560x1440
- (string) callback_url (optional) - when the screenshots are taken, we can send a JSON formatted post to the callback URL you specify. The JSON body will be identical to the response of the Retrieve Screenshots API call
- (boolean) full_page (optional) - by default we take a screenshot of the viewport. If you'd like a screenshot of the entire page, set this to 'true'.
- (int) wait_time (optional) (default 0) - the time (in seconds) to wait between page load and taking the screenshots
-
(string) browsers - a list of browsers with keys:
- (string) browserName - the name of the browser (internet explorer, chrome, safari, firefox, ...)
- (string) version - the version of the browser you require
- (string) os - the OS where the test should run
Retrieve Screenshots
Specify the id of the take screenshot call to query the progress of the screenshots.
- (int) id - the id of the screenshot group
{
"state":"done",
"screenshots":[
{
"image_url":"https://....",
"thumb_url":"https://....",
"state":"done",
"id":"9c7deea4-6f23-4041-842b-39cccee447fa",
"created_at":"2017-10-13T14:47:44.000Z",
"os":"SIERRA",
"browser_name":"googlechrome",
"browser_version":"61",
"browser_id":1146,
"device_name":null,
"platform_name":""
}
]
}
-
(string) state - represents the current state for screenshot job. Values can be:
- processing: Not all screenshots have been taken yet.
- done: All screenshots are available and can be accessed.
- error: Something went wrong while trying to take the screenshots.
- stopped: The process of taking the screenshots was stopped by manually clicking the 'stop' button in our UI.
-
The screenshots object itself:
- (string) image_url - location to the actual screenshot (png format)
- (string) thumb_url - 100x100 thumb of the actual screenshot
-
(string) state - represents the current state for the screenshot. Values can be:
- processing: The screenshot has not been taking yet, the test is either queued or running.
- done: The screenshot has been taken and has been uploaded to our cloud - you can now view the screenshot via image_url or thumb_url.
- error: Something went wrong while trying to take the screenshot.
- stopped: The process of taking the screenshot was stopped before a screenshot was taken. This can only be done by manually clicking the 'stop' button in our UI.
- (string) id - a unique identifier for this screenshot
Screenshot history
Retrieves a list of previous screenshot jobs.
This will return a list of screenshot jobs. You can use the id
of every job to fetch the screenshots for this job.
- (int) offset (optional) (default 0) - paginate screenshot jobs starting from this number
- (int) count (optional) (default 10, max 500) - number of screenshot jobs to fetch
TestingBot Tunnel List
List of currently active TestingBot Tunnels for your account.
You can have up to 3 simultaneous tunnels running with your account.
By issuing a DELETE
request you can delete/stop any of your tunnels.
TestingBot Tunnel Delete
Delete an active TestingBot Tunnel in your account.
Usually the tunnel jar will issue this call automatically when you gracefully exit the jar.
You can also use this API call, which destroys the tunnel VM.
List Lab tests
Will return a list with all the tests in our TestLab.
In our TestLab you can upload Selenium tests, which you can then execute with a cron or by creating an API request.
- (int) offset (optional) (default 0) - paginate tests starting from this number
- (int) count (optional) (default 10, max 500) - number of tests to fetch
{
"data":[
{
"id":215,
"enabled":false,
"alerts":[],
"url":"https://testingbot.com/",
"name":"testingbot",
"created_at":"2012-03-12T20:03:45Z",
"updated_at":"2012-03-13T20:26:43Z",
"last_run":"2012-03-13T06:50:48Z",
"cron":"0 0 * * *",
"browsers":[
{"name":"firefox","version":10,"os":"LINUX"}
]
}],
"meta":
{
"offset":2,
"count":3,
"total":25
}
}
Specific Lab test info
This call will return info for a specific TestLab test.
In the example below, the response will contain info for a test with id 215.
- (int) id - a unique identifier identifying your test in the TestLab
- 404 Not found - lab test not found
Create a Lab Test
Create a lab Test
$ curl -X POST "https://api.testingbot.com/v1/lab" \
-u key:secret -d "test[name]=test" -d "test[cron]=31 * * * *"
- (string) test[name] - name of the test * required argument
- (string) test[url] - url to test * required argument
- (string) test[cron] - cron format, when to run the test
- (boolean) test[screenshot] - take screenshots
- (boolean) test[video] - record video
- (int) test[idletimeout] - how long we keep a test open without receiving a request
- (string) test[screenresolution] - screenresolution of the OS
Upload .side file
You can also upload a .side
file to the TestingBot REST-API to immediately create a test and upload all steps from the file.
$ curl -X POST "https://api.testingbot.com/v1/lab" \
-u key:secret -F "test[name]=test" -F "test[cron]=31 * * * *" -F "file=@/Users/{yourName}/example.side"
- (string) test[name] - name of the test * required argument
-
(File) filepath - to the
.side
file on your machine * required argument - (string) test[cron] - cron format, when to run the test
Delete Lab test
This call will delete a specific TestLab test.
- (string) id - a unique identifier identifying your test in the TestLab
- 404 Not found - lab test not found
Update Lab test
This call will update a specific TestLab test.
- (string) id - a unique identifier identifying your test in the TestLab
- (string) url
- (string) name
- (string) cron
- (boolean) enabled
- 404 Not found - lab test not found
Lab Test Schedule
Add or update the Lab Test Schedule. You can schedule when/at which interval a test should be run.
$ curl "https://api.testingbot.com/v1/lab/215/schedule" \
-X POST \
-d "type=once" \
-d "day=2020-03-01" \
-d "hour=00:00" \
-u key:secret
- (string) type once, daily, weekly, custom (cron format)
- (string) day 2020-03-01 for example (to be used with 'once' or 'weekly')
- (string) hour 00:01 for example (to be used with 'once', 'daily' or 'weekly')
- (string) cronFormat */5 * * * * for example (cron format)
- 404 Not found - lab test not found
Lab Test Alert
Add or update the Lab Test Alert. You can receive an alert via e-mail, Webhook or SMS message.
$ curl "https://api.testingbot.com/v1/lab/215/alert" \
-X POST (or PUT for update) \
-d "kind=EMAIL" \
-d "level=IMMEDIATELY" \
-d "content=my@email.com" \
-u key:secret
- (string) kind EMAIL, API or SMS
- (string) level IMMEDIATELY or DAILY
- (string) content the email address, telephone number or callback URL
- 404 Not found - lab test not found
Lab Test Report
Add or update the Lab Test Report setting. You can receive a daily report about your test success/fail rate.
$ curl "https://api.testingbot.com/v1/lab/215/report" \
-X POST (or PUT for update) \
-d "email=my@email.com" \
-d "cron=*/5 * * * *" \
-u key:secret
- 404 Not found - lab test not found
Modify Test Steps
Update the steps for this test. Will remove all steps and add the steps you specify.
$ curl "https://api.testingbot.com/v1/lab/215/steps" \
-X POST \
-d "steps[][cmd]=open" \
-d "steps[][locator]=/" \
-d "steps[][value]=" \
-d "steps[][order]=0" \
-u key:secret
- (string) step[cmd] - Selenium RC command
- (int) step[order] - Define where this step should be located in the list of steps
- (string) step[locator] - Selenium RC locator
- (string) step[value] - Selenium RC value
- 404 Not found - lab test not found
List Test Steps
This will return all steps for a specific Lab Test.
- (int) offset (optional) (default 0) - paginate steps starting from this number
- (int) count (optional) (default 10, max 500) - number of steps to fetch
{
"data": [{
"test_order": 0,
"cmd": "open",
"locator": "/",
"value": "",
"created_at": "2019-05-02T14:33:48.000Z",
"updated_at": "2019-05-02T14:33:48.000Z"
},
{
"test_order": 1,
"cmd": "type",
"locator": "id=username",
"value": "test",
"created_at": "2019-05-02T14:33:48.000Z",
"updated_at": "2019-05-02T14:33:48.000Z"
},
{
"test_order": 2,
"cmd": "type",
"locator": "id=password",
"value": "test",
"created_at": "2019-05-02T14:33:48.000Z",
"updated_at": "2019-05-02T14:33:48.000Z"
}
],
"meta": {
"offset": 0,
"count": 3,
"total": 3
}
}
- 404 Not found - lab test not found
Get Browsers for Test
Retrieve what browsers this Lab Test will run on.
- (int) suiteId - unique Id for this suite
Update Browsers for Test
Update a Lab Test, indicate on which browsers the test should run.
This call will override all existing browsers attached to this test.
$ curl -X POST "https://api.testingbot.com/v1/lab/:suiteId/browsers" \
-u key:secret -d "browser_ids=515,518
- (int) suiteId - unique Id for this suite
- (string) browser_ids - (comma-seperated list) - list of all browser_ids to add to this test
You can get the browser_ids by using the List of browsers call and use the browser_ids in that response.
Run a specific Lab test
This call will run a specific TestLab test on our grid.
Upload a Selenium test in our TestLab, indicate on which browsers you want it to run and then run the test with this API call.
You could use this call to run tests when you wish, for example before/after deployment of your code.
Since this call is asynchronously (test takes too long to be processed during the API call), you need to specify an API callback page in the alert section of your TestLab test.
This call will return a success state and a job_id, which you can use to query the progress of the test.
- (int) testid - a unique number identifying your test in the TestLab
- (string) url (optional) - change the baseURL for this test
- 404 Not found - lab test not found
Stop a specific Lab test
This call will stop a specific TestLab test currently running on our grid.
As soon as we receive this call, we will no longer continue running the remaining steps in the running Lab test.
- (int) testid - a unique number identifying your test in the TestLab
- (int) browser_id (optional) - a browser_id to only stop the test for this browser
- 404 Not found - lab test not found
Run all Lab tests
This call will run all TestLab tests on our grid.
This call will return a success state and a job_id, which you can use to query the progress of the tests.
- (string) url (optional) - change the baseURL for this test
Test Job
This call will return the status of a running test or suite, initiated by an API call.
- (int) :jobId - a unique number identifying your job
{
"status":"FINISHED",
"created_at":"2016-04-15T13:47:39.000Z",
"updated_at":"2016-04-15T13:49:30.000Z",
"success":false,
"test_ids":[
6620446
],
"errors":[
{
"msg":"Actual value 'Google' did not match 'Goooogle'",
"step":"verifyTitle",
"browser":{
"name":"firefox",
"version":"43",
"os":"VISTA"
},
"time":"2016-04-15T13:48:25.839Z",
"test":6620446
}
]
}
The various states are:
WAITING
, RUNNING
and FINISHED
.
- 404 Not found - job not found
Webhook
If you initiated an API call running one or all tests, you will want to know the results of the test(s).
We post the result of the test(s) back to the location you specified in our TestLab (alerts section).
{
"success":"false",
"errors":[
{
"msg" : "word Not found",
"step" : "verifyTextPresent",
"browser" : {
"name" : "iexplore",
"version" : "8",
"os" : "WINDOWS"
},
"time" : "2012-03-13 20:34:59 UTC",
"test_id" : "48586",
"job_id": 17,
"lab_id" : 133
}
],
"job_id":3,
"test_ids":[48586]
}
List Lab Suites
Get a list of all Lab Suites currently available for your account in the TestLab.
- (int) offset (optional) (default 0) - paginate suites starting from this number
- (int) count (optional) (default 10, max 500) - number of suites to fetch
{
"data": [
{
"id": 1051,
"enabled": true,
"alerts": [
{
"type": "API",
"value": "https:\/\/mysite.com\/callback\/",
"level": "IMMEDIATELY"
}
],
"name": "Example",
"created_at": "2017-03-07T19:11:41.000Z",
"updated_at": "2017-03-09T12:17:22.000Z",
"last_run": "2017-03-09T12:17:22.000Z",
"cron": null,
"browsers": [
{
"name": "firefox",
"version": "41",
"os": "VISTA"
}
],
"test_count": 5
}
],
"meta": {
"offset": 0,
"count": 10,
"total": 1
}
}
Specific Lab Suite
Get information about a specific Lab Suite.
- (int) suiteId - unique Id for this suite
Run a specific Lab suite
This call will run a specific TestLab suite on our grid.
Upload a Selenium suite in our TestLab, indicate on which browsers you want it to run and then run the suite with this API call.
You could use this call to run suites when you wish, for example before/after deployment of your code.
Since this call is asynchronously (suite takes too long to be processed during the API call), you need to specify an API callback page in the alert section of your TestLab suite.
This call will return a success state and a job_id, which you can use to query the progress of the test.
- (int) :suiteId - a unique number identifying your suite in the TestLab
- 404 Not found - lab test not found
Create a Lab Suite
Create a lab suite
$ curl -X POST "https://api.testingbot.com/v1/labsuites" \
-u key:secret -d "suite[name]=test" -d "suite[cron]=31 * * * *"
- (string) suite[name] - name of the suite.
- (string) suite[cron] - cron format, when to run the suite.
- (boolean) suite[screenshot] - take screenshots for every step.
- (boolean) suite[video] - record video of this test.
- (int) suite[idletimeout] - how long before we consider a test to be idle.
- (string) suite[screenresolution] - screenresolution of the OS.
Delete a Lab Suite
Delete a lab suite
- (int) suiteId - unique Id for this suite
Get Browsers for Lab Suite
Retrieve what browsers this Lab Suite will run on.
- (int) suiteId - unique Id for this suite
Update Browsers for Lab Suite
Update a Lab Suite, indicate on which browsers the suite should run.
This call will override all existing browsers attached to this suite.
$ curl -X POST "https://api.testingbot.com/v1/labsuites/suiteId/browsers" \
-u key:secret -d "browser_ids=515,518
- (int) suiteId - unique Id for this suite
- (string, comma-seperated list) browser_ids - list of all browser_ids to add to this suite
You can get the browser_ids by using the List of browsers call and use the browser_ids in that response.
Get Tests for a Lab Suite
Retrieves all tests in this Suite.
- (int) suiteId - unique Id for this suite
- (int) offset (optional) (default 0) - paginate tests starting from this number
- (int) count (optional) (default 10, max 500) - number of tests to fetch
{
"data": [
{
"id": 18666,
"enabled": true,
"alerts": [],
"url": "https:\/\/mysite.com\/",
"name": "MyTest",
"created_at": "2017-03-09T12:14:48.000Z",
"updated_at": "2017-03-09T12:19:30.000Z",
"last_run": "2017-03-09T12:19:30.000Z",
"cron": null,
"browsers": [
{
"name": "firefox",
"version": "41",
"os": "VISTA"
}
]
}
],
"meta": {
"offset": 0,
"count": 1,
"total": 1
}
}
Add Tests to a Lab Suite
Add one or more tests to this suite.
$ curl -X POST "https://api.testingbot.com/v1/labsuites/:suiteId/tests" \
-u key:secret -d "test_ids=3,4"
- (int) suiteId - unique Id for this suite
- (string, comma-separated) test_ids - comma-separated list of test_ids to add to this suite.
- 404 Not found - suite not found
- 400 Bad request - missing test_ids parameter
Remove Tests from a Lab Suite
Remove a test from a Test Suite.
- (int) suiteId - unique Id for this suite
- (int) testsId - unique Id for the test in the suite
- 404 Not found - suite not found
TestingBot Storage - Upload File
TestingBot Storage makes it easy to upload a file you want to include during your test(s).
You can use this functionality to test your Android (.apk/.aab) or iOS app (.zip/.ipa), or to download and run before a test starts.
Files uploaded to TestingBot Storage are automatically pruned after 62 days. You can also delete the file manually be using the Delete API call.
Specify your own app name:The
app_url
will be a random string. If you'd like to use your own name, for example because you don't want to keep updating your test scripts each time you add a new app version, then please see below:
$ curl -X POST "https://api.testingbot.com/v1/storage/your_name" \
-u key:secret -F "file=@/path/to/app/file/Application-debug.apk"
Instead of uploading a file from your computer to TestingBot storage, you can also pass an URL where we should download your app:
Uploads to our TestingBot Storage are automatically deleted after 62 days.
We've got an example on how to upload a file with Java at our App Automate Java GitHub Repository.
TestingBot Storage - Update File
If you want to update a file you already uploaded, please use this API call.
Use the app_url
you received from the original file upload, without the tb://
scheme.
$ curl -X POST "https://api.testingbot.com/v1/storage/{app_url}" \
-u key:secret -F "file=@/path/to/app/file/Application-debug.apk"
In the example above, if your
app_url
wastb://my-file
you would use the URLhttps://api.testingbot.com/v1/storage/my-file
TestingBot Storage - Uploaded File Data
Retrieve various meta data from a previously uploaded file.
Use the app_url
you received from the original file upload.
TestingBot Storage - Upload Files List
This API call will return a list of files you or your team members have previously uploaded.
The Response will contain a url
parameter which is a signed URL you can use for up to 4 hours.
TestingBot Storage - Delete a file from Storage
Delete a file previously uploaded to TestingBot Storage.
Use the app_url
parameter of the file you wish to delete, for example from tb://398eijf83i
.
IP Ranges for whitelisting
If you would like to whitelist the IPs that are used by the TestingBot machines, you can use the API call below to fetch an up-to-date list.