05-07-2020 09:11 AM
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
Solved! Go to Solution.
05-07-2020 04:14 PM
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?
05-11-2020 06:31 AM - edited 05-11-2020 06:33 AM
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
05-11-2020 10:59 AM
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.
05-11-2020 11:25 AM
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
05-20-2020 10:27 AM
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.