Combee on Palm OS

Tuesday, 2 March 2004  12:26 AM

PalmCUnit is a unit-testing framework that's been adopted by a number of open-source Palm OS projects, including Plucker and PalmFrotz.  What it gives you is an alternate user interface on which you can run test cases that you've built around your application code.  This isn't a replacement for tools like Gremlins, but instead serves as a way to enable "test-driven development", a technique where you write tests and then write your code to meet those tests.

These kind of tests are mainly useful for exercising the back-end portion of your application.  This is the part that deals with databases, does calculations, and holds all the logic.  In a well designed app, these parts can be separated from the user interface and run separately.  Thinking of tests as you write the code can help you better understand your code's internal interfaces, roles, and responsibilities, plus this enables techniques like refactoring where after you change the internal structure of your application, you can quickly tell if you introduced any bugs.

The library was developed with prc-tools, but it was easily ported to CodeWarrior, and I've sent the author my project files and modifications, and they should be incorporated into the next version of the tool.