LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Testing Framework Error with User-Defined Test VI

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.

0 Kudos
Message 1 of 5
(2,648 Views)

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.

0 Kudos
Message 2 of 5
(2,646 Views)

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?

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

Nope. Sure can't. So I don't have any other ideas.Smiley Sad

0 Kudos
Message 4 of 5
(2,635 Views)

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.

CLED (2016)
0 Kudos
Message 5 of 5
(2,593 Views)