05-05-2011 11:49 AM
I am trying to use my own user-defined test VIs in the Unit Test Framework. For a few of my VIs under test, I get the following error when I try to run the test file:
--- Test Execution Error
----- VIUnderTest.vi
------- VIUnderTest.lvtest
Error Description
Possible reason(s):
LabVIEW: VI Reference is invalid.
Has anyone ever seen anything like this before? The output is the same as other successful test files I've created (pulled directly from the Unit Test Framework example in the help files), tied to the output of the user-defined test. I've tried stripping some of the functionality of the failing VIs under-test, but still get the same error.
I've confirmed that the VIs under test show up in the project item hierarchy. Any guidance or troubleshooting suggestions would be greatly appreciated.
05-05-2011 11:59 AM
Does the VI you are testing require a reference to work? For example, does it read and close a file, but the open step is in another VI? In that case you'd need a setup VI to supply the reference.
05-05-2011 12:10 PM
No, it doesn't. Also, as far as I know, you cannot change setup/teardown options when you are using a user-defined test VI. Is this not the case, or am I perhaps using user-defined tests incorrectly?
05-05-2011 01:32 PM
Nope. Sure can't. So I don't have any other ideas.
10-27-2011 07:28 PM
I just encountered the same thing. I think it happens when you change a unit test to use the user defined test. Recreating the unit test worked. Unchecking, "use user-defined test vi" option, going to the test cases, deleting the test cases, and then rechecking the check box may also fix your unit test. I hope this helps someone in the future.