LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate control label preventing creation of unit test using UTF

Hello Everyone,

                   I was trying to create a unit test for a VI using the unit test framework (evaluation version) to try out this tool.  I have two questions regarding that.

 

1. Several sub-VIs are called by this VI. I wanted to create a unit test for each of these sub-VIs so that I could test each of them separately. But UTF provided me with the option to create a unit test for the main VI alone. The main VI is huge and getting 100% code coverage is going to be a challenging task. Is there a way by which I can create unit tests for the individual sub-VIs?

 

2. When I tried to create the unit test for the main VI, I got an error saying: Cannot create a test from this VI. Contains the following duplicate control labels. This is because the same indicators are being used in different cases within a case structure.

 

Is there anyway to resolve this issue?

 

Thanks

0 Kudos
Message 1 of 4
(2,415 Views)

How can the same indicator be used in different cases of a case structure?

That shouldn't be possible. Normal you would use local variables or property nodes to write to a indicator from multiple places. ( Not that is it a good design to have multiple places where a write to a indicator happens. )

0 Kudos
Message 2 of 4
(2,406 Views)

If I understand what the problem is you have to controls or indicators that have the same name. To fix this you need to give them unique names. If they need to say the same thing on the user interface then you can use the caption and change the name on that so they both have the same name.

Tim
GHSP
0 Kudos
Message 3 of 4
(2,403 Views)

In my program i'm using property nodes for diffrnt indicators and controls. I'm also getting the same error while executing unit test. (The VI contains following duplicate control labels)

0 Kudos
Message 4 of 4
(2,310 Views)