LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code Coverage and GUI Automation Testing

Hi everyone,
 
I am looking for two tools for Labview. 
 
1)  Code coverage
 
     I did a quick search and I did not find any code coverage tools for VIs.  However, most of the posts were from 2004.  Has this situation changed?
 
2)  GUI automation testing
 
     I've looked at TestStand and it appears to be a test automation for your VIs and data acquistion systems.  I.E., you can test inputs and outputs.  Can Test Stand perform GUI testing that can simulate human interaction on the end-user GUI?   I seen other tools such as dogtail (which is scriptable but only works for particular GUI toolkits).  I am looking for a tool that can test by finding GUI features (for example, click on the Calculate button) and not move 524 pixels right and 550 pixels down and press click.
 
   
Thanks,
 
Will
 
0 Kudos
Message 1 of 6
(3,727 Views)
 

Hello Will,

I am not sure about your first question since that is more of a LabVIEW issue, but I can address your second question about TestStand.  There are 3 main ways that TestStand can interface with other programs for control.

  1. Using ActiveX: TestStand can use direct calls to an ActiveX library which would expose the features of the program.  Microsoft Word and Excel are both products which have such exposed interfaces.  Here is a Developer Zone article that gives an introduction to this topic.

  2. Using a dll: If the program itself calls into a set of dll files that contain the core functionality of the program we can call into those same files.  There is an adapter (C/C++ DLL) that is designed specifically for this purpose.  Here is a brief overview of this adapter type in TestStand.

  3. Using Command Line: You can open an executable using the Call Executable step and passing in command line arguments via the Argument Expression parameter.  You might also be able to use LabVIEW and the System Exec.VI to use the command line to control a program if it will accept such an interface.

Basically TestStand can only interface with a program if it has some sort of exposed interface or function library to which we can refer.  If LabVIEW can interface with it though, we can call LabVIEW VIs from TestStand so that would give us an additional resource.  Otherwise you would be left with trying to create complicated code that would probably be as you illustrated, moving the mouse to specific locations and emulating interactions with the GUI.  I hope this information is helpful, but feel free to post follow up questions if you have any.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,682 Views)
Thanks for the response.
 
Code coverage tools identify which lines of code (or in Labview - which wires) have been executed based on program execution.  Combining the results for multiple runs (for example, in a test suite) can be used to see if your test case covers all lines of code.  Combined with profiling tools, it can show what is the critical path.  Another useful tool is decision coverage.  With decision coverage, a code can be checked to see that different possible paths are included in the test cases.
 
 
0 Kudos
Message 3 of 6
(3,678 Views)
I don't thinke a code coverage tool exists for LabVIEW. You could write one with Xnodes but that would give you a lot of DB control.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 6
(3,663 Views)

Thanks for the link.  I am completely new to Labview and I am examining its possibilities for writing GUI applications (no data acquisition).  I know that you can write documentation into the VI.  However, are there automated documentation generation programs?

Thanks

Will

0 Kudos
Message 5 of 6
(3,642 Views)

Hi WilliamLee,

I don't know of any tools for automatic comment generation in a LabVIEW VI.  The graphical nature of the G language may make this difficult;  In any case, the VI file format is a closed, proprietary and, hence, I doubt there are third party tools that would be able to do this.

I recommend you file a product suggestion on our website if you feel this feature would be useful.

 
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 6 of 6
(3,612 Views)