For executing IoT Core Device Advisor tests, we will use the AWS CLI, but also the AWS Console. The AWS Console will be used to create a test suite. This test suite is generally created one, and ran multiple times.
- Make sure you have an AWS Account, and you can log into the AWS Console.
- Make sure your AWS CLI is configured correctly with the AWS credentials, including the AWS Region.
Follow the instructions here to create the test suite in the AWS Console. This sample is configured to run the AWS Qualification Test Suite, but you can create other test suites if you so wish.
Follow the instructions here to create an AWS IAM Role which will be used as your device role. Copy the role ARN, because your will need it in the next steps.
- First get the suite id:
aws iotdeviceadvisor list-suite-definitions
and copy the suite id.
- Start execution:
aws iotdeviceadvisor start-suite-run \
--suite-definition-id <SUITE_ID> \
--suite-definition-version v1 \
--suite-run-configuration '{"primaryDevice":{"thingArn": "arn:aws:iot:<YOUR_REGION>:<YOUR_ACCOUNT_ID>:thing/iMX8m-84"}}'
- Start your device simulator application on the AVH device. For this, you can use the AWS IoT Device Client or the Node.JS simulator application provided in this repo. To use the Node.JS client, follow the instructions here. To use the AWS IoT Device Client, follow the configuration steps here: https://github.com/awslabs/aws-iot-device-client/blob/main/docs/CONFIG.md.
Note : You need to start the simulator app immediately after the test suite run is IN PROGRESS
. Otherwise, there will be MQTT errors. For more information, have a look at the Device Advisor docs.
- Examine your test suite run results You can do this in the AWS Console, as instructed here.
aws iotdeviceadvisor get-endpoint
aws iotdeviceadvisor create-suite-definition --suite-definition-configuration <YOUR_CONFIGURATION>
aws iotdeviceadvisor list-suite-definitions
aws iotdeviceadvisor list-suite-runs
aws iotdeviceadvisor get-suite-run --suite-definition-id <SUITE_ID> --suite-run-id <SUITE_RUN_ID>
aws iotdeviceadvisor get-suite-run-report --suite-definition-id <SUITE_ID> --suite-run-id <SUITE_RUN_ID>