public final class AutomateClient extends BrowserStackClient implements Automate
BrowserStackClient.Method, BrowserStackClient.ProductAutomate.BuildStatus, Automate.SessionStatuscacheMap| Constructor and Description |
|---|
AutomateClient(String username,
String accessKey)
Construct an instance of
AutomateClient with your BrowserStack account credentials. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteBuild(String buildId)
Delete the build identified by the build identifier.
|
boolean |
deleteProject(int projectId)
Deletes the project identified by the specified project identifier.
|
boolean |
deleteSession(String sessionId)
Deletes the session identified by the supplied identifier.
|
AccountUsage |
getAccountUsage()
Returns details for the BrowserStack Automate plan.
|
List<Browser> |
getBrowsers()
Returns a (cached) list of Desktop and Mobile browsers offered for Automate.
|
List<Browser> |
getBrowsers(boolean cache)
Returns a (cached) list of Desktop and Mobile browsers offered for Automate.
|
Build |
getBuild(String buildId)
Gets the build identified by the build identifier.
|
Build |
getBuildByName(String buildName)
Gets the build identified by the build name.
|
List<Build> |
getBuilds()
Gets the list of builds.
|
List<Build> |
getBuilds(Automate.BuildStatus status)
Gets the list of builds.
|
List<Build> |
getBuilds(Automate.BuildStatus status,
int limit)
Gets the list of builds.
|
List<Build> |
getBuilds(int limit)
Gets the list of builds.
|
Project |
getProject(int projectId)
Gets the project identified by its identifier.
|
List<Project> |
getProjects()
Gets a list of projects
|
Session |
getSession(String sessionId)
Gets the session associated with the specified identifier.
|
String |
getSessionLogs(Session session)
Fetches the text logs for a session.
|
String |
getSessionLogs(String sessionId)
Fetches the text logs for a session.
|
List<Session> |
getSessions(String buildId)
Retrieves the list of sessions existing under a specific build.
|
List<Session> |
getSessions(String buildId,
Automate.BuildStatus status)
Retrieves the list of sessions existing under a specific build.
|
List<Session> |
getSessions(String buildId,
Automate.BuildStatus status,
int limit)
Retrieves the list of sessions existing under a specific build.
|
List<Session> |
getSessions(String buildId,
int limit)
Retrieves the list of sessions existing under a specific build.
|
String |
getSessionVideo(String sessionId)
Returns the link for the session video.
|
String |
recycleKey()
Destroys the current access key and returns a new access key.
|
Session |
updateSessionStatus(String sessionId,
Automate.SessionStatus sessionStatus)
Updates the status for a session.
|
Session |
updateSessionStatus(String sessionId,
Automate.SessionStatus sessionStatus,
String reason)
Updates the status for a session.
|
Session |
updateSessionStatus(String sessionId,
Map<String,Object> data)
Updates the status for a session.
|
getAccessKey, getBrowsersForProduct, getBrowsersForProduct, getBuilds, newRequest, newRequest, newRequest, newRequest, setAccessKey, setProxy, signRequestpublic AutomateClient(String username, String accessKey)
AutomateClient with your BrowserStack account credentials.
Go here to get them.username - Username for your BrowserStack Automate account.accessKey - Access Key for your BrowserStack Automate account.public final AccountUsage getAccountUsage() throws AutomateException
getAccountUsage in interface AutomateAccountUsage containing subscription details.AutomateExceptionpublic final List<Browser> getBrowsers() throws AutomateException
getBrowsers in interface AutomateBrowser objectsAutomateExceptionpublic final List<Browser> getBrowsers(boolean cache) throws AutomateException
getBrowsers in interface Automatecache - Enable (true) or disable (false) returning of cached responses.Browser objectsAutomateExceptionpublic final List<Project> getProjects() throws AutomateException
Projects are organizational structures for builds.
getProjects in interface AutomateProject objectsAutomateExceptionpublic final Project getProject(int projectId) throws ProjectNotFound, AutomateException
getProject in interface AutomateprojectId - id for the project to be retrieved.Project objectsProjectNotFoundAutomateExceptionpublic final boolean deleteProject(int projectId)
throws AutomateException
deleteProject in interface AutomateprojectId - id for the project to be deleted.AutomateExceptionpublic final List<Build> getBuilds(Automate.BuildStatus status, int limit) throws AutomateException
A build is an organizational structure for tests.
getBuilds in interface BrowserStackClientInterfacegetBuilds in class BrowserStackClientstatus - Return only builds that match the specified build status.limit - Limit results to the specified count.Build objects.AutomateExceptionpublic final List<Build> getBuilds() throws AutomateException
A build is an organizational structure for tests.
getBuilds in interface BrowserStackClientInterfacegetBuilds in class BrowserStackClientBuild objects.AutomateExceptionpublic final List<Build> getBuilds(int limit) throws AutomateException
A build is an organizational structure for tests.
getBuilds in interface BrowserStackClientInterfacegetBuilds in class BrowserStackClientlimit - Limit results to the specified count.Build objects.AutomateExceptionpublic final List<Build> getBuilds(Automate.BuildStatus status) throws AutomateException
A build is an organizational structure for tests.
getBuilds in interface BrowserStackClientInterfacegetBuilds in class BrowserStackClientstatus - Include only builds that match the specified build status.Build objects.AutomateExceptionpublic final Build getBuild(String buildId) throws BuildNotFound, AutomateException
getBuild in interface BrowserStackClientInterfacegetBuild in class BrowserStackClientbuildId - ID that uniquely identifies a build.Build objects.BuildNotFoundAutomateExceptionpublic final Build getBuildByName(@Nonnull String buildName) throws BuildNotFound, AutomateException
getBuildByName in interface BrowserStackClientInterfacegetBuildByName in class BrowserStackClientbuildName - - Name of the build to search withBuild object.BuildNotFoundAutomateExceptionpublic final boolean deleteBuild(String buildId) throws AutomateException
deleteBuild in interface BrowserStackClientInterfacedeleteBuild in class BrowserStackClientbuildId - ID that uniquely identifies a build.AutomateExceptionpublic final List<Session> getSessions(String buildId, Automate.BuildStatus status, int limit) throws BuildNotFound, AutomateException
getSessions in interface BrowserStackClientInterfacegetSessions in class BrowserStackClientbuildId - ID that uniquely identifies a build.status - Include only builds that match the specified build status.limit - Limit results to the specified count.Session objects containing test session information.BuildNotFoundAutomateExceptionpublic final List<Session> getSessions(String buildId) throws BuildNotFound, AutomateException
getSessions in interface BrowserStackClientInterfacegetSessions in class BrowserStackClientbuildId - ID that uniquely identifies a build.Session objects containing test session information.BuildNotFoundAutomateExceptionpublic final List<Session> getSessions(String buildId, int limit) throws BuildNotFound, AutomateException
getSessions in interface BrowserStackClientInterfacegetSessions in class BrowserStackClientbuildId - ID that uniquely identifies a build.limit - Limit results to the specified count.Session objects containing test session information.BuildNotFoundAutomateExceptionpublic final List<Session> getSessions(String buildId, Automate.BuildStatus status) throws BuildNotFound, AutomateException
getSessions in interface BrowserStackClientInterfacegetSessions in class BrowserStackClientbuildId - ID that uniquely identifies a build.status - Include only builds that match the specified build status.Session objects containing test session information.BuildNotFoundAutomateExceptionpublic final Session getSession(String sessionId) throws SessionNotFound, AutomateException
getSession in interface BrowserStackClientInterfacegetSession in class BrowserStackClientsessionId - ID that uniquely identifies a session.Session objects containing test session information.AutomateExceptionSessionNotFoundpublic final Session updateSessionStatus(String sessionId, Map<String,Object> data) throws AutomateException
updateSessionStatus in interface AutomatesessionId - ID that uniquely identifies a session.data - Key-Value pairs containing session update information.Session object.AutomateExceptionpublic final Session updateSessionStatus(String sessionId, Automate.SessionStatus sessionStatus, String reason) throws SessionNotFound, AutomateException
updateSessionStatus in interface AutomatesessionId - ID that uniquely identifies a session.sessionStatus - State with which the session should be marked (Error, Done).reason - Message containing reason for marking session with new status.Session object.SessionNotFoundAutomateExceptionpublic final Session updateSessionStatus(String sessionId, Automate.SessionStatus sessionStatus) throws SessionNotFound, AutomateException
updateSessionStatus in interface AutomatesessionId - ID that uniquely identifies a session.sessionStatus - State with which the session should be marked (Error, Done).Session object.SessionNotFoundAutomateExceptionpublic final String getSessionLogs(String sessionId) throws SessionNotFound, AutomateException
getSessionLogs in interface AutomatesessionId - ID that uniquely identifies a session.SessionNotFoundAutomateExceptionpublic final String getSessionLogs(Session session) throws AutomateException
getSessionLogs in interface Automatesession - Session for which to retrieve logs.AutomateExceptionpublic final String getSessionVideo(String sessionId) throws SessionNotFound, AutomateException
getSessionVideo in interface AutomatesessionId - ID that uniquely identifies a session.SessionNotFoundAutomateExceptionpublic final boolean deleteSession(String sessionId) throws SessionNotFound, AutomateException
deleteSession in interface AutomatesessionId - ID that uniquely identifies a session.SessionNotFoundAutomateExceptionpublic final String recycleKey() throws AutomateException
Note that all uses of the current key will need to be updated.
recycleKey in interface AutomateAutomateExceptionCopyright © 2021. All rights reserved.