LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advice on constructing a test engine and formatting a spreadsheet test file to perform command line interface testing on a product through telnet or serial interface

Advice on constructing a test engine and formatting a spreadsheet test file to perform command line interface testing on a range of products through telnet or serial interface and output pass/fail results.
0 Kudos
Message 1 of 4
(2,457 Views)
If I understand correctly, you want to do the following:

1. Create one or more tab-delimited files that specify a series of query strings (that LabVIEW will send to your products) and expected reply strings (that LabVIEW will look for in response to each query)
2. Run your LabVIEW program (the test engine) and have it execute one or more test scripts from file using either TCP/IP or serial communication to your units under test
3. Track how many of the queries are met with the expected response, and output an indication of whether each step passed or failed

If this is close to correct, then I've attached a sample test file and LabVIEW VI as an example; I chose the TCP/telnet method because it allowed me to use the ni.com Web site to simulate my tes
t hardware. If you happen to own the LabVIEW Internet Toolkit, there's a VI called "Telnet Play Script" in the Telnet palette that does something fairly similar using TCP. The same general model would also work for Serial communications.

Hope it helps,
John Lum
Message 2 of 4
(2,457 Views)
Your understanding is correct and the example worked. I understand now that the GET string is a specific command to a web server and that the port value for telnet is 23.

One feature I need to implement is the ability to pass values from the front panel into the test commands for execution. A $variable string in the test file would receive this substitution before execution of the command. I will look into the Concatenate String VI along with a VI to convert the panel value to a
string.

I appreciate your help.
0 Kudos
Message 3 of 4
(2,457 Views)
You'll also need to make use of some sort of format/replace string function. In the general case, the Search and Replace Pattern VI would probably work best for you.

Here's another short example that demonstrates replacing the $variable portion of the input with your panel control value.

Regards,
John
0 Kudos
Message 4 of 4
(2,457 Views)