Unit Testing Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Unit Testing a built PPL

Solved!
Go to solution

Hi all,

 

My question this time is regarding automated testing of a built PPL.

 

To save the long reading, the question is can I carry out the "Replace with Packed Project Library" action via VI Server, or is there a better way to do something like that?

 

If I write a library in a project, and add tests to that same project (I'm using JKI VI Tester, which may or may not be important...), then my test files, e.g. test_ThisThingBreaksWhenErrorIn.vi depend on the VIs in the library, e.g. myLib.lvlib:thisThing.vi

 

If I want to test before building, this is the way that I need to set up the tests (and obviously I do want to test before - saving building broken versions, for example).

 

If I want to also test that the built PPL behaves in the same way, I can save a copy of all of my testing VIs/classes/libraries and then open them in a new project, and choose Replace with Packed Project Library... from the right-click menu for the library I want to test. Selecting the new PPL file and running the tests works out fine (so long as the tests don't require access via Friend/Community scope - I don't remember if that works or not right now).

 

Coming to the crux of the problem - this results in two copies (on disk) of my testing code, which must be updated side-by-side as needed. I'd prefer to avoid this. In order to put this all into an automated build system (like Jenkins + LabVIEW CLI + ...) it would be nice if I could additionally clone a new copy of the tests from Git each time, then after building, programmatically update the dependency.

 

Is there a way to Replace with Packed Project Library using VI Server, and some reference to something? (I didn't find it under Project, TargetItem or Library properties or methods, but perhaps I missed it).

 

Alternatively, is there a better way to do this?


GCentral
0 Kudos
Message 1 of 3
(4,668 Views)
Solution
Accepted by topic author cbutcher

Hi Christian, 

 

You will find the Invoke Node you are looking for in the attached VI (saved in LabVIEW 2016).

Let me know if you need it saved with an earlier version of LV.

Unfortunately, I cannot detail here how I was able to find that Method, but feel free to contact me with a private message if you want more info.

 

Cheers!

Matthias.



Matthias Baudot | Software Architect | Founder at STUDIO BODs | DQMH® Consortium Board Member


STUDIO BODs     BLT for LabVIEW     LabVIEW Champion     Certified Professional Instructor     DQMH Trusted Advisor     GCentral Sponsor


 Check out my LabVIEW presentations and videos!

Message 2 of 3
(4,652 Views)

Hi Matthias,

 

That's fantastic - thank you. I should have searched more closely - apparently only one of the two physical computers I work on has the appropriate switches/keys to be able to find this kind of thing!


GCentral
0 Kudos
Message 3 of 3
(4,629 Views)