Jump to content

Your favorite unit test solution for LabVIEW


Recommended Posts

Hi,

I tried to search LAVA but couldn't find this topic. So my question is, what is your favorite unit test environment you are using to run unit tests on your LabVIEW code? What is good in the solution you are using and what are the limits of the solution? Please share your experience.

Tomi

Link to comment

You may have seen this: http://zone.ni.com/devzone/cda/tut/p/id/3586

It's a unit test frame work that you can use with LabVIEW.

For most of the LabVIEW applications I work on, I am the only developer and I write my own unit tests, but don't use an automated test system. I keep a subdirectory under my main VI called 'Unit Tests' where I test out some of my SubVIs. I try write my SubVIs with unit testing in mind. So instead of writing a SubVI called 'save data file', or 'send data over UDP' I might write one called 'generate data file contents' or 'generate UDP packet contents'. That way I can easily write a unit test that displays what the data would be on the screen in a string indicator, instead of writing actual data to disk or the network.

- Alex

QUOTE(Tomi Maila @ Feb 14 2007, 01:20 PM)

Hi,

I tried to search LAVA but couldn't find this topic. So my question is, what is your favorite unit test environment you are using to run unit tests on your LabVIEW code? What is good in the solution you are using and what are the limits of the solution? Please share your experience.

Tomi

Link to comment
  • 1 year later...

QUOTE (Tomi Maila @ Feb 14 2007, 05:20 PM)

Hi,

I tried to search LAVA but couldn't find this topic. So my question is, what is your favorite unit test environment you are using to run unit tests on your LabVIEW code? What is good in the solution you are using and what are the limits of the solution? Please share your experience.

Tomi

I use a technique I got from my collegue who delveloped LuaVIEW. It is simple VI that sits in the root of all my project directories and on startup scans the entire subdirectory hierachy for folders having the name "unit tests". Any VI in there having a predefined connector pane that returns a boolean will be loaded and presented in a list. The UI allows to then run all tests or individual ones and the result of the run is shown. The UI also has options to directly open the front panel so that when a test indicates failure I can go and directly debug it.

Very simple and trivial but quite effective. The only drawback is having to write the actual unit tests :rolleyes: , but that is a problem every unit test framework has.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.