03-15-2016 03:40 PM
What we need
Does anybody know where we can find either one of the following or all:
Project version UTF version
2009 2009
2010 2010
2011 2010
2012 2010
2013 2013
2014 2014
2015 2015
Background
We have been working with a customer who is upgrading their LabVIEW code from 2009 to 2015. They have some Unit Test Framework tests (.lvtest files) that are proving extremelly challenging to migrate between versions. Yes, some of the problems described below are a result of neglected unit tests and they were not designed with unit test maintainability in mind. We are working on refactoring the unit tests so they are not trying to test too much and become a nightmare to maintain. However, we believe that upgrading existing unit tests between UTF versions should not be this painful. If the UTF is not going to upgrade them correctly, at least we would expect NI to publish the specification of the .lvtest format to help us with the upgrade process.
Issues and how we solved them
During the upgrade process, we encountered the same issue described here: https://decibel.ni.com/content/message/125560#125560 and addressed it by creating a custom VI Analyzer test that looks for the following UTF illegal characters in labels : \ / \n
Please note that these were not illegal characters before UTF 2013.
We also encounted several other issues, and fixed them as follows (by opening the .lvtest files in Notepad and making the following edits):
1. We replaced all the backslashes in the files with forward slashes (and updated the separation character in the files). This is listed in the .lvtest header and for whatever reason it was different in some of the tests.
2. There were several .lvtest files that had space characters escaped with "\20". We replaced those with spaces.
3. There were several .lvtest files that used braces ({ and }) as array element identifiers instead of brackets. We replaced those with brackets.
4. There were several instances where array element names were part of the full name, which we discovered didn't work so well with UTF 2015. We removed those. We noticed them in both nested clusters, as well as leaf-level array elements.
5. There were a few .lvtest files that wouldn't open in LabVIEW, and gave an error message about a duplicate control name in the VI. We didn't find any duplicates of the control name specified, but we did notice that the name of a top-level cluster in the .lvtest was different than the name of a top-level cluster in the VI. So we edited the VI to have the same control name as specified in the .lvtest file, and the files opened fine.
These fixes involved a great deal of trial and error by comparing file formats of the different versions. If we had had a specification document, it would have been much easier to go directly to our files to upgrade and verify they met the specification for the new UTF version we were moving to.
So, if anyone knows where to find these specification documents for the .lvtest format and can point me in the right direction, I would greatly appreciate it.
Thanks,
Fab
09-14-2016 10:17 AM
Update.
Chris Relf found the following help documents outlining the .lvtest files. It is not complete and it doesn't really outline the differences between versions (you have to go to each version and do it yourself). However, this is much better than nothing.
Tests and .lvtest Files (Unit Test Framework Toolkit) Help:
http://zone.ni.com/reference/en-XX/help/372584A-01/lvutfconcepts/utfc_test_config/
http://zone.ni.com/reference/en-XX/help/372584B-01/lvutfconcepts/utfc_test_config/
http://zone.ni.com/reference/en-XX/help/372584C-01/lvutfconcepts/utfc_test_config/
http://zone.ni.com/reference/en-XX/help/372584D-01/lvutfconcepts/utfc_test_config/
[Edit] Adding .lvect links as well:
http://zone.ni.com/reference/en-XX/help/372584C-01/lvutfconcepts/utfc_test_vector/
http://zone.ni.com/reference/en-XX/help/372584D-01/lvutfconcepts/utfc_test_vector/
Now if I only had had Chris Relf's magic search abilities, I would have found them back in March when I needed them
Hope this post helps others in the future.
Regards,
Fab
Message was edited by: FabiolaDelaCueva
09-14-2016 10:39 AM
FabiolaDelaCueva wrote:
Now if I only had had Chris Relf's magic search abilities, I would have found them back in March when I needed them
The secret to my magic search abilities: google! I was looking for a resource that listed the file extensions used by UTF, and these popped up in the search results...