02-12-2019 03:20 AM - edited 02-14-2019 05:58 AM
We have started to use the NI UTF together with LabVIEW CLi. The NI UTF is working fine when there the Unit Test are configured with valid VI's, but when a NI UT is "broken" no report XML is generated. We are of course getting an error in the dos prompt but I would expect that the report is generated regardless the error a specific Unit Test is generating.
(Error -25240 occurred at an unidentified location Possible reason(s): Unit Test Framework: The path to the VI under test is invalid.)
Is this intended behavior?
We are using the project approach as described here: Predefined Command Line Operations (Unit Test Framework Toolkit) together with the JKI Junit Report library.
H:\>labviewcli -OperationName RunUnitTests -ProjectPath "C:\git\THS_Modules\ProjectFiles\THS SICS - UT.lvproj" -JUnitReportPath c:\Temp\test.xml LabVIEWCLI started logging in file: C:\Users\MyUser\AppData\Local\Temp\lvtemporary_176012.log "LabVIEWPath" command line argument is not passed. Using last used LabVIEW: "C:\Program Files (x86)\National Instruments\LabVIEW 2017\LabVIEW.exe" LabVIEW launched successfully. Connection established with LabVIEW at port number 3363. Operation output: Error Code : -25240 Error Message : NI_UnitTestFramework.lvlib:utf_create_error.vi<ERR> The path to the VI under test is invalid. An error occurred while running the RunUnitTests operation. RunUnitTests operation failed.
02-26-2019 01:47 AM - edited 02-26-2019 01:48 AM
Together with Jeppe Lohse from GPower we have found where the error occurs. I have made an small example that can produce the error,see the attached MyUTF_Test.7z. The example can be executed with the following:
labviewcli -OperationName RunUnitTests -ProjectPath "YourPathTo\MyUTF_Test\MyUTF_Test.lvproj" -JUnitReportPath c:\Temp\test.xml
The error is in the C:\Program Files (x86)\National Instruments\LabVIEW 2017\vi.lib\NI\UTF Junit Report\create junit report.vi, see the picture..
And I am sure that it should generate a report even though there is a error in one of the UT.
02-26-2019 03:05 PM
I will make some noise on my end to see if we can get someone from NI to respond.
You could also create a service request and point the Applications Engineer to this post.
02-27-2019 02:30 PM
Hi kjeld,
I've filed CAR 730330 for this behavior and forwarded it to our development team.
At this point I'm not sure if this is what we intended or not, but I've provided the feedback anyway. I agree with you that the VI you've found ("utf_read_file.vi") is just checking for any bad VI paths and generating error -25240. I've pointed this out to our dev team, and we'll have to decide if making a report regardless of this error is something that should happen.
02-28-2019 03:28 AM
Thanks Fabiola, I've created a NI support case for it yesterday Service Request #7765572 and I have just been talking with them
02-28-2019 03:30 AM
Thanks