Posts Tagged ‘junit’

Enterprise ready situational applications

Friday, February 6th, 2009

Where I was at: I quickly needed to expose some information. So using my laptop I created some Project Zero services written in Groovy that exposed the information via JSON and some pretty charts. My laptop is constantly in and out of its docking station. So in order to make the information available I cloned the Project Zero setup on a server and scp’d the changes across whenever I made local updates. All was fine.

Where I got to: A colleague then needed to create some additional services based on some of the work I had already done. So they cloned the Project Zero setup to their laptop and scp’d across any changes they made to the server. So as you can imagine, at this point we got into the position where we were occassionally overwriting each others updates on the server image. We needed change management.

Where I’m at today: I brought in Rational Team Concert (RTC) to act as a source code repository and change management environment for the Project Zero code. Into RTC I installed the codehaus Groovy plugin for Eclipse to provide me with Groovy syntax highlighting. A quick ant script later and I was able to deploy all the changes to the server on demand. Not stopping there, I decided that I was also fed up of breaking existing services when I was hacking away at the code. So with RTC being built on Eclipse I knew that JUnit came bundled by default. So, with a quick implementation of HTTP requests using the HttpURLConnection class (which is also bundled with Java) I then had a nice JUnit test suite to (literally) give me the green light before I check any changes in. Not only this, but my colleague then synchronized the changes into their RTC client where it picked up the JUnit tests and was able to run them on their laptop.

Project Zero, Groovy, Rational Team Concert & JUnit – what a combination. (and it puts me in a great position for TDD also!)

Where I’m at tonight: At a bar in Edinburgh, warming up for the big game on Sunday. Come on the reds!!!