9 Functionality Test Cases 
9.1 Use of the Timer! Event (DEPRECATED by 9.11) 
Purpose 
The purpose of this test is to ensure the Timer! event can be configured, and the EUT correctly triggers the event.
Functionality Tags 
Conditional Mandatory (supports Device.LocalAgent.Controller.{i}.ScheduleTimer() command)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.LocalAgent.Controller.<Controller ID>.ScheduleTimer()' input_args { key: 'DelaySeconds' value: '60' } } } }
Wait for the EUT to send a Notification.
Test Metrics 
- The EUT sends an OperateResponse with ScheduleTimer() in the executed_command element.
- The EUT sends a Notify message with an event element containing Timer!
9.2 Use of Device.LocalAgent.AddCertificate() 
Purpose 
The purpose of this test is to ensure the AddCertificate() operation on the EUT functions correctly.
Functionality Tags 
Conditional Mandatory (supports Device.LocalAgent.AddCertificate() command)
Test Setups 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Have an alternate certificate that the EUT hasn’t seen.
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.LocalAgent.AddCertificate()' send_resp: true input_args { key: 'Alias' value: 'addedCert' } input_args { key: 'Certificate' value: '<new certificate>' } } } }
Reconfigure the Controller to use the new certificate.
Reestablish a connection to the EUT.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.LocalAgent.Certificate.' } } }
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.LocalAgent.Certificate.<cert instance>.Delete()' } } }
Test Metrics 
- The EUT sends an OperateResponse after step 1.
- The EUT accepts the connection after the Controller has been reconfigured to use the new certificate.
- The EUT returns a GetResponse after step 4 which contains an instance with an Alias which matches the certificate added in step 1.
- The EUT sends an OperateResponse after step 5.
9.3 Upgraded the Agent’s Firmware - Autoactivate enabled 
Purpose 
The purpose of this test is to ensure the EUT can download firmware and automatically activate it using the AutoActivate parameter.
Functionality Tags 
Conditional Mandatory (supports Firmware:1 profile)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Ensure that the EUT has a Subscription to the TransferComplete! and Boot! events with the recipient being the instance used for testing.
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.DeviceInfo.FirmwareImage.<inactive instance>.Download()' input_args { key: 'AutoActivate' value: 'true' } input_args { key: 'URL' value: '<firmware URL>' } input_args { key: 'Username' value: '<optional username>' } input_args { key: 'Password' value:'<optional password>' } input_args { key: 'FileSize' value: '<file size>' } } } }
Wait for the EUT to send a Notification
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.' } } }
Test Metrics 
- The EUT sends a Notify message after step 1 containing a oper_complete element with a command_name of Download()
- The EUT sends a Notify message with a TransferComplete! event.
- The EUT sends a Notify message with a Boot! event, with the FirmwareUpdated argument set to true.
- The EUT sends a GetResponse message after step 3 which shows that
Device.DeviceInfo.ActiveFirmwareImage
matches the FirmwareImage instance on which the Download() operation was called; also thatDevice.DeviceInfo.SoftwareVersion
matches the expected version.
9.4 Upgrading the Agent’s Firmware - Using TimeWindow, Immediate 
Purpose 
The purpose of this test is to ensure the EUT can activate a firmware image when a TimeWindow object is used with Immediately mode.
Functionality Tags 
Conditional Mandatory (supports Firmware:1 profile with Activate() operation)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Ensure the EUT has a FirmwareImage instance containing inactive firmware.
- Ensure the EUT has a Subscription instance for Boot! with the used for testing set as the Recipient.
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: "Device.DeviceInfo.FirmwareImage.<instance>.Activate()" input_args: { key: 'TimeWindow.1.Start' value: '1' } input_args: { key: 'TimeWindow.1.End' value: '100' } input_args: { key: 'TimeWindow.1.Mode' value: 'Immediately' } } } }
Wait for Notify message from the EUT.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.SoftwareVersion' } } }
Test Metrics 
- The EUT sends a Notify message within 5 seconds with an OperationComplete element with a command_name of Activate().
- The EUT sends a Notify message with a Boot! event and a FirmwareUpdated argument set to true.
- The EUT responds to the Get message with a GetResponse containing a SoftwareVersion element with the expected software version.
9.5 Upgrading the Agent’s Firmware - Using TimeWindow, AnyTime 
Purpose 
The pupose of this test is to ensure the EUT can activate a firmware image when a TimeWindow instance used with the AnyTime mode.
Functionality Tags 
Conditonally Mandatory (implements Firmware:1 and Activate() operation)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Ensure the EUT has a FirmwareImage instance containing inactive firmware.
- Ensure the EUT has a Subscription to the Boot! event with the Controller used for testing set as the Recipient.
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.DeviceInfo.FirmwareImage.<inactive instance>.Activate()' input_args: { key: 'TimeWindow.1.Start' value: '0' } input_args: { key: 'TimeWindow.1.End' value: '120' } input_args: { key: 'TimeWindow.1.Mode' value: 'AnyTime' } } } }
Wait for a Notify message from the EUT.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.SoftwareVersion' } } }
Test Metrics 
- The EUT sends a Notify message within 2 minutes after step 1.
- The Notify message has a OperationComplete element.
- The EUT sends a Notify message with a Boot! event and a FirmwareUpdated argument set to true.
- The EUT sends a GetResponse after step 3 with a SoftwareVersion parameter that matches the expected version.
9.6 Upgrading the Agent’s Firmware - Validated Firmware 
Purpose 
The purpose of this test is to ensure the EUT can validate the integrity of downloaded firmware.
Functionality Tags 
Conditional Mandatory (supports Firmware:1 profile)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Ensure that the EUT has a Subscription to the TransferComplete! event with the recipient being the instance used for testing.
Test Procedure 
Send an Operate message to the EUT with the following structure using an invalid checksum:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.DeviceInfo.FirmwareImage.<inactive slot>.Download()' input_args { key: 'URL' value: '<firmware URL>' } input_args { key: 'CheckSumAlgorithm' value: 'SHA-1' } input_args { key: 'CheckSum' value: '<invalid checksum>' } } } }
Wait for a Notify message from the EUT.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.DeviceInfo.FirmwareImage.<previously used instance>.' } } }
Test Metrics 
- The EUT sends a Notify message with an OperationComplete element.
- The ETU sends a Notify message with a TransferComplete! event.
- The EUT sends a Get response with a Status parameter of ValidationFailed.
9.7 Upgrading the Agent’s Firmware - Download to Active Bank 
Purpose 
The purpose of this test is to ensure the EUT is capable downloading and installing new firmware for EUTs that may support only the active firmware bank.
Functionality Tags 
Conditional Mandatory (supports Firmware:1 profile)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Ensure that the EUT has a Subscription to the TransferComplete! event with the recipient being the instance used for testing.
- Ensure the EUT has a Subscription to the Boot! event and the Controller used for testing is set as the Recipient.
- Record the number of firmware banks the EUT supports.
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.DeviceInfo.FirmwareImage.<active firmware slot>.Download()' input_args { key: 'URL' value: '<firmware URL>' } input_args { key: 'AutoActivate' value: 'true' } } } }
Wait for a Notify message from the EUT.
Test Metrics 
- The EUT sends a Notify message with an OperationComplete, if the EUT supports multiple firmware banks the OperationComplete may contain an error indicating that downloading to an active firmware slot is not allowed.
- If an OperationComplete Notification is sent without an error, the EUT sends a Notify message with a Boot! event and a FirmwareUpdated argument set to true.
9.8 Upgrading the Agent’s Firmware - Cancelling a request using the Cancel() command 
Purpose 
The purpose of this test is to ensure the EUT can correctly cancel a Download() operation.
Functionality Tags 
Conditional Mandatory (supports Firmware:1 profile and Device.LocalAgent.Request.{i}.Cancel() operation)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Ensure the EUT has inactive firmware in one of FirmwareImage slots.
- Ensure the EUT has a subscription to the Boot! event with the Controller used for testing set as the Recipient.
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.DeviceInfo.FirmwareImage.<valid instance>.Activate()' input_args { key: 'TimeWindow.1.Start' value: '120' } input_args { key: 'TimeWindow.1.End' value: '500' } input_args { key: 'TimeWindow.1.Mode' value: 'AnyTime' } send_resp: true } } }
Send an message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.LocalAgent.Request.<returned in step 1>.Cancel()' } } }
Wait up to 500 seconds for a Boot! event from the EUT.
Send a Get message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: GET } body { request { get { param_paths: 'Device.LocalAgent.Request.' } } }
Test Metrics 
- The EUT sends a OperationResponse after step 1 with a executed_command element of Activate() and a req_obj_path referencing an entry in the Device.LocalAgent.Request table.
- The EUT never sends a Boot! event.
- In the GetResponse from the EUT after step 4, the Request instance is either non-existent or the Status parameter of the relevant request is either Cancelled or Cancelling.
9.9 Adding a New Controller - OnBoardRequest 
Purpose 
The purpose of this test is to ensure the EUT can handle the manual adding of a new Controller.
Functionality Tags 
Conditional Mandatory (supports Controller:1 profile with the ability to create instances of the Device.LocalAgent.Controller. object, supports SendOnBoardRequest())
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- A valid role instance is configured on the EUT for use with the new certificate.
- A valid certificate instance is configured on the EUT
- A secondary Controller is configured and ready to communicate with another endpoint.
Test Procedure 
Send an Add message to the EUT with the following structure.
header { msg_id: '<msg_id>' msg_type: ADD } body { request { add { create_objs { obj_path: 'Device.LocalAgent.Controller.' param_settings { param: 'Alias' value: 'usp-111-Controller' } param_settings { param: 'EndpointID' value: '<new Controller endpoint ID>' } param_settings { param: 'Enable' value: 'true' } param_settings { param: 'AssignedRole' value: '<valid role instance>' } } } } }
Send an Add message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: ADD } body { request { add { create_objs { obj_path: 'Device.LocalAgent.Controller.<new Controller instance>.MTP.' param_settings: { param: 'Enable' value: 'true' } param_settings: { param: 'Protocol' value: '<supported MTP>' } } # . # . # <further parameters to configure supported MTP> # . # . } } }
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.LocalAgent.Controller.<new instance>.SendOnBoardRequest()' } } }
Allow the secondary Controller to receive the OnBoardRequest() and send a NotifyResponse.
Test Metrics 
- The EUT is able to start a session with the secondary Controller.
- The EUT sends a Notify message to the secondary Controller containing an OnBoardRequest element.
9.10 Use of the Boot! event and BootParameters 
Purpose 
The purpose of this test is to ensure the EUT correctly triggers the Boot! event and correctly includes the configured BootParameters.
Functionality Tags 
Conditional Mandatory (supports Reboot:1 profile, supports Device.DeviceInfo.BootFirmwareImage)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
Test Procedure 
Send an Add message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: ADD } body { request { add { create_objs { obj_path: 'Device.LocalAgent.Subscription.' param_settings { param: 'NotifType' value: 'Event' } param_settings { param: 'ReferenceList' value: 'Device.Boot!' } param_settings { param: 'Enable' value: 'true' } } create_objs { obj_path: 'Device.LocalAgent.Controller.<Controller instance>.BootParameter.' param_settings { param: 'Enable' value: 'true' } param_settings { param: 'ParameterName' value: 'Device.DeviceInfo.BootFirmwareImage' } } } } }
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.Reboot()' } } }
Wait for a Notify message from the EUT.
Test Metrics 
- After step 2 the EUT sends a Notify message with an event element containing a ParameterMap argument with Device.DeviceInfo.BootFirmwareImage
9.11 Use of the Timer! Event 
Purpose 
The purpose of this test is to ensure the Timer! event can be configured, and the EUT correctly triggers the event.
Functionality Tags 
Conditional Mandatory (supports Device.ScheduleTimer() command)
Test Setup 
- Ensure that the EUT and test equipment have the necessary information to send and receive USP Records to each other.
- Ensure that a Subscription object exists on the EUT with NotifType OperationComplete on Device.ScheduleTimer().
Test Procedure 
Send an Operate message to the EUT with the following structure:
header { msg_id: '<msg_id>' msg_type: OPERATE } body { request { operate { command: 'Device.ScheduleTimer()' input_args { key: 'DelaySeconds' value: '60' } } } }
Wait for the EUT to send a Notification.
Test Metrics 
- The EUT sends an OperateResponse with ScheduleTimer() in the executed_command element.
- The EUT sends an OperationComplete Notify message with an event element containing ScheduleTimer().