Applies to: Docklight Scripting (all versions), Article ID: dl_faq055
A very easy way is to start with our generic “TestRunner” example provided below. It reads a list of commands and the expected answers from a MS Excel style “CommandList.csv” file.
Docklight Scripting then sends each command to the serial (or TCP) device, waits for the device answer and compares the results with the correct response defined in “CommandList.csv”. The results of all individual tests, and a general PASSED / FAILED status is written to a separate “results.txt” file for documentation.
Depending on your actual device and its communication protocol, you will probably need to make some adjustments to the Docklight script, besides putting your own commands in the “CommandList.csv” file. But the example provides an excellent starting point and should lead to quick results.
Any feedback is highly appreciated, especially related to a specific communication protocol where some extra logic has to be added to the “plain vanilla” TestRunner code below.
NOTE: See also the related example below which shows you a different approach for managing test data sequences / test commands: An ExCel macro worksheet to export an import Docklight Project Files (.ptp).
TestRunnerExample.zip – How to created automated, file-based device testing
Docklight FAQ – How to organize / sort / group / bulk edit Docklight projects using ExCel?