Step 9. Download File
The ninth test validates downloading a file to the agent from the ThingWorx Platform, 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).
The steps for this test are as follows:
1. Validate the creation of a local download directory.
2. Validate the creation of a file in the repository on the ThingWorx Platform.
The name of the repository is parsed from value of the download file repository that is specified in the Connector configuration.
3. Validate enqueuing a file download on the ThingWorx Platform by calling the Copy service of the File Transfer Subsystem.
4. Send an eMessage ping request from the agent to the Connector.
5. Validate that the Connector returns a status of success in the eMessage response and that a FileTransfer.Dowload SOAP response was included.
6. Validate that the FileTransfer.Download SOAP response contains the name of the file that was passed into the Copy service.
7. Send a message from the agent with a PackageStatus of started to the Connector.
8. Validate downloading file chunks from the Connector to a local file.
9. Validate that the file was downloaded properly by retrieving the file MD5 checksum from the ThingWorx Platform and then comparing that checksum against the local file checksum.
10. Validate that an active transfer job exists in the File Transfer Subsystem of the ThingWorx Platform.
11. Send a message with a PackageStatus of success from the agent to the Connector to complete the transfer.
12. Validate that the active transfer job was removed from the File Transfer Subsystem of the ThingWorx Platform.
13. Perform cleanup:
a. Remove transfer jobs from both the active and offline queues (in case of failures in the preceding steps)
b. Delete the directory for the Remote Thing from the repository of the ThingWorx Platform.
Was this helpful?