Posts

Showing posts from June, 2009

Back to unit tests

One thing that it doesn't seem easy with the easyB+groovy combination is getting a precise indication of what gone wrong. You can get a succesful build with a NPE in a scenario, and the resulting stacktrace is not very informative. So, we're back to unit testing to check basic functionality before passing the classes to behaviour testing. The commit I just made has a new unit test, that unfortunately doesn't pass. I'll work on it later.

Love, finally!

It works! I had to remove the enum (GMaven dies telling just 'enum' as error message), tweak some dependencies, re-read the GMaven docs (those steps should be included in the archetype!), and now the trivial scenario gets run! Now, let's work on it! Maybe, I should prepare an easyb maven archetype out of all this: it doesn't seem to exist...

EasyB+Maven woes

EasyB may make it easier, but not if you're in the maven camp. First, hit a subtle issue with the story naming. Now, easyb doesn't found the main classes. It may be my fault, since I meddled with the Maven builder, and it seems that the classes get compiled in bin-groovy, but CLI maven dies with the same problem, so it doesn't seem Eclipse-related. Now I modified the Groovy project properties so that the classess go in target/classes, but still no love...

First commit

Everything almost set up. Up to now, two great problems: The official and working way to integrate Groovy with maven is gmaven , and not groovy-maven. The group and artifact id are similar, so it's easy to be confused. I have a pesky java.lang.ArrayIndexOutOfBoundsException: 0 at org.easyb.domain.BehaviorFactory.stripPattern (BehaviorFactory.java:114) when I try to run my test scenario. Still unresolved... The solution for point 1 is quite easy: WRONG : groupid : org.codehaus.mojo.groovy artifactid : groovy-maven-plugin version : 1.0-beta-3 CORRECT : groupid : org.codehaus.groovy.maven artifactid : gmaven-plugin version : 1.0-rc-5 I'm still working on 2. I'll commit for now, however.

Eclipse + Groovy + EasyB + Maven...

So, in order to teach my coworkers BDD, I have to try it myself! Let's start with Groovy, that can be easier for them (and me!) than Scala. We'll try Scala later. To be really hip, why must set up the whole toolchain: Eclipse (Galileo M4, of course! it'll release in 5 days!) Groovy (1.6.1, in case we venture in Google AppEngine territory) Maven (you hate or love it. Sometimes both. But it's a consistent way to make you keep your tests honest, so you can compile). EasyB (Let's give it a try!) So, let's choose an interesting problem: http://schuchert.wikispaces.com/Rpn+Calculator+High+Level+Description Set up a BitBucket repo (Mercurial rocks!), just in case: https://michelemauro@bitbucket.org/michelemauro/rpncalc/ And let's start coding...

First Post!

Every blog needs a first post, so let's start with a good citation: Mankind, probably the most mysterious species on our planet. A mystery of open questions. Who are we? Where do we come from? Where are we going? How do we know what we believe to know? Why do we believe anything at all? Innumerable questions looking for an answer, an answer which will raise the next question and the following answer will raise a following question and so on and so forth. But in the end, isn't it always the same question and always the same answer? A football is round, a game lasts 90 minutes. That's for sure. Anything else is merely hypothetical. Off we go!