Running the Smoke Test
After installing and configuring the eMessage Connector, you need to determine if the system is set up properly. The smoke test tool provided with eMessage Connector is a standalone executable that you can run to make this determination. The smoke test performs several validation tests to confirm that the Connector is configured and running properly..
* 
Make sure that you set the environment variable for the Connector before attempting to run the smoke test. The smoke test uses it to locate the configuration file for the Connector, and if it is encrypted, it uses the configuration file for the security library to decrypt the configuration file. It also uses a logback.xml file provided in the smoke test archive for logging to STDOUT only. Refer to Setting the Environment Variable for details.
Running the Smoke Test
To run the smoke test:
1. If you have not already done so, set the EMESSAGE_OPTS environment variable to point to the configuration file, whether encrypted or unencrypted, for your Connector. Refer to Setting the Environment Variable if you need assistance.
2. Make sure that the eMessage Connector and ThingWorx Platform are up and running.
3. Make sure that you have created the security entities and run the services to grant visibility and permissions for the eMessage Connector. If not, refer to Setting Up Permissions and Visibility for the eMessage Connector.
4. Open a shell (Linux) or Command Prompt (Windows), and change to the bin subdirectory of the Connector installation.
5. To start the smoketest, enter the appropriate command for the operating system and provide the URL for the Connector as a parameter:
Linux:
# ./smoketest https://localhost:8081
Windows:
c:\> smoketest.bat https://localhost:8081
Validation Tests
The smoke test tool runs multiple tests that validate basic functionality. Each validation test executes its own test and throws a ValidationException if the test fails. If a validation test throws an exception, the smoke test checks the setting of the isFailFast flag for that validation test. If this flag is set to true, the smoke test logs an overall test result and exits. If the flag is set to false, the next validation test in the chain executes. For any validation test that throws a ValidationException, that exception is logged (with a stack trace of the exception).
A log message is written to the log for the smoke test tool during the start and completion of each validation test.
The execution order of the validation tests and links to the details for each step follow:
After all the validation steps execute, the overall test result is calculated and logged. For example, the following message might appear:
2016-11-01 08:23:24.248 INFO Overall test result=SUCCESS,
9 tests completed, 0 failed, 0 skipped
Setting of IsFailFast for the Validation Steps
The following table maps each of the validation steps to the setting of the isFailFast flag for each step. If this flag is set to true, the smoke test logs an overall test result and exits. If the flag is set to false, the next validation test in the chain executes. For any validation test that throws a ValidationException, that exception is logged (with a stack trace of the exception). For troubleshooting actions, refer to Troubleshooting the Smoke Test.
Settings for isFailFast byValidation Step
Validation Step in Log
isFailFast ?
1. Validate the configuration file of the eMessage Connector. (ConfigurationValidator class)
true
2. Validate the connection to the ThingWorx Platform. (ConnectToPlatformValidator)
false
3. Validate that the ConnectionServicesHub Thing exists. (ConnectionServicesHubExists-Validator)
false
4. Validate creating test Thing on the ThingWorx Platform (CreateTestThingValidator)
false
5. Validate sending a registration message to the eMessage Connector. (SendRegistrationValidator)
true
6. Validate sending DataItem messages to the eMessage Connector. (SendDataItemsValidator)
false
7. Set a property of a Thing, send an eMessage ping, and then validate that the SetDataItem egress was received. (SetPropertyAndProcessEgress-Validator)
false
8. Send a file upload request message to the eMessage Connector and then validate that the file is uploaded. (FileUploadValidator)
false
9. Queue a file download, using the Copy service, and validate that a file is downloaded. (FileDownloadValidator)
false
Was this helpful?