I intended my next post to be about Mercurial, and I will get to it, but I had something else to write about. As I mentioned before, we are using easyb for our unit testing framework. It’s pretty nice, and I like it so far. It has an Eclipse plugin, but it just outputs to the console. Also, we are using Hudson for our CI server, and there isn’t really any Hudson integration for easyb either. Not having good integration was starting to bother me, so I decided to do something about it.
I don’t have an endless amount of time to spend on it, so I figured the path of least resistance was to create a jUnit runner that would run the easyb behaviors. That way the output would integrate into Eclipse and Hudson automatically.
It was a little tricky to get it to work properly because easyb tests are written in Groovy, and you can’t easily determine the makeup of a story or specification without actually running it. But I have something that works pretty well, and gives nice feedback, with good integration with Eclipse and Hudson.
I created a project on Google Code to host it, so you can check it out here: http://code.google.com/p/easyb-junit
I describe how to use it on the project site. I hope this is useful to other people. If you have any issues with it, or ideas to make it better, please let me know.
Nice work! On your google code homepage, you mention:
ReplyDelete"For some reason it appears you have to put the @RunWith(EasybJUnitRunner.class) on the class also to get it to run in Eclipse. I'm not sure why that is. "
I think it has something to do with:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=298031
Some users have been hitting this when running spock unit tests in Eclipse.
Way to go! Thanks for writing this!
ReplyDelete