Craft ships with PHPUnit... How can we use it to test our plugins?
Yes it is possible, see this example plugin by Selvin Ortiz: https://github.com/selvinortiz/craft.loath.

You can also check out https://github.com/boboldehampsink/import for some detailed unit tests.