Unit Testing Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with NI UTF not generating a report together with LabVIEW CLi

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.  

 

0 Kudos
Message 1 of 6
(5,001 Views)

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..

Error Generating Function.PNG

And I am sure that it should generate a report even though there is a error in one of the UT.

0 Kudos
Message 2 of 6
(4,937 Views)

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.

 

 

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 3 of 6
(4,922 Views)

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.

 

 

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

Thanks Fabiola, I've created a NI support case for it yesterday Service Request #7765572 and I have just been talking with themSmiley Happy

Message 5 of 6
(4,884 Views)

Thanks

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