IntroductionMaatkit has a unit test suite. There is no test suite shipped with the tarballs -- testing is only for the devs at this time. Each tool has (must have!) a t/ subdirectory with tests in it. This is run as part of the release/build process. Try not to put much in this test though -- just enough to run the tool and make sure you catch anything that is not testable via modules. The main place to put tests is in common/t/. This makes it a lot easier to test things. As regards tests against an actual MySQL server, try not to do this. Instead test against a little sandbox server that you tear down and set up with every test. There is a trunk/sandbox/ subdirectory that has some canned scripts for doing this.
|