LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to put a wrapper around a labview app such that a script is essentially read and the appropriate key strokes made simulating a person actually being there and changing control values

we have an application where we would like to “script” several runs of a labview VI suite I have already developed. The most straight forward way for me to do it would be to have some kind of a wrapper that could set variables based on a script and even hit OK buttons, simulate key strokes such as “CTRL+F1”, “Enter”, etc. The first thing I was wondering was if this was something teststand can do? I have not used teststand so have no idea. Essentially I want to put the wrapper around this test suite to basically act as a human with very minimal change to my existing code. If there were a way that I could have a script file of key strokes that was “played” that would work too. Does any of this sound doable or out of the realm of reality. If doable how would you recommend? (labview, teststand, ?)

Thanks and have a good day
0 Kudos
Message 1 of 3
(2,910 Views)
The testing of numeric controls and indicators can be done with either TestStand or LabVIEW. NI even used to sell a toolkit for doing this. You basically took your VI and put it inside a for loop. Outside the for loop, you created arrays with a range of values that you wanted to use to test your VI with. Complex programs that might pop up several subVIs that require interaction get a lot harder. I don't know of an easy way to write a script that says "send a click to this specific button if this window shows up or send a a click to another button if a different window pops up". In theory, I suppose it could all be done with VI Server but I think it would be a major task. Software testing of Windows GUI programs is often done by third-party tools (I believe Rational Software makes one) but these are usually pretty expensive and I'm not sure any would work with a LabVIEW front panel.
Message 2 of 3
(2,893 Views)
Hi,

TestStand is a test management software. It is a test executive for sequencing and managing automatic test programs. It acts like a frameworks and calls code modules (written in LabVIEW, LabWindows/CVI, Visual C/C++, Visual Basic .NET, and C#.) in a organized fashion, generates reports and logs your results.

So essentially TestStand can help you by taking the place of the "Wrapper VI" that you are looking for. There is an online demo of TestStand located at
http://digital.ni.com/demo.nsf/websearch/1B5075DA5D4F4D0286256D78005195DC?OpenDocument&node=1457_US

However testStand cannot really sent keyboard strokes to your application. It can pass parameters to your code modules. There is an example created in LabVIEW that simulates all keyboard strokes. I believe this example will help you or might be exactly what you're looking for. The example is located at
http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=B123AE0CBA2B111EE034080020E74861&p_node=DZ53008&p_rank=&p_source=Internal&p_submitted=N

If you look at the block diagram, if will show you how to send keyboard strokes. I hope this helps.

SijinK
National Instruments
0 Kudos
Message 3 of 3
(2,858 Views)