Developer blog

Sunday, October 30, 2005

Junit

When I first met Junit, I loved it. Well at least I loved how it integrated in my eclipse. But after some time we spent together I found some annoying things about it.
First of all I do not like class TestResult. You see it is not bean compatible, so if you will try to use it with jstl or struts tags you'll get some problems. And TestResult is using class Vector inside so it is not realy good thing about it.
The second thing in JUnit I do not like is TestRunner and stuff. Problem is that I did not found a way to made some test-tree presentation with it. You see there are this TestLisner interface that allows you to ovveride

void endTest(Test test)
A test ended.
void startTest(Test test)
A test started.


I have some nice test-tree, it means that there was some main TestSuite that contained some other TestSuite instances and so on. In the end there was TestCase instances that contained some real tests. Every TestSuite had his own name, so I had intesion to show some nice test-tree presentation of tests running. What I found when I created my own TestListener realisation is that it do not deal with TestSuites it works only with TestCases. So if you want to have test-tree presentation you need to write your own TestRunner.

Wednesday, October 05, 2005

Eclipse & Emacs keys

I have some experience of using Emcacs in the past. So I get used to use Emacs keys like ctrl-A/E,
ctrl+space, ctrl+P/N/F/B etc. Now when I am using Eclipse 3.1 in my daily work, it is not realy sutable fpr my finger to use arrows naviigation in editor instead of Emacs ctrl-N/P etc keys. So I have desided to use Emacs-keys in Eclipse configuration. I should say it not so easy. First of all, almost all eclipse plugins do not support this key-schame. For example in some sitations alt-w works like call "eclipse menu item". Some key works not "exectly" like in emacs and just similar.
Still, I am not "Real Emacs User", I'm just used it somewhere in my past.