Monday, February 16, 2009

Unit testing for Swing

Effort put in my thesis last week is under my estimate because the assignment of ICS606 took more time than I expected. I will put more work in it this week.

I have started the self-report tool of Hackystat using MiG Layout. I am yet paying much attention in the UI, so it is too early to said if the MiG Layout is perfectly fit my requirement or not. But so far, it is handy to manage simple arrangement of components. And its Quick Start Guide and Cheat Sheet are very helpful and intuitive.

When starting the new project, I also searching for unit testing package for swing. After some digging, I settled to a package called FEST. Its assertions are quite flexible and readable. And it is an active project that running for a long time. After some trying, I finish my first test case with no difficult barrier. Then I notice that, what the tester do is to stimulate mouse/keyboard action on a real Swing application. I can see what it is doing during the test. That is both good and bad. The good thing is I can see what's going on, and what's going wrong in the test. And the bad thing is, I have to stop to watch it. If I move the mouse during the stimulation, the test will probably fail. I will no longer be able to run the unit test and do something else while waiting it finish. However, I think of an interesting idea from it: it may be possible to make "demo" test cases, that can serve as an example of usage in supplement of wiki guide.

No comments: