Unit Testing Group

cancel
Showing results for 
Search instead for 
Did you mean: 

JKI VI Tester and Command Line

Hi all,

I am trying to combine Jenkins with the VI Tester, to do so I am thinking on calling the VI Tester from the command line, though I cannot find any information about this in the JKI forum or the VI Tester Help.

Also, Casey Lamers gave a presentation in the LAF showing how to use the VI Tester for CI, but the presentation is not available yet . Any idea of where I can find information in regards to either how to call the VI tester from the command line or how to combine it with Jenkins?

Thank you,

Jarobit

PS. I am pretty new in terms of CI so sorry if I said anything that does not sound right.

0 Kudos
Message 1 of 14
(12,112 Views)

Hi Jarobit,

The presentation is available on youtube (check out my twitter, fab sent the link on there to me)

Unfortunately the technique showed was for using an intermediate server written in LV, I would *love* to get it working as a command line interface as I've realised it will be the easiest compatibility wise with Jenkins (and all other CI servers in the future) but haven't had a chance to delve into this myself yet.

There were some older presentations from JKI from a couple of years back (maybe NI Week 2012?) on doing this using command line and files for communications, might be worth going back through their blog about that time to see if there are any details.

Let me know if you find anything else!

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 2 of 14
(9,323 Views)

James,

Is the presentation available?? I believe that it is only hte Jenkins one, but Casey's was not recorded and he has not shared not the slides yet (I believe).

James_McN wrote:

Unfortunately the technique showed was for using an intermediate server written in LV,

Yes, this was also my impression, but I don't know why I thought that was something JKI provided with as well? Probably not though.

I have also seen Omar's presentation, but he does not mention anything about the VI Tester. He says he uses a batch file yes, but how do I collect the VI Tester results??

I love the VI Tester, but the fact that I cannot combine it with a CI Server is being an issue at the moment.

0 Kudos
Message 3 of 14
(9,323 Views)

Sorry your right, I'm getting confused. There was a second presentation billed but I haven't seen evidence of it anywhere as you say.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 4 of 14
(9,323 Views)

Jpina wrote:

I love the VI Tester, but the fact that I cannot combine it with a CI Server is being an issue at the moment.

I agree, all of my Javascript is now going through CI. My testing on LV is quite incomplete but I want to solve this problem in the next few weeks. I'll let you know what I'm looking at but I think basically if we can find a solid way of doing console out (and return code) from LabVIEW then the rest should be easy.

We can just wrap a LabVIEW VI that can be called from the command line.

We could then package it to include other functions easily, but I think the console part is the main issue.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
Message 5 of 14
(9,324 Views)

I definitely use VI Tester from the command line as part of the Jenkins CI toolchain.

Command Line Unit Testing.png

We hired JKI to set up out CI system.

At the CLA Summit (2015) they announced these tools as being free (and I think open source through GitHub??).

I would contact JKI for the tools. Then you need to call them from the ANT script file in Jenkins.

Casey

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

Message 6 of 14
(9,324 Views)

James_McN wrote:


but I think the console part is the main issue.

Agreed, and the thing is that there is no info about it :S

0 Kudos
Message 7 of 14
(9,324 Views)

To start and control UnitTest I wrote a small LV-Application who will called by Jenkins. This Application is called as a cmdline tool like "LabVIEW.exe -- args" and this starts the Unit Tests dependend on the given args in the command line. In a similar procedure like JKI does. I think the presentation and demo code is still available on the JKI site.

The only problem still exists, is to bring the result in a supported xunit format. But it should be possible to convert the results from the UnitTest format in the junit xml format in the LV application so then Jenkins can collect it.

ATML seems to be a better result format but unfortunately Jenkins xUnit Plugin doesn't support ATML result files but there is a possibility to transform it directly in Jenkins Unit Test Plugin by a custom xsl (https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin)

_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
0 Kudos
Message 8 of 14
(9,324 Views)

Hi,

Are you talking about the Unit Test Framework or the JKI VI Tester? I am trying to use the JKI VI Tester.

kubes_ch wrote:

I think the presentation and demo code is still available on the JKI site.

What presentation are you referring to?

Thank you,

Jarobit

0 Kudos
Message 9 of 14
(9,324 Views)

HI

Sorry, yes im talking about the Unit Test Framework, not the JKI VI Tester. But the described approach is similar. I remember there is a VI Tester API which you can use to run tests automatically (since V1.1) but i never used it.

As inspiration I used this presentation here: http://blog.jki.net/news/niweek-2012-fire-and-forget-bulletproof-builds-using-continuous-integration... there is also a sample code available http://blog.jki.net/wp-content/uploads/2012/10/JKI_CI_SERVER_PRESENTATION_Public-Source-Distribution...

Matthias

_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
Message 10 of 14
(9,324 Views)