LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Build System for LabVIEW

This is one of the "big picture" strategy goals for us.  Automating tedious tasks scales to greater productivity which scales to meeting deadlines on time and in budget.  Super important stuff!

I am interested in both helping as a part of a community effort to implement this within LabVIEW natively, and, now that I have read what Lief is doing, looking into Hudson as well. 

I have been learning from a friend of mine who works at Symantec here in the UK how these big development houses manage programs and processes across teams, geography, versions, fixes etc.  It's not trivial stuff. 

This may be a generalisation, but I find that most of us LV wonks are Engineers who are forced slowly into "best" software processes as our projects get bigger and we are forced to expand our efforts from one-man projects to teams.  Knowing and implementing some of these processes (and automating) some of them is the way forward.

We do have a blog, and I would love to share what we learn as and when we learn it wi th anyone who is interested.  Let me know

Wes

Cyth Systems, Europe

wes.Ramm@Cyth.com


--------------------------------------------------------------------------------------
Wes Ramm, Cyth UK
CLD, CPLI
0 Kudos
Message 11 of 29
(1,189 Views)

Recently the main developers of Hudson decided to fork their work into a new project called Jenkins ( http://jenkins-ci.org/ ).

The reason for this (if I understood it correctly) was that Oracle owns the rights to the name "Hudson CI" and couldn't guarantee the free open-source future of this project, at least not in a way that the community accepted.

Note that Hudson still exists and is being developed by Oracle (I assume), but most of it's original developers has moved over to Jenkins.

I just thought that you should be aware of this if you're in the process of selecting a CI-system...

/Leif

0 Kudos
Message 12 of 29
(1,189 Views)

For those of you that are interested in an API for the LabVIEW Applicaiton Builder, I would strongly recommend that you get your hands on this year's Beta version of LabVIEW 2011 (when it becomes available this spring, at which time you can sign up at ni.com/beta).  Without offering any gaurantees, I think you'll be pleased to see that we've productized several of the functions necessary to automate your build process.

Elijah Kerry
Chief Product Manager, Software Platform
_______________________________________________
Follow my Software Engineering for LabVIEW Blog
0 Kudos
Message 13 of 29
(1,189 Views)

I'm also trying to do something similar with pretty much the same setup but am facing a problem.

- I've got the slave which has LabVIEW Developer installed and running the Jenkins service.

- On the Jenkins server, I've setup a simple job to test things out: cd to the LabVIEW directory and try to launch LabVIEW (using Windows batch exec commands)

However, when the slave runs this job, it just keeps running: LabVIEW doesn't launch and the job doesn't finish! I have to abort the task manually.

Not sure what could be wrong, any insights you could provide would be most helpful...

0 Kudos
Message 14 of 29
(1,189 Views)

This is a great thread guys and I'm glad I've found it.  I have been running automated builds from a CI server I build in LabVIEW for our company for some time now and am moving it over to hudson to align with our C#, Silverlight and JAVA toolset all in one place.  The builds themselves are simple in hudson, its to automated unit testing. I already build VIs to do programmatic unit testing and then email specific project results to specific people (all configurable of course by our developers) and the unit tests are all saved within the projects.  It uses perforce for source control, unit test framework and several LabVIEW VIs custom built to do all this.

I'm wanting to move things over to hudson and might look to convert the LabVIEW unit test results into a XML format that another plugin already supports such as NUnit, then I can have full testing reports and trends integrated into hudson, which is really why I want it since my own CI server works good for simple stuff.  I'd also like the same capabilities with our code coverage analysis by converting the LabVEW results into another plugins XML format.

Has anyone interest in this as well or already done work with hudson and unit testing or hudson and code coverage?  I always would like some scanner plugins for VI analysis but havne't started yet looking at the plugin system for hudson.  Was just interested in see first if others have attempted any of this.

Please let me know if you have!!!

Derekchang: I think you need to ensure your code (I assume it is a LabVIEW VI to make your builds programmatically) has an exit labview in it when completed so the process finishes and can return to your CI server.

0 Kudos
Message 15 of 29
(1,189 Views)

I've ended up creating some simple scripts from LabVIEW to automated the unit tests and build processes and it saves out the results to be captured and returned to hudson.  This allows me to use hudson for all the builds, the email reports, the plots and trends of test results and code coverage and everything I needed.  I thought I better post this in case others are interested to know, it is quite possible to integrate labview with hudson for continuous integration.

Message 16 of 29
(1,189 Views)

Hello Mike

We are planning to use the Hudson for automatic Building our Labview Application.

Can you tell me more how you integrated labivew with hudson?

0 Kudos
Message 17 of 29
(1,189 Views)

Sure thing.  We used the existing LabVIEW APIs or tools for programatically building applications, as well as programatically running unit tests.  I built some wrapper VIs aroudn those to use argument inputs from the command line so that they could easily be executed from hudson (now we use Jenkins since its still open source, its compatible).  The argument inputs indicate the project file, the unit test result file to log output to and a couple of custom options we added to plot all the results using a CSV file and a PLTO plugin in jenkins.  This allows us to graph the VI metrics, code coverage metrics and # of tests passed/failed/etc for each system we use in jenkins.

We did the same work with arguments for our build process, allowing us to easily configure in command line options what targets and applications to build.  Similarly, some result files are stored as well to file.

Our jenkins system is now a full continuous integration server for each of our branched release streams from perforce, our unit testing is done as code is submitted, if successful, the builds run, LLBs get auto generated from application builder and all of our installers are built as well.  This has allows to have a consistent build everytime for our LabVIEW code.

We use jenkins for our C#, Silverlight and JAVA development areas as well so we not have consistent use in all technologies, which is a HUGE benefit.

I'll be away on holidays, but another developer whos most familiar with this might have some other tips for you.  I'll send him the forum to monitor as well other questions.

We'd be happy to help answer other questions so you can get started with it as well.

Message 18 of 29
(1,189 Views)

Hello Mike,

I am thinking about my build system of a large LabVIEW app, currently it is a automated but in a self-made python script that calls LabVIEW API to build application. I'd like to switch to Jenkins, did you write a plugin for building LabVIEW application with it? If yes could you share with others?

0 Kudos
Message 19 of 29
(1,189 Views)

Hi Charles,

Mike is my manager and he is currently on vacation. We do not have any specialized plugin to configure this. Jenkins is capable of executing Windows batch command. So we just configured Jenkins to run windows commands to call LabVIEW with custom parameter such as LabVIEW project location, build specs, logging outputs, etc. Of course, you will need to write your own wrapper VI to catch these parameters then call LabVIEW APIs (Unit Tests, Builds, etc) to do what you want.

In short, the flow diagram will be something like:

Jenkins ---(Win cmds w/ arguments)---> LabVIEW ---(starts)---> WrapperVI -------> perform your task

Let me know if you have more questions, I will do my best to help.

Tony

-------------------------------------------------------------
LabVIEW 2011 newbie >.<

Certified LabVIEW Developer
Message 20 of 29
(1,189 Views)