Quantcast WoWInterface - View Single Post - Automated Testing
View Single Post
09-02-19, 02:04 PM   #3
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,905
There really isn't a reliable way for automated testing. For syntax errors, you could run it in a standard Lua interpreter and if it complains about something being nil, then it passed the compile phase and your syntax is correct.

I usually drycode an entire addon, or as much as I can to reach a functional stage. This is to make sure all the files I create are in place by the time I launch the game. WoW only checks for new files when it launches. You should also be pretty solid about your ToC setup as well. Reloading the ToC requires a full login from the account. If you use the BNet desktop client, you might as well close out and relaunch WoW to have it automatically log back in to your account. When you log into a character, you can start your testing. For the most part, you can still edit code while the game is running and apply it using /reload. Keep in mind, if you add a new file and/or change the ToC, you need to close out and relaunch the game.

For testing temporary code, I have a custom development environment addon I made that (among other things) loads in a usually blank Lua file. Any time the game is running, I can write code into this blank file and use /reload to test it. When I'm done, I clear out the file and /reload again to clear it from the game. I do this most of the time with code I post here in the forums before submitting it.
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-02-19 at 02:11 PM.
  Reply With Quote