AWS Device Farm

2019/12/20 - AWS Device Farm - 10 new api methods

Changes  Introduced browser testing support through AWS Device Farm

GetTestGridProject (new) Link ¶

Retrieves information about a Selenium testing project.

See also: AWS API Documentation

Request Syntax

client.get_test_grid_project(
    projectArn='string'
)
type projectArn

string

param projectArn

[REQUIRED]

The ARN of the Selenium testing project, from either CreateTestGridProject or ListTestGridProjects.

rtype

dict

returns

Response Syntax

{
    'testGridProject': {
        'arn': 'string',
        'name': 'string',
        'description': 'string',
        'created': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • testGridProject (dict) --

      A TestGridProject.

      • arn (string) --

        The ARN for the project.

      • name (string) --

        A human-readable name for the project.

      • description (string) --

        A human-readable description for the project.

      • created (datetime) --

        When the project was created.

DeleteTestGridProject (new) Link ¶

Deletes a Selenium testing project and all content generated under it.

Warning

You cannot undo this operation.

Note

You cannot delete a project if it has active sessions.

See also: AWS API Documentation

Request Syntax

client.delete_test_grid_project(
    projectArn='string'
)
type projectArn

string

param projectArn

[REQUIRED]

The ARN of the project to delete, from CreateTestGridProject or ListTestGridProjects.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListTestGridProjects (new) Link ¶

Gets a list of all Selenium testing projects in your account.

See also: AWS API Documentation

Request Syntax

client.list_test_grid_projects(
    maxResult=123,
    nextToken='string'
)
type maxResult

integer

param maxResult

Return no more than this number of results.

type nextToken

string

param nextToken

From a response, used to continue a paginated listing.

rtype

dict

returns

Response Syntax

{
    'testGridProjects': [
        {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'created': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • testGridProjects (list) --

      The list of TestGridProjects, based on a ListTestGridProjectsRequest.

      • (dict) --

        A Selenium testing project. Projects are used to collect and collate sessions.

        • arn (string) --

          The ARN for the project.

        • name (string) --

          A human-readable name for the project.

        • description (string) --

          A human-readable description for the project.

        • created (datetime) --

          When the project was created.

    • nextToken (string) --

      Used for pagination. Pass into ListTestGridProjects to get more results in a paginated request.

CreateTestGridUrl (new) Link ¶

Creates a signed, short-term URL that can be passed to a Selenium RemoteWebDriver constructor.

See also: AWS API Documentation

Request Syntax

client.create_test_grid_url(
    projectArn='string',
    expiresInSeconds=123
)
type projectArn

string

param projectArn

[REQUIRED]

ARN (from CreateTestGridProject or ListTestGridProjects ) to associate with the short-term URL.

type expiresInSeconds

integer

param expiresInSeconds

[REQUIRED]

Lifetime, in seconds, of the URL.

rtype

dict

returns

Response Syntax

{
    'url': 'string',
    'expires': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • url (string) --

      A signed URL, expiring in CreateTestGridUrlRequest$expiresInSeconds seconds, to be passed to a RemoteWebDriver .

    • expires (datetime) --

      The number of seconds the URL from CreateTestGridUrlResult$url stays active.

ListTestGridSessionActions (new) Link ¶

Returns a list of the actions taken in a TestGridSession.

See also: AWS API Documentation

Request Syntax

client.list_test_grid_session_actions(
    sessionArn='string',
    maxResult=123,
    nextToken='string'
)
type sessionArn

string

param sessionArn

[REQUIRED]

The ARN of the session to retrieve.

type maxResult

integer

param maxResult

The maximum number of sessions to return per response.

type nextToken

string

param nextToken

Pagination token.

rtype

dict

returns

Response Syntax

{
    'actions': [
        {
            'action': 'string',
            'started': datetime(2015, 1, 1),
            'duration': 123,
            'statusCode': 'string',
            'requestMethod': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • actions (list) --

      The action taken by the session.

      • (dict) --

        An action taken by a TestGridSession browser instance.

        • action (string) --

          The action taken by the session.

        • started (datetime) --

          The time that the session invoked the action.

        • duration (integer) --

          The time, in milliseconds, that the action took to complete in the browser.

        • statusCode (string) --

          HTTP status code returned to the browser when the action was taken.

        • requestMethod (string) --

          HTTP method that the browser used to make the request.

    • nextToken (string) --

      Pagination token.

CreateTestGridProject (new) Link ¶

Creates a Selenium testing project. Projects are used to track TestGridSession instances.

See also: AWS API Documentation

Request Syntax

client.create_test_grid_project(
    name='string',
    description='string'
)
type name

string

param name

[REQUIRED]

Human-readable name of the Selenium testing project.

type description

string

param description

Human-readable description of the project.

rtype

dict

returns

Response Syntax

{
    'testGridProject': {
        'arn': 'string',
        'name': 'string',
        'description': 'string',
        'created': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • testGridProject (dict) --

      ARN of the Selenium testing project that was created.

      • arn (string) --

        The ARN for the project.

      • name (string) --

        A human-readable name for the project.

      • description (string) --

        A human-readable description for the project.

      • created (datetime) --

        When the project was created.

UpdateTestGridProject (new) Link ¶

Change details of a project.

See also: AWS API Documentation

Request Syntax

client.update_test_grid_project(
    projectArn='string',
    name='string',
    description='string'
)
type projectArn

string

param projectArn

[REQUIRED]

ARN of the project to update.

type name

string

param name

Human-readable name for the project.

type description

string

param description

Human-readable description for the project.

rtype

dict

returns

Response Syntax

{
    'testGridProject': {
        'arn': 'string',
        'name': 'string',
        'description': 'string',
        'created': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • testGridProject (dict) --

      The project, including updated information.

      • arn (string) --

        The ARN for the project.

      • name (string) --

        A human-readable name for the project.

      • description (string) --

        A human-readable description for the project.

      • created (datetime) --

        When the project was created.

ListTestGridSessionArtifacts (new) Link ¶

Retrieves a list of artifacts created during the session.

See also: AWS API Documentation

Request Syntax

client.list_test_grid_session_artifacts(
    sessionArn='string',
    type='VIDEO'|'LOG',
    maxResult=123,
    nextToken='string'
)
type sessionArn

string

param sessionArn

[REQUIRED]

The ARN of a TestGridSession.

type type

string

param type

Limit results to a specified type of artifact.

type maxResult

integer

param maxResult

The maximum number of results to be returned by a request.

type nextToken

string

param nextToken

Pagination token.

rtype

dict

returns

Response Syntax

{
    'artifacts': [
        {
            'filename': 'string',
            'type': 'UNKNOWN'|'VIDEO'|'SELENIUM_LOG',
            'url': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • artifacts (list) --

      A list of test grid session artifacts for a TestGridSession.

      • (dict) --

        Artifacts are video and other files that are produced in the process of running a browser in an automated context.

        Note

        Video elements might be broken up into multiple artifacts as they grow in size during creation.

        • filename (string) --

          The file name of the artifact.

        • type (string) --

          The kind of artifact.

        • url (string) --

          A semi-stable URL to the content of the object.

    • nextToken (string) --

      Pagination token.

GetTestGridSession (new) Link ¶

A session is an instance of a browser created through a RemoteWebDriver with the URL from CreateTestGridUrlResult$url. You can use the following to look up sessions:

  • The session ARN ( GetTestGridSessionRequest$sessionArn ).

  • The project ARN and a session ID ( GetTestGridSessionRequest$projectArn and GetTestGridSessionRequest$sessionId ).

See also: AWS API Documentation

Request Syntax

client.get_test_grid_session(
    projectArn='string',
    sessionId='string',
    sessionArn='string'
)
type projectArn

string

param projectArn

The ARN for the project that this session belongs to. See CreateTestGridProject and ListTestGridProjects.

type sessionId

string

param sessionId

An ID associated with this session.

type sessionArn

string

param sessionArn

An ARN that uniquely identifies a TestGridSession.

rtype

dict

returns

Response Syntax

{
    'testGridSession': {
        'arn': 'string',
        'status': 'ACTIVE'|'CLOSED'|'ERRORED',
        'created': datetime(2015, 1, 1),
        'ended': datetime(2015, 1, 1),
        'billingMinutes': 123.0,
        'seleniumProperties': 'string'
    }
}

Response Structure

  • (dict) --

    • testGridSession (dict) --

      The TestGridSession that was requested.

      • arn (string) --

        The ARN of the session.

      • status (string) --

        The state of the session.

      • created (datetime) --

        The time that the session was started.

      • ended (datetime) --

        The time the session ended.

      • billingMinutes (float) --

        The number of billed minutes that were used for this session.

      • seleniumProperties (string) --

        A JSON object of options and parameters passed to the Selenium WebDriver.

ListTestGridSessions (new) Link ¶

Retrieves a list of sessions for a TestGridProject.

See also: AWS API Documentation

Request Syntax

client.list_test_grid_sessions(
    projectArn='string',
    status='ACTIVE'|'CLOSED'|'ERRORED',
    creationTimeAfter=datetime(2015, 1, 1),
    creationTimeBefore=datetime(2015, 1, 1),
    endTimeAfter=datetime(2015, 1, 1),
    endTimeBefore=datetime(2015, 1, 1),
    maxResult=123,
    nextToken='string'
)
type projectArn

string

param projectArn

[REQUIRED]

ARN of a TestGridProject.

type status

string

param status

Return only sessions in this state.

type creationTimeAfter

datetime

param creationTimeAfter

Return only sessions created after this time.

type creationTimeBefore

datetime

param creationTimeBefore

Return only sessions created before this time.

type endTimeAfter

datetime

param endTimeAfter

Return only sessions that ended after this time.

type endTimeBefore

datetime

param endTimeBefore

Return only sessions that ended before this time.

type maxResult

integer

param maxResult

Return only this many results at a time.

type nextToken

string

param nextToken

Pagination token.

rtype

dict

returns

Response Syntax

{
    'testGridSessions': [
        {
            'arn': 'string',
            'status': 'ACTIVE'|'CLOSED'|'ERRORED',
            'created': datetime(2015, 1, 1),
            'ended': datetime(2015, 1, 1),
            'billingMinutes': 123.0,
            'seleniumProperties': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • testGridSessions (list) --

      The sessions that match the criteria in a ListTestGridSessionsRequest.

      • (dict) --

        A TestGridSession is a single instance of a browser launched from the URL provided by a call to CreateTestGridUrl.

        • arn (string) --

          The ARN of the session.

        • status (string) --

          The state of the session.

        • created (datetime) --

          The time that the session was started.

        • ended (datetime) --

          The time the session ended.

        • billingMinutes (float) --

          The number of billed minutes that were used for this session.

        • seleniumProperties (string) --

          A JSON object of options and parameters passed to the Selenium WebDriver.

    • nextToken (string) --

      Pagination token.