11-11-2018 07:44 PM - edited 11-11-2018 07:46 PM
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?
Solved! Go to Solution.
11-12-2018 07:53 AM
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
11-12-2018 07:56 PM