udmi

UDMI / Docs / Specs / Sequences / Generated

Generated sequences

These are the exact sequences being checked by the sequence tool. They are programmatically generated so maybe a bit cryptic, but they accurately represent the specific steps required for each test.

broken_config (BETA)

Check that the device correctly handles a broken (non-json) config message.

  1. Update config starting broken_config:
    • Set system.min_loglevel = 100
  2. Wait for initial state synchronized
  3. Check that initial stable_config matches last_config
  4. Wait for log category system.config.apply level NOTICE to be logged
  5. Wait for has applicable system status
  6. Check that applicable system status
  7. Wait for log category system.config.receive level DEBUG to be logged
  8. Wait for log category system.config.parse level ERROR to be logged
  9. Check that log category system.config.apply level NOTICE not logged
  10. Force reset config
  11. Wait for state last_config sync
  12. Wait for log category system.config.apply level NOTICE to be logged
  13. Wait for restored state synchronized
  14. Update config before last_config updated:
    • Set system.min_loglevel = 100
  15. Wait for last_config updated
  16. Wait for log category system.config.apply level NOTICE to be logged
  17. Check that log category system.config.receive level DEBUG not logged
  18. Check that log category system.config.parse level DEBUG not logged

config_logging (BETA)

Check that the device publishes minimum required log entries when receiving config

  1. Update config set min_loglevel to debug:
    • Set system.min_loglevel = 100
  2. Force config update to resend config to device
  3. Wait for log category system.config.receive level DEBUG to be logged
  4. Wait for log category system.config.parse level DEBUG to be logged
  5. Wait for log category system.config.apply level NOTICE to be logged

device_config_acked (BETA)

Check that the device MQTT-acknowledges a sent config.

  1. Wait for config acked

empty_enumeration (PREVIEW)

Check enumeration of nothing at all

  1. Update config before enumeration not active:
    • Add discovery = { “enumerate”: { } }
  2. Wait for enumeration not active
  3. Update config before matching enumeration generation:
    • Add discovery.generation = generation start time
  4. Wait for matching enumeration generation
  5. Update config before cleared enumeration generation:
    • Remove discovery.generation
  6. Wait for cleared enumeration generation
  7. Check that no family enumeration
  8. Check that no feature enumeration
  9. Check that no point enumeration

endpoint_connection_error (PREVIEW)

Push endpoint config message to device that results in a connection error.

  1. Update config before blobset entry config status is error:
    • Add blobset = { “blobs”: { “_iot_endpoint_config”: { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data } } }
  2. Wait for blobset entry config status is error
  3. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  4. Wait for endpoint config blobset state not defined

endpoint_connection_retry (PREVIEW)

Check repeated endpoint with same information gets retried.

  1. Update config before blobset entry config status is error:
    • Add blobset = { “blobs”: { “_iot_endpoint_config”: { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data } } }
  2. Wait for blobset entry config status is error
  3. Update config before blobset entry config status is error:
    • Set blobset.blobs._iot_endpoint_config.generation = new generation
  4. Wait for blobset entry config status is error
  5. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  6. Wait for endpoint config blobset state not defined

endpoint_connection_success_alternate (PREVIEW)

Check connection to an alternate project.

  1. Wait for initial last_config matches config timestamp
  2. Update config mirroring config false:
    • Add blobset = { “blobs”: { “_iot_endpoint_config”: { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data } } }
  3. Wait for blobset phase is apply and stateStatus is null
  4. Wait for blobset phase is final and stateStatus is null
  5. Wait for alternate last_config matches config timestamp
  6. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  7. Wait for endpoint config blobset state not defined
  8. Update config mirroring config true:
    • Add blobset.blobs._iot_endpoint_config = { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data }
  9. Wait for blobset phase is apply and stateStatus is null
  10. Wait for blobset phase is final and stateStatus is null
  11. Wait for restored last_config matches config timestamp
  12. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  13. Wait for endpoint config blobset state not defined

endpoint_connection_success_reconnect (PREVIEW)

Check a successful reconnect to the same endpoint.

  1. Update config before blobset phase is final and stateStatus is null:
    • Add blobset = { “blobs”: { “_iot_endpoint_config”: { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data } } }
  2. Wait for blobset phase is final and stateStatus is null
  3. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  4. Wait for endpoint config blobset state not defined

endpoint_failure_and_restart (PREVIEW)

  1. Update config before blobset entry config status is error:
    • Add blobset = { “blobs”: { “_iot_endpoint_config”: { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data } } }
  2. Wait for blobset entry config status is error
  3. Wait for last_start is not zero
  4. Check that initial count is greater than 0
  5. Update config before system mode is ACTIVE:
    • Add system.operation.mode = active
  6. Wait for system mode is ACTIVE
  7. Update config before system mode is INITIAL:
    • Set system.operation.mode = restart
  8. Wait for system mode is INITIAL
  9. Check that restart count increased by one
  10. Update config before system mode is ACTIVE:
    • Set system.operation.mode = active
  11. Wait for system mode is ACTIVE
  12. Wait for last_config is newer than previous last_config before abort
  13. Wait for last_config is newer than previous last_config after abort
  14. Wait for last_start is newer than previous last_start
  15. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  16. Wait for endpoint config blobset state not defined

endpoint_redirect_and_restart (PREVIEW)

  1. Wait for initial last_config matches config timestamp
  2. Update config mirroring config false:
    • Add blobset = { “blobs”: { “_iot_endpoint_config”: { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data } } }
  3. Wait for blobset phase is apply and stateStatus is null
  4. Wait for blobset phase is final and stateStatus is null
  5. Wait for alternate last_config matches config timestamp
  6. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  7. Wait for endpoint config blobset state not defined
  8. Wait for last_start is not zero
  9. Check that initial count is greater than 0
  10. Update config before system mode is ACTIVE:
    • Add system.operation.mode = active
  11. Wait for system mode is ACTIVE
  12. Update config before system mode is INITIAL:
    • Set system.operation.mode = restart
  13. Wait for system mode is INITIAL
  14. Check that restart count increased by one
  15. Update config before system mode is ACTIVE:
    • Set system.operation.mode = active
  16. Wait for system mode is ACTIVE
  17. Wait for last_config is newer than previous last_config before abort
  18. Wait for last_config is newer than previous last_config after abort
  19. Wait for last_start is newer than previous last_start
  20. Update config mirroring config true:
    • Add blobset.blobs._iot_endpoint_config = { “phase”: final, “generation”: blob generation, “sha256”: blob data hash, “url”: endpoint data }
  21. Wait for blobset phase is apply and stateStatus is null
  22. Wait for blobset phase is final and stateStatus is null
  23. Wait for restored last_config matches config timestamp
  24. Update config before endpoint config blobset state not defined:
    • Remove blobset.blobs._iot_endpoint_config
  25. Wait for endpoint config blobset state not defined

extra_config (BETA)

Check that the device correctly handles an extra out-of-schema field

  1. Update config before last_config not null:
    • Set system.min_loglevel = 100
  2. Wait for last_config not null
  3. Wait for system operational
  4. Check that no applicable system status
  5. Wait for log category system.config.receive level DEBUG to be logged
  6. Wait for last_config updated
  7. Wait for system operational
  8. Check that no applicable system status
  9. Wait for log category system.config.parse level DEBUG to be logged
  10. Wait for log category system.config.apply level NOTICE to be logged
  11. Wait for log category system.config.receive level DEBUG to be logged
  12. Wait for last_config updated again
  13. Wait for system operational
  14. Wait for log category system.config.parse level DEBUG to be logged
  15. Wait for log category system.config.apply level NOTICE to be logged

family_ether_addr (PREVIEW)

  1. Wait for localnet families available
  2. Check that device family ether address matches

family_ipv4_addr (PREVIEW)

  1. Wait for localnet families available
  2. Check that device family ipv4 address matches

family_ipv6_addr (PREVIEW)

  1. Wait for localnet families available
  2. Check that device family ipv6 address matches

feature_enumeration (PREVIEW)

Check enumeration of device features

  1. Update config before enumeration not active:
    • Add discovery = { “enumerate”: { “features”: true } }
  2. Wait for enumeration not active
  3. Update config before matching enumeration generation:
    • Add discovery.generation = generation start time
  4. Wait for matching enumeration generation
  5. Update config before cleared enumeration generation:
    • Remove discovery.generation
  6. Wait for cleared enumeration generation
  7. Check that no family enumeration
  8. Check that feature enumeration matches metadata
  9. Check that all enumerated features are official buckets
  10. Check that no point enumeration

gateway_proxy_events (BETA)

Check that a gateway proxies pointset events for indicated devices

  1. Test skipped: Not a gateway

pointset_publish (BETA)

Check that a device publishes pointset events

  1. Wait for receive a pointset event

pointset_publish_interval (BETA)

Check handling of sample rate and sample limit sec

  1. Update config before receive at least 4 pointset events:
    • Add pointset.sample_rate_sec = 8
    • Add pointset.sample_limit_sec = 5
  2. Wait for receive at least 4 pointset events
  3. Check that time period between successive pointset events is between 5 and 8 seconds
  4. Update config before receive at least 4 pointset events:
    • Set pointset.sample_rate_sec = 18
    • Set pointset.sample_limit_sec = 15
  5. Wait for receive at least 4 pointset events
  6. Check that time period between successive pointset events is between 15 and 18 seconds

pointset_remove_point (BETA)

Check that pointset state does not report an unconfigured point

  1. Wait for pointset state reports same points as defined in config
  2. Wait for pointset event contains correct points with present_value
  3. Update config before pointset status does not contain removed point:
    • Remove pointset.points[random_point]
  4. Wait for pointset status does not contain removed point
  5. Wait for pointset state reports same points as defined in config
  6. Wait for pointset event contains correct points with present_value
  7. Update config before pointset status contains removed point:
    • Add pointset.points[random_point] = point configuration
  8. Wait for pointset status contains removed point
  9. Wait for pointset state reports same points as defined in config
  10. Wait for pointset event contains correct points with present_value

pointset_request_extraneous (BETA)

Check error when pointset configuration contains extraneous point

  1. Wait for pointset state reports same points as defined in config
  2. Wait for pointset event contains correct points with present_value
  3. Update config before pointset status contains extraneous point error:
    • Add pointset.points[extraneous_point] = point configuration
  4. Wait for pointset status contains extraneous point error
  5. Wait for pointset state reports same points as defined in config
  6. Wait for pointset event contains correct points with present_value
  7. Update config before pointset status removes extraneous point error:
    • Remove pointset.points[extraneous_point]
  8. Wait for pointset status removes extraneous point error
  9. Wait for pointset state reports same points as defined in config
  10. Wait for pointset event contains correct points with present_value

pointset_sample_rate (BETA)

Check that a device publishes pointset events not faster than config sample_rate_sec

  1. Wait for measure initial sample rate
  2. Update config before receive at least 5 pointset events:
    • Add pointset.sample_rate_sec = 5
    • Add pointset.sample_limit_sec = 1
  3. Wait for receive at least 5 pointset events
  4. Check that time period between successive pointset events is between 1 and 5 seconds

state_make_model (BETA)

Check that a device publishes correct make and model information in state messages

  1. Check that make and model in state matches make in metadata

state_software (BETA)

Check that a device publishes correct software information in state messages

  1. Check that software in metadata matches state

system_last_update (STABLE)

Check that last_update state is correctly set in response to a config update.

  1. Wait for state last_config matches first config timestamp
  2. Wait for state update complete
  3. Force config update to trigger another config update
  4. Wait for state last_config matches new config timestamp
  5. Wait for state update complete
  6. Force config update to trigger another config update
  7. Wait for state last_config matches last config timestamp
  8. Wait for state update complete

valid_serial_no (BETA)

  1. Wait for received serial number matches