I need to set up an automated device testing procedure for our production. The testing procedure includes sending a list of predefined commands to a device and checking for the correct response after each command. How do I make this work in Docklight Scripting?

I need to set up an automated device testing procedure for our production. The testing procedure includes sending a list of predefined commands to a device and checking for the correct response after each command. How do I make this work in Docklight Scripting?

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.

TestRunnerExample.zip – How to created automated, file-based device testing

e-mail to Docklight Technical Support