Test a Channel Wire Using the Unit Test Framework Toolkit

Updated Oct 17, 2018

Reported In

Software

  • LabVIEW

Issue Details

I have a VI that has a channel wire as an output. I want to test this VI using the Unit Test Framework Toolkit. How can I assign which values to expect from the channel wire?

Solution

Due to the nature of channel wires, it is problematic to configure a unit test because the terminals to the unit under test are never going to be connected to a channel.

One way around this is to create a user-defined test. The idea is to test indirectly the VI by creating another VI that runs the VI and does all of the comparisons, setup, and teardown we would like it to do and then send out a Pass boolean (the .lvtest just checks the pass boolean).

Additional Information

Channel wires work like a smart queue. One thing that makes it "smarter" is that if it does not sense a reader/writer pair it will error out. This is problematic for configuring the unit test like you are because the terminals to the unit under test are never going to be connected to a channel.

WAS THIS ARTICLE HELPFUL?

Not Helpful