SDK ThreadX 2.0 Self Test Plan

SDK ThreadX 2.0 Self Test Plan

Overview

This document covers various test cases for ThingSpace SDK devices and GET OTP Command. These tests check various scenarios, sequence of messages, MQTT topics and associated payloads.

Used Tools

  • MQTT fx / MQTT spy
  • Postman

Bulb-UC-12 Changing Unit State

Change unit state of the bulb from home (turn on/off).

Precondition

Bulb Device is already connected with ThingSpace MQTT broker and User App, connectivity and authentication is pre-configured.

Execution steps

1. Connect MQTT.fx client with ThingSpace messaging broker. Use the same credentials on the user’s device.

2. Subscribe to the following MQTT topics: (expected to be exchanged between End Device, ThingSpace cloud and Mobile App)

a. “characteristicsName": "UNITState”

3. Change state of the device from TRUE to FALSE.

4. Change state of the device from FALSE to TRUE.

Pass Criteria

User can change unit state of the bulb at the home (turn ON/OFF). The response status code should read 200 OK.

Fail Criteria

User cannot change the state of the device.


Bulb- UC-13 Changing Dimmer Value

User can change dimmer state of the bulb. Set dimmer value for the bulb.

Precondition

Bulb device is already connected with ThingSpace MQTT broker, User App, and connectivity and authentication is pre-configured.

Execution steps

1. Connect MQTT.fx client with ThingSpace messaging broker. Use the same credentials on user’s device.

2. Subscribe to the following MQTT topics: (expected to be exchanged between End Device, ThingSpace cloud and Mobile App)

a. "characteristicsName": "DimmerValue"

3. Set MIN value as 0.

4. Set value as 1.

5. Set value as 99.

6. Set MAX value as 100.

7. Set value as 50.

Pass Criteria

User can change dimmer value of the bulb at the home by setting different values for it. MIN value is 0. MAX value is 100. Changed values are updated. Correct values are received from the device. The response status code should read 200 OK.

Fail Criteria

User cannot change the dimmer value of the device. Changed values are not applied to the device. Changed status are not updated for device.


Bulb- UC-14 Check history of characteristic

Verify the history of the characteristics.

Precondition

Bulb device is already connected with ThingSpace MQTT broker, User App, and the connectivity and authentication is pre-configured.

Execution steps

1. Check if correct Dimmer Value history is Saved.

2. Check if correct “unitState” history is saved.

Pass Criteria

Device commands are logged with correct device info and command details. The response status code should read 200 OK.

Fail Criteria

Device commands aren’t logged or logged with invalid device info and command details.


UC-15 GetOTP MQTT command

Command to receive all technical info for ThingSpace SDK client hardware and its status in separated categories, eq.: DeviceInfo, Network, Wi-Fi, RAM etc.

Precondition

ThingSpace SDK client is running and already connected with the ThingSpace messaging broker. User is authenticated on ThingSpace Cloud.

Execution steps

1. Connect to MQTT.fx client with ThingSpace messaging broker. Use the same credentials on user’s device.

2. Subscribe to the following MQTT topics:

a. ThingspaceSDK/# (All information about MQTT traffic is displayed)

3. Send MQTT command:

Topic:
ThingspaceSDK/${tas_mac_address}/TSServerPublishCommand
Payload:
{
"unitCommand": "GetOtp",
"commandUUID": "00000000-0000-0000-C000-446655440000"
}

Pass Criteria

On MQTT.fx messages should be received with valid data as a list of capabilities, supported by the current ThingSpace SDK client and the response status code should read 200 OK.

Fail Criteria

On MQTT.fx message received with incorrect data or not received.


UC-16 GetOTP REST call

Command to receive all technical info for ThingSpace SDK client hardware and its status in separated categories, eq.: DeviceInfo, Network, Wi-Fi, RAM etc.

Precondition

ThingSpace SDK client is running and already connected with ThingSpace MQTT broker. User is authenticated on ThingSpace Cloud.

Execution steps

1. Connect to MQTT.fx client with ThingSpace message broker. Use the same credentials on user’s device.

2. Subscribe to the following MQTT topics:

a. ThingspaceSDK/# (here you should see all information about MQTT traffic)

3. Login to ThingSpace SDK cloud.

4. Send REST request to:

https://${TSSDKCloudIP}/cassandra/ts-sdk-provider/devices/${tas_mac_address}/oeminfo

Pass Criteria

On MQTT.fx messages should be received with valid data as a supported device information payload and response status code 200 OK. RST call will return valid data with same payload.

Fail Criteria

On MQTT.fx or REST call response message received with incorrect data or not received.


UC-17 GetOTP DeviceInfo MQTT command

Command to receive technical info for TS SDK Client hardware and its status, eq.: IMSI, IMEI, MDN, Firmware version etc.

Precondition

TS SDK Client is running and already connected with ThingSpace MQTT broker and user is authenticated on ThingSpace Cloud.

Execution steps

1. Connect to MQTT.fx with ThingSpace broker with same credentials as on user device.

2. From MQTT.fx subscribe for below listed MQTT topic:

a. ThingspaceSDK/# (here you should see all information about MQTT traffic)

3. Send MQTT command:

Topic:
ThingspaceSDK/${tas_mac_address}/TSServerPublishCommand
Payload:
{
"unitCommand": "GetOtp",
"characteristicsName": "DeviceInfo",
"commandUUID": "00000000-0000-0000-C000-446655440000"
}

Pass Criteria

On MQTT.fx messages should be received with valid data as a DeviceInfo payload and response status code 200 OK.

Fail Criteria

On MQTT.fx message received with incorrect data or not received.


UC-18 GetOTP DeviceInfo REST call

Command to receive technical info for ThingSpace SDK client hardware and its status, eq.: IMSI, IMEI, MDN, Firmware version etc.

Precondition

ThingSpace SDK client is running and already connected with ThingSpace MQTT broker. User is authenticated on ThingSpace Cloud.

Execution steps

1. Connect to MQTT.fx client with ThingSpace messaging broker. Use the same credentials on user’s device.

2. Subscribe to the following MQTT topics:

a. ThingspaceSDK/# (All information about MQTT traffic is displayed)

3. Login to ThingSpace SDK client.

4. Send REST request to:

https://${TSSDKCloudIP}/cassandra/ts-sdk-provider/devices/${tas_mac_address}/oeminfo/WIFI

Pass Criteria

On MQTT.fx messages should be received with valid data as a DeviceInfo payload and response status code 200 OK. RST call will return valid data with DeviceInfo payload.

Fail Criteria

On MQTT.fx or REST call response message received with incorrect data or not received.


UC-19 GetOTP WIFI info MQTT command

Command to receive technical info for ThingSpace SDK client WI-FI info and its status, eq.: BSSID, WIFI Enabled, HotSpot, MAC, SSID, Scanning, Signal, Speed etc.

Precondition

ThingSpace SDK client is running and already connected with ThingSpace MQTT broker. User is pre-authenticated on ThingSpace Cloud.

Execution steps

1. Connect to MQTT.fx with ThingSpace messaging broker. Use the same credentials on user’s device.

2. Subscribe to the following MQTT topics:

a. ThingspaceSDK/# (All information about MQTT traffic is displayed)

3. Send MQTT command:

Topic:
ThingspaceSDK/${tas_mac_address}/TSServerPublishCommand
Payload:
{
"unitCommand": "GetOtp",
"characteristicsName": "WIFI",
"commandUUID": "00000000-0000-0000-C000-446655440000"
}

Pass Criteria

On MQTT.fx messages should be received with valid data as a WIFI message payload and response status code 200 OK.

Fail Criteria

On MQTT.fx message received with incorrect data or not received.


UC-20 GetOTP WIFI info REST call

Command to receive technical info for ThingSpace SDK client hardware and its status: BSSID, WI-FI Enabled, Hotspot, MAC, SSID, Scanning, Signal, Speed.

Precondition

ThingSpace SDK client is running and already connected with ThingSpace MQTT broker. User is pre-authenticated on ThingSpace Cloud.

Execution steps

1. Connect to MQTT.fx client with ThingSpace messaging broker. Use the same credentials on user’s device.

2. Subscribe to the following MQTT topics:

a. ThingspaceSDK/# (All information about MQTT traffic is displayed)

3. Login to ThingSpace SDK cloud.

4. Send REST request to:

https://${TSSDKCloudIP}/cassandra/ts-sdk-provider/devices/${tas_mac_address}/oeminfo/WIFI

Pass Criteria

On MQTT.fx messages should be received with valid data as a WIFI message payload and response status code 200 OK. RST call will return valid data with WIFI info payload.

Fail Criteria

On MQTT.fx or REST call response message received with incorrect data or not received.