I've seen it done in a few addons where the authors write in some tests. Is there a unit testing framework people are using, or are you rolling your own? What are some best practices about testing addons in WoW?
There aren't any Unit Testing frameworks. A Unit Test is just a handy way of saying, "Here's a bunch of tests, if I call function A, it should have result B, if it doesn't, then its broken."
It would be nice to have something a little more structured:
- setup and teardown functions
- per-test reporting of success/failure
- a test harness that lets you flexibly choose which tests you want to run
- runs in game or out of game
- WoW API mimicry for out of game
Probably other stuff too. LUnit and LuaUnit are both written in LUA and so should be pretty easy to port for WoW use. There's also Shake, but I'm less pleased by it's design.