LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Testing with Unit Test Framework when the expected output is an array of NaNs reports a false PASS

Solved!
Go to solution

This is a cross post from the Unit Testing Group:

https://decibel.ni.com/content/message/121915#121915

 

I remember having this issue with the older version of the Unit Test Framework, but alas, it is still present in the new version.

For this, I am using LabVIEW 2015.

 

A customer contacted me asking what to do, because the expected output was array of NaNs and the VI under test was returning an array of numbers and yet, the test was passing!!!

 

My suggestion to use as a workaround was to create an User Defined Test that would test for the array of NaNs. I was wondering if anyone here had found this issue and if you had any suggestions other than the User Defined Test.

 

Before someone suggests that we move to JKI VI Tester for this particular project, I can tell you that we are using UTF and not JKI VI tester because the customer is in a regulated industry.

 

A video describing the problem and the workaround (via User Defined Tests) is here: https://youtu.be/AoBe-Gw2Nzo

 

Question: Is using an User Defined Test is the best approach? Are we missing something in how the Unit Test is defined that is resulting in the Unit Test Framework false reporting that the test passed?

 

Thanks,

Fab

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 1 of 4
(3,880 Views)
Solution
Accepted by topic author FabiolaDelaCueva

Hi Fab,

I was able to replicate the issue on my machine and I observed the same results. From what I see in the video it looks like you're defining the unit test fine. I suspect that this is related to a bug rather than your test configuration so I submitted a report on this issue to be reviewed by R&D.

Moving forward, I agree that a User Defined Test is the best workaround in this case. If this meets your customer's needs then I recomend continuing on with this option.

0 Kudos
Message 2 of 4
(3,811 Views)

@Call.Me.Wilbur wrote:

Hi Fab,

... I submitted a report on this issue to be reviewed by R&D.



Would you please share the CAR number with us?

 

Thanks,

Fab

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 4
(3,781 Views)

Yep, the CAR number is 554457.

0 Kudos
Message 4 of 4
(3,777 Views)