Unit Testing Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Test Framework lvtest opens blank and when I try to run it it reports that the class cannot be loaded

Solved!
Go to solution

I spent several hours trying to figure this one, so I thought I would share in case anyone else runs into this. I also reported via Service Request #7746280. Hopefully, NI can file a CAR for this issue and maybe it gets fixed one day.

 

Background:

LabVIEW 2018 loading a project saved on LabVIEW 2017

The project included several demonstrations of different unit test tools, among them JKI VI Tester. 

LabVIEW 2017 did have JKI VI Tester installed

LabVIEW 2018 did not have JKI VI Tester installed

The unit under test is a class method, but the object is not used at all for the test.

 

Problem:

when opening the project in LabVIEW 2018 and attempting to run the Unit Test Framework tests, the test reported an error.

When opening the lvtest itself, it was blank, no test case name no inputs, no outputs. When attempting to import values from VI a message would pop up telling me that I needed to refresh the test. After refreshing another message popped up explaining that the class couldn't be loaded. 

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 3
(2,021 Views)
Solution
Accepted by topic author FabiolaDelaCueva

Solution:

 

Install JKI VI Tester for LabVIEW 2018. 

Unit Test Framework tests work like a charm.

 

What I think the problem was:

Unit Test Framework somehow cares about the other classes in the project, even though the unit under test is only calling a class that is valid and fully functional. 

The error about the class not being able to load did not refer to the class in the unit under test but to the other classes present in the project for JKI VI Tester. Since JKI VI Tester was not installed, the classes could not be loaded. 

Once I installed JKI VI Tester, all classes in the project could be loaded and the unit test worked again.

 

What I would like for NI to do:

Fix the Unit Test Framework so it only looks for the classes that are related to the unit under test and disregards if there are broken classes in the project.

 

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 2 of 3
(2,019 Views)

 CAR 707315 filed by NI regarding this issue.

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 3
(1,940 Views)