AWS IoT Core Device Advisor

2021/11/23 - AWS IoT Core Device Advisor - 1 new2 updated api methods

Changes  This release introduces a new feature for Device Advisor: ability to execute multiple test suites in parallel for given customer account. You can use GetEndpoint API to get the device-level test endpoint and call StartSuiteRun with "parallelRun=true" to run suites in parallel.

GetEndpoint (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.get_endpoint(
    thingArn='string',
    certificateArn='string'
)
type thingArn:

string

param thingArn:

type certificateArn:

string

param certificateArn:

rtype:

dict

returns:

Response Syntax

{
    'endpoint': 'string'
}

Response Structure

  • (dict) --

    • endpoint (string) --

GetSuiteRun (updated) Link ¶
Changes (response)
{'suiteRunConfiguration': {'parallelRun': 'boolean'}}

Gets information about a Device Advisor test suite run.

Requires permission to access the GetSuiteRun action.

See also: AWS API Documentation

Request Syntax

client.get_suite_run(
    suiteDefinitionId='string',
    suiteRunId='string'
)
type suiteDefinitionId:

string

param suiteDefinitionId:

[REQUIRED]

Suite definition ID for the test suite run.

type suiteRunId:

string

param suiteRunId:

[REQUIRED]

Suite run ID for the test suite run.

rtype:

dict

returns:

Response Syntax

{
    'suiteDefinitionId': 'string',
    'suiteDefinitionVersion': 'string',
    'suiteRunId': 'string',
    'suiteRunArn': 'string',
    'suiteRunConfiguration': {
        'primaryDevice': {
            'thingArn': 'string',
            'certificateArn': 'string'
        },
        'selectedTestList': [
            'string',
        ],
        'parallelRun': True|False
    },
    'testResult': {
        'groups': [
            {
                'groupId': 'string',
                'groupName': 'string',
                'tests': [
                    {
                        'testCaseRunId': 'string',
                        'testCaseDefinitionId': 'string',
                        'testCaseDefinitionName': 'string',
                        'status': 'PASS'|'FAIL'|'CANCELED'|'PENDING'|'RUNNING'|'STOPPING'|'STOPPED'|'PASS_WITH_WARNINGS'|'ERROR',
                        'startTime': datetime(2015, 1, 1),
                        'endTime': datetime(2015, 1, 1),
                        'logUrl': 'string',
                        'warnings': 'string',
                        'failure': 'string'
                    },
                ]
            },
        ]
    },
    'startTime': datetime(2015, 1, 1),
    'endTime': datetime(2015, 1, 1),
    'status': 'PASS'|'FAIL'|'CANCELED'|'PENDING'|'RUNNING'|'STOPPING'|'STOPPED'|'PASS_WITH_WARNINGS'|'ERROR',
    'errorReason': 'string',
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • suiteDefinitionId (string) --

      Suite definition ID for the test suite run.

    • suiteDefinitionVersion (string) --

      Suite definition version for the test suite run.

    • suiteRunId (string) --

      Suite run ID for the test suite run.

    • suiteRunArn (string) --

      The ARN of the suite run.

    • suiteRunConfiguration (dict) --

      Suite run configuration for the test suite run.

      • primaryDevice (dict) --

        Gets the primary device for suite run.

        • thingArn (string) --

          Lists devices thing ARN.

        • certificateArn (string) --

          Lists devices certificate ARN.

      • selectedTestList (list) --

        Gets test case list.

        • (string) --

      • parallelRun (boolean) --

    • testResult (dict) --

      Test results for the test suite run.

      • groups (list) --

        Show each group of test results.

        • (dict) --

          Show Group Result.

          • groupId (string) --

            Group result ID.

          • groupName (string) --

            Group Result Name.

          • tests (list) --

            Tests under Group Result.

            • (dict) --

              Provides test case run.

              • testCaseRunId (string) --

                Provides test case run ID.

              • testCaseDefinitionId (string) --

                Provides test case run definition ID.

              • testCaseDefinitionName (string) --

                Provides test case run definition Name.

              • status (string) --

                Provides test case run status.

                • PASS: Test passed.

                • FAIL: Test failed.

                • PENDING: Test has not started running but is scheduled.

                • RUNNING: Test is running

                • STOPPING: Test is performing cleanup steps. You will see this status only if you stop a suite run.

                • STOPPED Test is stopped. You will see this status only if you stop a suite run.

                • PASS_WITH_WARNINGS: Test passed with warnings.

                • ERORR: Test faced an error when running due to an internal issue.

              • startTime (datetime) --

                Provides test case run start time.

              • endTime (datetime) --

                Provides test case run end time.

              • logUrl (string) --

                Provides test case run log Url.

              • warnings (string) --

                Provides test case run warnings.

              • failure (string) --

                Provides test case run failure result.

    • startTime (datetime) --

      Date (in Unix epoch time) when the test suite run was started.

    • endTime (datetime) --

      Date (in Unix epoch time) when the test suite run ended.

    • status (string) --

      Status for the test suite run.

    • errorReason (string) --

      Error reason for any test suite run failure.

    • tags (dict) --

      The tags attached to the suite run.

      • (string) --

        • (string) --

StartSuiteRun (updated) Link ¶
Changes (request)
{'suiteRunConfiguration': {'parallelRun': 'boolean'}}

Starts a Device Advisor test suite run.

Requires permission to access the StartSuiteRun action.

See also: AWS API Documentation

Request Syntax

client.start_suite_run(
    suiteDefinitionId='string',
    suiteDefinitionVersion='string',
    suiteRunConfiguration={
        'primaryDevice': {
            'thingArn': 'string',
            'certificateArn': 'string'
        },
        'selectedTestList': [
            'string',
        ],
        'parallelRun': True|False
    },
    tags={
        'string': 'string'
    }
)
type suiteDefinitionId:

string

param suiteDefinitionId:

[REQUIRED]

Suite definition ID of the test suite.

type suiteDefinitionVersion:

string

param suiteDefinitionVersion:

Suite definition version of the test suite.

type suiteRunConfiguration:

dict

param suiteRunConfiguration:

Suite run configuration.

  • primaryDevice (dict) --

    Gets the primary device for suite run.

    • thingArn (string) --

      Lists devices thing ARN.

    • certificateArn (string) --

      Lists devices certificate ARN.

  • selectedTestList (list) --

    Gets test case list.

    • (string) --

  • parallelRun (boolean) --

type tags:

dict

param tags:

The tags to be attached to the suite run.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'suiteRunId': 'string',
    'suiteRunArn': 'string',
    'createdAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • suiteRunId (string) --

      Suite Run ID of the started suite run.

    • suiteRunArn (string) --

      Amazon Resource Name (ARN) of the started suite run.

    • createdAt (datetime) --

      Starts a Device Advisor test suite run based on suite create time.