Class TestingbotREST
- java.lang.Object
-
- com.testingbot.testingbotrest.TestingbotREST
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class TestingbotREST extends java.lang.Object implements java.io.CloseableJava client for the TestingBot REST API. See testingbot.com/support/api for the full reference; the project README has a usage overview.Thread safety. Instances are thread-safe: they wrap a single shared
CloseableHttpClientwith bounded connect/socket timeouts. Create one instance per credential pair and reuse it across threads rather than constructing one per request.Lifecycle. The class implements
Closeable; callclose()(or use try-with-resources) when you are done to release pooled connections.Usage.
try (TestingbotREST api = new TestingbotREST(KEY, SECRET)) { TestingbotTestCollection tests = api.getTests(0, 10); for (TestingbotTest t : tests.getData()) { System.out.println(t.getSessionId() + ": " + t.getStatusMessage()); } }Errors. Every API method throws
TestingbotApiExceptionon a 4xx/5xx response — the exception carries the HTTP status and raw response body viaTestingbotApiException.getStatusCode()andTestingbotApiException.getResponseBody()— andTestingbotUnauthorizedExceptionon a 401. Both are unchecked runtime exceptions. Methods that returnbooleanreturnfalseonly on a local transport or parse failure; HTTP-level failures propagate as exceptions.Most methods listed below were added in 1.1.0 as part of the full OpenAPI coverage; see the project CHANGELOG/release notes for the pre-1.1.0 baseline.
- Since:
- 1.0
- Author:
- TestingBot
-
-
Constructor Summary
Constructors Constructor Description TestingbotREST(java.lang.String key, java.lang.String secret)Constructs a new instance of the TestingBotREST class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddLabSuiteTests(int suiteId, java.lang.String testIds)Adds tests to a Codeless suite.booleanaddLabTestAlert(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Adds an alert to a Codeless test.voidclose()Releases the underlying HTTP client and its connections.TestingbotLabSuiteCreateAckcreateLabSuite(java.util.Map<java.lang.String,java.lang.Object> suiteFields)Creates a new Codeless test suite.TestingbotLabCreateAckcreateLabTest(java.util.Map<java.lang.String,java.lang.Object> testFields)Creates a new Codeless test.booleancreateLabTestReport(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Creates a report for a Codeless test.TestingbotScreenshotcreateScreenshots(java.util.Map<java.lang.String,java.lang.Object> params)Captures a new screenshot batch.TestingbotTeamMembercreateTeamMember(java.util.Map<java.lang.String,java.lang.Object> params)Creates a new user in your team.booleancreateTest(java.util.Map<java.lang.String,java.lang.Object> testFields)Creates a new test on TestingBot.TestingbotTunnelcreateTunnel()Creates (boots) a new tunnel.booleandeleteBuild(java.lang.String buildId)Delete a specific buildbooleandeleteLabSuite(int suiteId)Deletes a Codeless test suite.booleandeleteLabTest(int labTestId)Deletes a Codeless test.booleandeleteStorageFile(java.lang.String appUrl)Delete a file previously uploaded TestingBot StoragebooleandeleteTest(java.lang.String sessionID)Deletes a Test with sessionID (Selenium sessionID)booleandeleteTunnel()Stops the currently active tunnel for your account.booleandeleteTunnel(java.lang.String tunnelID)Deletes a Tunnel with tunnel IDjava.lang.StringgetAuthenticationHash()Calculates the authentication hash for the current user https://testingbot.com/support/other/sharingjava.lang.StringgetAuthenticationHash(java.lang.String identifier)Calculates the authentication hash for a specific identifier (sessionId/build-identifier) https://testingbot.com/support/other/sharingjava.util.List<TestingbotDevice>getAvailableDevices()Retrieves the currently available Real Mobile Devices on TestingBot.java.util.List<TestingbotDevice>getAvailableDevices(int offset, int count)Retrieves available Real Mobile Devices on TestingBotjava.util.ArrayList<TestingbotBrowser>getBrowsers()Gets list of available browsers from TestingBotTestingbotBuildCollectiongetBuilds(int offset, int count)Get test buildsTestingbotDevicegetDevice(int deviceId)Retrieves Real Mobile Devices on TestingBotjava.util.List<TestingbotDevice>getDevices(int offset, int count)Retrieves Real Mobile Devices on TestingBot This includes devices not currently availablejava.util.List<TestingbotDevice>getDevices(java.lang.String platform, java.lang.Boolean web)Retrieves Real Mobile Devices on TestingBot, filtered by platform.com.google.gson.JsonElementgetIpRanges()Retrieves the TestingBot IP ranges for firewall whitelisting.TestingbotJobgetJob(java.lang.String jobId)Gets the status of a job (e.g. a Codeless test run).TestingbotLabSuitegetLabSuite(int suiteId)Gets a specific Codeless test suite.java.util.List<TestingbotBrowser>getLabSuiteBrowsers(int suiteId)Gets the browsers configured for a Codeless suite.TestingbotLabSuiteCollectiongetLabSuites()Lists your Codeless test suites.TestingbotLabTestCollectiongetLabSuiteTests(int suiteId)Gets the tests in a Codeless suite.TestingbotLabTestgetLabTest(int labTestId)Gets a specific Codeless test.java.util.List<TestingbotBrowser>getLabTestBrowsers(int labTestId)Gets the browsers configured for a Codeless test.TestingbotLabTestCollectiongetLabTests()Lists your Codeless tests.TestingbotLabTestStepCollectiongetLabTestSteps(int labTestId)Gets the steps of a Codeless test.TestingbotScreenshotgetScreenshot(int screenshotId)Gets a specific screenshot batch.TestingbotScreenshotCollectiongetScreenshots()Lists your screenshot batches.TestingBotStorageFilegetStorageFile(java.lang.String appUrl)Retrieves meta-data from a TestingBot Storage fileTestingBotStorageFileCollectiongetStorageFiles(int offset, int count)Retrieves meta-data for TestingBot Storage filesTestingbotTeamgetTeam()Gets your team's concurrency information.TestingbotTeamMembergetTeamMember(int userId)Gets a specific team user.com.google.gson.JsonElementgetTeamMemberClientKey(int userId)Gets the client key of a team user.TestingbotTeamMemberCollectiongetTeamMembers()Lists the users in your team.TestingbotTestgetTest(java.lang.String sessionID)Gets information from TestingBot for a test with sessionIDTestingbotTestCollectiongetTests(int offset, int count)Get latest testsTestingbotTestCollectiongetTests(int offset, int count, java.util.Map<java.lang.String,java.lang.String> filters)Get latest tests, with optional server-side filters (e.g.TestingbotTestBuildCollectiongetTestsForBuild(java.lang.String buildIdentifier)Gets tests for a specific build from TestingBotTestingbotTunnelgetTunnel()Gets the currently active tunnel for your account.TestingbotTunnelgetTunnel(int tunnelId)Gets a specific tunnel by its id.java.util.ArrayList<TestingbotTunnel>getTunnels()Gets assigned tunnels for your account on TestingBotTestingbotUsergetUserInfo()Gets information from TestingBot for your user accountcom.google.gson.JsonElementgetUserKeys()Retrieves your API key and secret.booleanisTunnelAlive()Checks whether the tunnel is alive.java.lang.Iterable<TestingbotTest>iterateTests(int pageSize)Lazily iterates over all tests, paging through the API behind the scenes.java.lang.Iterable<TestingbotTest>iterateTests(int pageSize, java.util.Map<java.lang.String,java.lang.String> filters)Lazily iterates over all tests matching the given filters, paging behind the scenes.booleanpingManualSession(java.util.List<java.lang.Integer> sessionIds)Sends a keepalive ping for the given manual sessions.booleanremoveLabSuiteTest(int suiteId, int testId)Removes a test from a Codeless suite.TestingbotTeamCredentialResetresetTeamMemberKeys(int userId)Resets the API keys of a team user.booleanscheduleLabTest(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Sets or updates the schedule of a Codeless test.booleansetLabSuiteBrowsers(int suiteId, java.lang.String browserIds)Updates the browsers a Codeless suite runs on.booleansetLabTestBrowsers(int labTestId, java.lang.String browserIds)Updates the browsers a Codeless test runs on.booleansetLabTestSteps(int labTestId, java.util.List<java.lang.String> steps)Replaces the steps of a Codeless test.booleanstopLabTest(int labTestId)Stops a running Codeless test.booleanstopTest(java.lang.String sessionID)Stops a Test with sessionID (Selenium sessionID)TestingbotLabRunAcktriggerAllLabTests()Runs all Codeless tests.TestingbotLabRunAcktriggerLabSuite(int suiteId)Runs a Codeless suite.TestingbotLabRunAcktriggerLabTest(int labTestId)Runs a Codeless test.booleanupdateLabTest(int labTestId, java.util.Map<java.lang.String,java.lang.Object> testFields)Updates a Codeless test.booleanupdateLabTestAlert(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Updates the alert of a Codeless test.booleanupdateLabTestReport(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Updates a report for a Codeless test.booleanupdateManualSession(int sessionId, java.util.Map<java.lang.String,java.lang.Object> fields)Updates a manual session.TestingbotTeamMemberupdateTeamMember(int userId, java.util.Map<java.lang.String,java.lang.Object> params)Updates a team user.booleanupdateTest(TestingbotTest test)Updates a Test with sessionID (Selenium sessionID)booleanupdateTest(java.lang.String sessionID, java.util.Map<java.lang.String,java.lang.Object> details)Updates a Test with sessionID (Selenium sessionID)booleanupdateUserInfo(TestingbotUser testingbotUser)Updates information for a TestingBot UserTestingbotStorageUploadResponseuploadToStorage(java.io.File file)Upload file to TestingBot StorageTestingbotStorageUploadResponseuploadToStorage(java.lang.String url)Upload file to TestingBot Storage
-
-
-
Constructor Detail
-
TestingbotREST
public TestingbotREST(java.lang.String key, java.lang.String secret)Constructs a new instance of the TestingBotREST class.- Parameters:
key- The key to use when performing HTTP requests to the TestingBot REST APIsecret- The access key to use when performing HTTP requests to the TestingBot REST API
-
-
Method Detail
-
close
public void close()
Releases the underlying HTTP client and its connections. Call this when you are done with the client. Safe to call multiple times.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
updateTest
public boolean updateTest(TestingbotTest test)
Updates a Test with sessionID (Selenium sessionID)- Parameters:
test- The meta-data to send to the TestingBot API in a TestingBotTest class. See https://testingbot.com/support/api#updatetest- Returns:
- Boolean success response The API response
-
updateTest
public boolean updateTest(java.lang.String sessionID, java.util.Map<java.lang.String,java.lang.Object> details)Updates a Test with sessionID (Selenium sessionID)- Parameters:
sessionID- The sessionID retrieved from Selenium WebDriver/RCdetails- The meta-data to send to the TestingBot API. See https://testingbot.com/support/api#updatetest- Returns:
- Boolean success response The API response
-
stopTest
public boolean stopTest(java.lang.String sessionID)
Stops a Test with sessionID (Selenium sessionID)- Parameters:
sessionID- The sessionID retrieved from Selenium WebDriver/RC- Returns:
- Boolean response The API response
-
deleteTest
public boolean deleteTest(java.lang.String sessionID)
Deletes a Test with sessionID (Selenium sessionID)- Parameters:
sessionID- The sessionID of the test to delete from TestingBot- Returns:
- Boolean success
-
getBrowsers
public java.util.ArrayList<TestingbotBrowser> getBrowsers()
Gets list of available browsers from TestingBot- Returns:
- ArrayList containing TestingbotBrowser objects.
-
getTests
public TestingbotTestCollection getTests(int offset, int count)
Get latest tests- Parameters:
offset- where to begincount- number of tests- Returns:
- TestingbotTestCollection
-
getTest
public TestingbotTest getTest(java.lang.String sessionID)
Gets information from TestingBot for a test with sessionID- Parameters:
sessionID- The sessionID retrieved from Selenium WebDriver/RC- Returns:
- TestingbotTest
-
getUserInfo
public TestingbotUser getUserInfo()
Gets information from TestingBot for your user account- Returns:
- response The API response
-
updateUserInfo
public boolean updateUserInfo(TestingbotUser testingbotUser)
Updates information for a TestingBot User- Parameters:
testingbotUser- the user you are updating- Returns:
- boolean success
-
getTunnels
public java.util.ArrayList<TestingbotTunnel> getTunnels()
Gets assigned tunnels for your account on TestingBot- Returns:
- response The API response
-
deleteTunnel
public boolean deleteTunnel(java.lang.String tunnelID)
Deletes a Tunnel with tunnel ID- Parameters:
tunnelID- The tunnelID of the tunnel to delete from TestingBot- Returns:
- boolean
-
getTestsForBuild
public TestingbotTestBuildCollection getTestsForBuild(java.lang.String buildIdentifier)
Gets tests for a specific build from TestingBot- Parameters:
buildIdentifier- the identifier (string) for the build- Returns:
- response The API response
-
getBuilds
public TestingbotBuildCollection getBuilds(int offset, int count)
Get test builds- Parameters:
offset- where to begincount- number of builds- Returns:
- TestingbotBuildCollection
-
deleteBuild
public boolean deleteBuild(java.lang.String buildId)
Delete a specific build- Parameters:
buildId- the build identifier you want to delete- Returns:
- boolean
-
uploadToStorage
public TestingbotStorageUploadResponse uploadToStorage(java.io.File file)
Upload file to TestingBot Storage- Parameters:
file- The path to the local file you want to upload- Returns:
- TestingbotStorageUploadResponse
-
uploadToStorage
public TestingbotStorageUploadResponse uploadToStorage(java.lang.String url)
Upload file to TestingBot Storage- Parameters:
url- to the file (apk/ipa)- Returns:
- TestingbotStorageUploadResponse
-
getStorageFile
public TestingBotStorageFile getStorageFile(java.lang.String appUrl)
Retrieves meta-data from a TestingBot Storage file- Parameters:
appUrl- of the file- Returns:
- TestingBotStorageFile file
-
getStorageFiles
public TestingBotStorageFileCollection getStorageFiles(int offset, int count)
Retrieves meta-data for TestingBot Storage files- Parameters:
offset- where to begincount- number of files- Returns:
- TestingBotStorageFileCollection files
-
getAvailableDevices
public java.util.List<TestingbotDevice> getAvailableDevices(int offset, int count)
Retrieves available Real Mobile Devices on TestingBot- Parameters:
offset- where to begincount- number of devices- Returns:
- List containing TestingbotDevice objects.
-
getDevices
public java.util.List<TestingbotDevice> getDevices(int offset, int count)
Retrieves Real Mobile Devices on TestingBot This includes devices not currently available- Parameters:
offset- where to begincount- number of real devices- Returns:
- List containing TestingbotDevice objects.
-
getDevice
public TestingbotDevice getDevice(int deviceId)
Retrieves Real Mobile Devices on TestingBot- Parameters:
deviceId- - id of the Device- Returns:
- TestingbotDevice device
-
deleteStorageFile
public boolean deleteStorageFile(java.lang.String appUrl)
Delete a file previously uploaded TestingBot Storage- Parameters:
appUrl- of the file- Returns:
- boolean success
-
getTests
public TestingbotTestCollection getTests(int offset, int count, java.util.Map<java.lang.String,java.lang.String> filters)
Get latest tests, with optional server-side filters (e.g.since,browser_id,group,build,skip_fields).- Parameters:
offset- where to begincount- number of testsfilters- additional query filters (may be null or empty)- Returns:
- TestingbotTestCollection
-
iterateTests
public java.lang.Iterable<TestingbotTest> iterateTests(int pageSize)
Lazily iterates over all tests, paging through the API behind the scenes. Iteration stops when the API returns a page smaller thanpageSize.Each call to
Iterable.iterator()starts a fresh walk from offset 0.- Parameters:
pageSize- the number of tests to fetch per request (must be> 0)- Returns:
- an
Iterablethat walks every test in the account
-
iterateTests
public java.lang.Iterable<TestingbotTest> iterateTests(int pageSize, java.util.Map<java.lang.String,java.lang.String> filters)
Lazily iterates over all tests matching the given filters, paging behind the scenes.- Parameters:
pageSize- the number of tests to fetch per request (must be> 0)filters- optional server-side filters (may be null)- Returns:
- an
Iterablethat walks every matching test
-
createTest
public boolean createTest(java.util.Map<java.lang.String,java.lang.Object> testFields)
Creates a new test on TestingBot. See https://testingbot.com/support/apiThe fields are sent as Rails-style
test[key]parameters. Common keys:name,success,status_message,build,extra.- Parameters:
testFields- the test fields to set- Returns:
- boolean success
- Since:
- 1.1.0
-
getDevices
public java.util.List<TestingbotDevice> getDevices(java.lang.String platform, java.lang.Boolean web)
Retrieves Real Mobile Devices on TestingBot, filtered by platform.- Parameters:
platform- one of Android, iOS, REAL_ANDROID, REAL_IOS (may be null)web- when non-null, filters on web-testing capable devices- Returns:
- List containing TestingbotDevice objects.
-
getAvailableDevices
public java.util.List<TestingbotDevice> getAvailableDevices()
Retrieves the currently available Real Mobile Devices on TestingBot.- Returns:
- List containing TestingbotDevice objects.
-
getTunnel
public TestingbotTunnel getTunnel()
Gets the currently active tunnel for your account.- Returns:
- TestingbotTunnel
-
getTunnel
public TestingbotTunnel getTunnel(int tunnelId)
Gets a specific tunnel by its id.- Parameters:
tunnelId- the id of the tunnel- Returns:
- TestingbotTunnel
-
createTunnel
public TestingbotTunnel createTunnel()
Creates (boots) a new tunnel.- Returns:
- TestingbotTunnel
-
deleteTunnel
public boolean deleteTunnel()
Stops the currently active tunnel for your account.- Returns:
- boolean success
-
isTunnelAlive
public boolean isTunnelAlive()
Checks whether the tunnel is alive.- Returns:
- boolean alive
-
getJob
public TestingbotJob getJob(java.lang.String jobId)
Gets the status of a job (e.g. a Codeless test run).- Parameters:
jobId- the id of the job- Returns:
- TestingbotJob
-
getUserKeys
public com.google.gson.JsonElement getUserKeys()
Retrieves your API key and secret.- Returns:
- the raw JSON response
-
getIpRanges
public com.google.gson.JsonElement getIpRanges()
Retrieves the TestingBot IP ranges for firewall whitelisting.- Returns:
- the raw JSON response
-
getTeam
public TestingbotTeam getTeam()
Gets your team's concurrency information.- Returns:
- TestingbotTeam
-
getTeamMembers
public TestingbotTeamMemberCollection getTeamMembers()
Lists the users in your team.- Returns:
- TestingbotTeamMemberCollection
-
createTeamMember
public TestingbotTeamMember createTeamMember(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new user in your team.Required keys:
email,password. Optional keys:first_name,last_name,concurrency(max parallel VM sessions),concurrencyPhysical(max parallel physical-device sessions).- Parameters:
params- the new user's attributes- Returns:
- TestingbotTeamMember
- Since:
- 1.1.0
-
getTeamMember
public TestingbotTeamMember getTeamMember(int userId)
Gets a specific team user.- Parameters:
userId- the id of the team user- Returns:
- TestingbotTeamMember
-
updateTeamMember
public TestingbotTeamMember updateTeamMember(int userId, java.util.Map<java.lang.String,java.lang.Object> params)
Updates a team user.- Parameters:
userId- the id of the team userparams- the attributes to update- Returns:
- TestingbotTeamMember
-
getTeamMemberClientKey
public com.google.gson.JsonElement getTeamMemberClientKey(int userId)
Gets the client key of a team user.- Parameters:
userId- the id of the team user- Returns:
- the raw JSON response
-
resetTeamMemberKeys
public TestingbotTeamCredentialReset resetTeamMemberKeys(int userId)
Resets the API keys of a team user.- Parameters:
userId- the id of the team user- Returns:
- TestingbotTeamCredentialReset
-
getScreenshots
public TestingbotScreenshotCollection getScreenshots()
Lists your screenshot batches.- Returns:
- TestingbotScreenshotCollection
-
createScreenshots
public TestingbotScreenshot createScreenshots(java.util.Map<java.lang.String,java.lang.Object> params)
Captures a new screenshot batch.Required keys:
url(page URL),resolution(e.g."1920x1080"),browsers(aList<String>; each entry is abrowser_idor a"browser version os"triple). Optional keys:wait_time(seconds to wait after page load),fullpage(capture the entire scrollable page),callback_url(POST callback when the batch completes).- Parameters:
params- the screenshot batch parameters- Returns:
- TestingbotScreenshot
- Since:
- 1.1.0
-
getScreenshot
public TestingbotScreenshot getScreenshot(int screenshotId)
Gets a specific screenshot batch.- Parameters:
screenshotId- the id of the screenshot batch- Returns:
- TestingbotScreenshot
-
updateManualSession
public boolean updateManualSession(int sessionId, java.util.Map<java.lang.String,java.lang.Object> fields)Updates a manual session.Fields are sent as Rails-style
manual_session[key]parameters. Keys:name,success(boolean),status_message.- Parameters:
sessionId- the numeric manual-session idfields- the fields to update- Returns:
- boolean success
- Since:
- 1.1.0
-
pingManualSession
public boolean pingManualSession(java.util.List<java.lang.Integer> sessionIds)
Sends a keepalive ping for the given manual sessions.- Parameters:
sessionIds- the numeric ids of the manual sessions to ping- Returns:
- boolean success
-
getLabTests
public TestingbotLabTestCollection getLabTests()
Lists your Codeless tests.- Returns:
- TestingbotLabTestCollection
-
createLabTest
public TestingbotLabCreateAck createLabTest(java.util.Map<java.lang.String,java.lang.Object> testFields)
Creates a new Codeless test.The fields are sent as Rails-style
test[key]parameters. Keys:name,url(target URL, required unless a file is uploaded),cron(cron expression for scheduled runs),screenshot(boolean — take screenshots every step),video(boolean),idletimeout(seconds),screenresolution(e.g."1920x1080"),ai_prompt(instruction for the AI test agent).- Parameters:
testFields- the test attributes- Returns:
- TestingbotLabCreateAck (includes
lab_test_id) - Since:
- 1.1.0
-
getLabTest
public TestingbotLabTest getLabTest(int labTestId)
Gets a specific Codeless test.- Parameters:
labTestId- the id of the Codeless test- Returns:
- TestingbotLabTest
-
updateLabTest
public boolean updateLabTest(int labTestId, java.util.Map<java.lang.String,java.lang.Object> testFields)Updates a Codeless test.- Parameters:
labTestId- the id of the Codeless testtestFields- the attributes to update (sent astest[...])- Returns:
- boolean success
-
deleteLabTest
public boolean deleteLabTest(int labTestId)
Deletes a Codeless test.- Parameters:
labTestId- the id of the Codeless test- Returns:
- boolean success
-
getLabTestSteps
public TestingbotLabTestStepCollection getLabTestSteps(int labTestId)
Gets the steps of a Codeless test.- Parameters:
labTestId- the id of the Codeless test- Returns:
- TestingbotLabTestStepCollection
-
setLabTestSteps
public boolean setLabTestSteps(int labTestId, java.util.List<java.lang.String> steps)Replaces the steps of a Codeless test.- Parameters:
labTestId- the id of the Codeless teststeps- the ordered list of steps- Returns:
- boolean success
-
getLabTestBrowsers
public java.util.List<TestingbotBrowser> getLabTestBrowsers(int labTestId)
Gets the browsers configured for a Codeless test.- Parameters:
labTestId- the id of the Codeless test- Returns:
- List containing TestingbotBrowser objects.
-
setLabTestBrowsers
public boolean setLabTestBrowsers(int labTestId, java.lang.String browserIds)Updates the browsers a Codeless test runs on.- Parameters:
labTestId- the id of the Codeless testbrowserIds- comma-separated list of browser_ids- Returns:
- boolean success
-
triggerLabTest
public TestingbotLabRunAck triggerLabTest(int labTestId)
Runs a Codeless test.- Parameters:
labTestId- the id of the Codeless test- Returns:
- TestingbotLabRunAck
-
stopLabTest
public boolean stopLabTest(int labTestId)
Stops a running Codeless test.- Parameters:
labTestId- the id of the Codeless test- Returns:
- boolean success
-
addLabTestAlert
public boolean addLabTestAlert(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Adds an alert to a Codeless test.Required keys:
kind— one of"EMAIL","API","SMS".level—"IMMEDIATELY"or"DAILY".content— destination (email address, callback URL, or phone number).
- Parameters:
labTestId- the id of the Codeless testparams- the alert parameters- Returns:
- boolean success
- Since:
- 1.1.0
-
updateLabTestAlert
public boolean updateLabTestAlert(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Updates the alert of a Codeless test.- Parameters:
labTestId- the id of the Codeless testparams- the alert parameters- Returns:
- boolean success
-
createLabTestReport
public boolean createLabTestReport(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Creates a report for a Codeless test.- Parameters:
labTestId- the id of the Codeless testparams- the report parameters- Returns:
- boolean success
-
updateLabTestReport
public boolean updateLabTestReport(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Updates a report for a Codeless test.- Parameters:
labTestId- the id of the Codeless testparams- the report parameters- Returns:
- boolean success
-
scheduleLabTest
public boolean scheduleLabTest(int labTestId, java.util.Map<java.lang.String,java.lang.Object> params)Sets or updates the schedule of a Codeless test.Keys:
type— preset:"once","daily","weekly", or"custom"(usecronFormat).day— date (YYYY-MM-DD) foronce, or weekday forweekly.hour— time (HH:MM) foronce,daily, orweekly.cronFormat— raw 5-field cron expression (used whentype=custom).
- Parameters:
labTestId- the id of the Codeless testparams- the schedule parameters- Returns:
- boolean success
- Since:
- 1.1.0
-
triggerAllLabTests
public TestingbotLabRunAck triggerAllLabTests()
Runs all Codeless tests.- Returns:
- TestingbotLabRunAck
-
getLabSuites
public TestingbotLabSuiteCollection getLabSuites()
Lists your Codeless test suites.- Returns:
- TestingbotLabSuiteCollection
-
createLabSuite
public TestingbotLabSuiteCreateAck createLabSuite(java.util.Map<java.lang.String,java.lang.Object> suiteFields)
Creates a new Codeless test suite.The fields are sent as Rails-style
suite[key]parameters. Required key:name. Optional keys:cron,screenshot(boolean),video(boolean),idletimeout(seconds),screenresolution(e.g."1920x1080").- Parameters:
suiteFields- the suite attributes- Returns:
- TestingbotLabSuiteCreateAck (includes
suite_id) - Since:
- 1.1.0
-
getLabSuite
public TestingbotLabSuite getLabSuite(int suiteId)
Gets a specific Codeless test suite.- Parameters:
suiteId- the id of the suite- Returns:
- TestingbotLabSuite
-
deleteLabSuite
public boolean deleteLabSuite(int suiteId)
Deletes a Codeless test suite.- Parameters:
suiteId- the id of the suite- Returns:
- boolean success
-
getLabSuiteTests
public TestingbotLabTestCollection getLabSuiteTests(int suiteId)
Gets the tests in a Codeless suite.- Parameters:
suiteId- the id of the suite- Returns:
- TestingbotLabTestCollection
-
addLabSuiteTests
public boolean addLabSuiteTests(int suiteId, java.lang.String testIds)Adds tests to a Codeless suite.- Parameters:
suiteId- the id of the suitetestIds- comma-separated list of Codeless test ids- Returns:
- boolean success
-
removeLabSuiteTest
public boolean removeLabSuiteTest(int suiteId, int testId)Removes a test from a Codeless suite.- Parameters:
suiteId- the id of the suitetestId- the id of the test to remove- Returns:
- boolean success
-
getLabSuiteBrowsers
public java.util.List<TestingbotBrowser> getLabSuiteBrowsers(int suiteId)
Gets the browsers configured for a Codeless suite.- Parameters:
suiteId- the id of the suite- Returns:
- List containing TestingbotBrowser objects.
-
setLabSuiteBrowsers
public boolean setLabSuiteBrowsers(int suiteId, java.lang.String browserIds)Updates the browsers a Codeless suite runs on.- Parameters:
suiteId- the id of the suitebrowserIds- comma-separated list of browser_ids- Returns:
- boolean success
-
triggerLabSuite
public TestingbotLabRunAck triggerLabSuite(int suiteId)
Runs a Codeless suite.- Parameters:
suiteId- the id of the suite- Returns:
- TestingbotLabRunAck
-
getAuthenticationHash
public java.lang.String getAuthenticationHash(java.lang.String identifier)
Calculates the authentication hash for a specific identifier (sessionId/build-identifier) https://testingbot.com/support/other/sharing- Parameters:
identifier- the sessionId or buildIdentifier- Returns:
- String hash
-
getAuthenticationHash
public java.lang.String getAuthenticationHash()
Calculates the authentication hash for the current user https://testingbot.com/support/other/sharing- Returns:
- String hash
-
-