AWS IoT Device SDK C:
Jobs
AWS IoT Jobs library
|
Return to main page ↑ |
Tests written for the Jobs library.
The Jobs tests reside in the jobs/test
directory. They are divided into the following subdirectories:
system
: Jobs system tests. These tests require a network connection and AWS IoT credentials. They also need an AWS account and registered Thing; see Setting up Jobs system tests for instructions to configure an AWS account to run these tests. The command line option -n
may be passed to the test executable to disable these tests.unit
: Jobs unit tests. These tests do not require a network connection or credentials. These tests use the MQTT mocks.See Test Configuration for configuration settings that change the behavior of the Jobs system tests. The Jobs unit tests require no special configuration.
The current Jobs tests use the Unity test framework. See Building and running the tests for a guide on running the tests.
How to set up the Jobs system tests.
The Jobs system tests require Jobs to be created with an AWS account. AWS does not provide the functionality to create Jobs using the Device API; therefore, Jobs will have to be created using another method.
See Additional Travis CI setup for Jobs and Provisioning system tests for additional setup for running the Jobs tests on Travis CI.
<region>
and <account>
with your AWS region and account number, respectively; replace <ThingName>
with the name of the Thing registered in step 1. QUEUED
state each time the tests are run. To create a Job, the following AWS CLI command may be used. Replace UniqueId
with a Job ID that is unique, and ThingARN
with the ARN of the Thing registered in step 1. The --document
argument can be followed by any JSON string. UniqueId
is the Job ID used to create the Job.