Step 7. Setting a Property Value
The seventh test validates setting a property value on the test Thing in the ThingWorx Platform and sending it to the agent via the eMessage Connector.
If this test throws an exception, the smoke test checks the setting of the isFailFast flag. For this test, this flag is set to false. so the next validation test in the chain executes. In addition, the exception is logged (with a stack trace of the exception).
This test sets a property on an Axeda Thing in the ThingWorx Platform, sends an eMessage ping to the ThingWorx Platform from the Connector, and then validates that the agent received the new value for the corresponding data item (SetDataItem egress).
1. Create a new Thing by importing an entities XML file into the ThingWorx Platform.
a. ThingName = SmokeTestThing_98765
b. The import includes a windproperty that includes a remote property binding with the following aspects:
i. Push Type = "Always Pushed"
ii. When Disconnect = "Fold all the changes into a single last changed value"
2. Validate that the Thing was imported correctly by issuing a service call to the ThingWorx Platform to determine if the Thing exists.
3. Validate setting the modelNumber and serialNumber properties on the Thing.
a. modelNumber = SmokeTestThing_98765_ModelNumber_<UUID>
b. serialNumber = SmokeTestThing_98765_SerialNumber_<UUID>
4. Validate enabling the Thing.
5. Validate restarting the Thing (using the RestartAgent service).
6. Enqueue Set Property egress on the ThingWorx Platform by setting the wind property to a random value via a REST call.
7. Send an eMessage ping message to the Connector to dequeue the pending egress
8. Validate that the Connector returns a status of successful in the eMessage response and that the response contains SetDataItem egress for the "wind data item with a value equal to the value sent in the egress message.
9. Perform cleanup:
a. Clear Connector caches by sending ClearCacheEntry events to the Connection Services Hub. Refer to the description in the Cleanup section for details.
b. Delete the Thing from the ThingWorx Platform.
Was this helpful?