March 17, 2008

More on CruiseControl Dashboard

It took me about an hour and a half to get the dashboard configured properly.  Here’s what I had to do:

  1. I had to copy all of the cruisecontrol jars and all tornei poker on lineworld pokerpoker italiagame on line pokerdownload live pokerstrip poker livesrtip poker gratisgiochi cartepoker scaricabili gratistexas holdem calculator,texas holdem,poker texas holdemtexas holdem italiastreap pokerpoker in tourseven card stud onlinegiochi on line pokergiocare texas holdem online,poker texas holdem online,texas holdem onlineparty poker bonus,poker con bonus,poker bonusstreet poker onlinesexi poker onlinesexy poker onlinehow to play pokergioco carte pokerpoker carte gratistornei di poker gratisonline poker gameparty poker bonuscraps in lineavirtual gamblingscaricare casino gratisonline casino gamesbonus dei casinogioco keno gratiscasino on line roulette,roulette on line,giochi on line roulettegiochi keno inlineagiochi casino pcsistemi roulettecasino tropezgioco craps in lineawww giochi casinoblog casino onlinekeno inlineacasino poker gratisbest casino onlineautomatic video pokercasino tropez bonus codegiochi video pokerroulette strategyrisposte eurobarre casino on netvincere casino onlinelista casino online of the xml-related jars (saxon, jdom, xerces, xml*) into the WEB-INF/lib directory of the dashboard war
  2. I had to update WEB-INF/web.xml and add a context-param to specify the location of the config-xml file.

Note: You might think that you can give it the correct filename at the web interface, but that never worked for me, no matter how I tried to tweak it.

At the end of the day, cruisecontrol requires a great deal of by-hand tweaking to get it to work for your project.  That’s not necessarily the end of the world, but it is a little disconcerting, since the documentation isn’t really clear about how you do this setup, where and so forth.

CruiseControl….

Well, I’m having a bit of an adventure with CruiseControl.  Some tips, perhaps just for myself:

  1. You have to check your project out of source control into the appropriate checkout directory under the cruisecontrol/ build directory before CruiseControl proper will consider building it.
  2. You have to merge unit test results in by hand
  3. You have to set up your dashboard by hand, and (at least as of today) you have to find the missing classes that it needs and include them

More later…

Groovy: no such property: X for class Y

Having taken up the task of learning Groovy, I stumbled early, as I tried to figure out how to integrate groovy-based unit tests with my java code. I had a java class called ContactScreen, and I wrote a groovy test case:

class ContactScreenTest extends GroovyTestCase {
    void testStandardEmailScreen() {
       screen = ContactHelper.getStandardContactScreen( Contact.EMAIL )
       assertTrue( screen instanceof AnyDayEmailScreen )
    }
}

Which failed when I tried to run it via Eclipse, giving the following error:

testStandardEmailScreen(ContactScreenTest)groovy.lang.MissingPropertyException: No such property: screen for class: ContactScreenTest

I stared at that error for a long time, wondering what the heck it meant. I mean, I’ve seen all sorts of example groovy scripts that don’t require definitions. In fact, the code I was modeling mine after used this very format. What is going on?

Finally, I turned to the groovy user group to help debug my groovy test case. Here’s what I found:

  1. The code I was looking at, circa 2004, is now victim to a fairly significant shift in language specification. In other words, it won’t compile anymore.
  2. The rules for declaring variables is different for scripts versus classes. In other words, if you are just running a script, you don’t need to declare variables. If you are building a class, you have to declare the members of the class via def.

So the working code looks like this:

class ContactScreenTest extends GroovyTestCase {
 void testStandardEmailScreen() {
 	def screen = ContactHelper.getStandardContactScreen( Contact.EMAIL )
 	assertTrue( screen instanceof AnyDayEmailScreen )
 }
}