LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Test Framework + lvlib

Solved!
Go to solution

I'm using LV2017SP1

 

I've got some related VIs in an lvlib.  I'd like to generate some tests for them with the Unit Test Framework.  I context click on a VI and select Unit Tests>New Test and I end up with the error:

 

"An error occurred when creating tests(s).  LabVIEW cannot create a test for this type of file.  Vi name "<My VI Name>.vi"

 

I extract the related VIs from the lvlib and add them to a project file.  I can then create tests for them successfully.

 

Does the Unit Test Framework work for VIs in an lvlib?

 

Thanks for the help...

 

Denis

0 Kudos
Message 1 of 6
(4,608 Views)

I only have 2019 on my computer but things seem to generally work. I also couldn't find any bug reports that seem very related so could you attach a .zip of a LabVIEW project and instructions on what you need to do to get that error?

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 6
(4,562 Views)

Matt,

 

Find attached a simple lvlib with a dummy VI that replicates the problem.  See the example video.  I also opened a service request (7806262)

 

Thanks

 

Denis

Download All
0 Kudos
Message 3 of 6
(4,516 Views)

The video helped me figure out what we were doing differently. I was not receiving any errors because I was working out of an lvlib that was inside of a project which seems to work fine. I couldn't find any bug reports for that specific behavior but the engineer handling the SR can do a more thorough search and file a bug report if one does not exist.

 

As a workaround you can just create an lvproj to put your library in and open that to create all of your unit tests.

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 6
(4,507 Views)

Yes, I can confirm that things work if the lvlib is in a lvproj.  I can create an lvtest file and save it in the lvlib.  I can edit it in both the lvproj and lvlib.  However trying to run the lvtest file with only the  vilib open gives me an error of "The application input terminal is invalid" even though I can successfully run the lvtest when the lvproj is opened.  All in LV2017

 

 

0 Kudos
Message 5 of 6
(4,502 Views)
Solution
Accepted by topic author DJ_001

Confirmed by NI. Bug Number: 1034826

 

The work around seems to be to open the lvlib in a project and implement your unit tests with the project file.

0 Kudos
Message 6 of 6
(4,448 Views)