|
After the last couple of release where we have been bogged down by testing we have decided we need some way to automate as much of this as possible. We already use automation to build the release archives and the although the time saved is small (maybe 20 minutes) we have sometimes caught a minor bug after the files are built and had to re-run this part several times. That is a simple perl script that exports the latest version from our private SVN server into a directory that matches the proposed release number, removes all non-release files such as our minimal development template, then packages up both a .zip and a .tar.gz file ready for uploading to SourceForge. It's only about 30 lines of code but turns a boring and error-prone task into a single-command utility that takes all of 10 seconds to run and is consistent each time. By itself Moa shouldn't be hard to test, but checking 2 templates on each of the five major browsers alone takes a long time and that is just the visual/interactive side. When we do some project-spanning architecture change such as in 1.2.1, where we moved all config variables into a common structure, it means we need to retest a huge portion of the internal code as well. Enter unit testing which we are starting to put into place now and will cover the PHP side of things. One set of tests will check the internal functions with controlled inputs to flag when something has done something outside it's defined spec (which also means we have to define specs... ). Another set of tests will directly call the API that the front-end AJAX uses. Hopefully this way the tests will allow us to be confidant that the back-end code is stable with a quick 5-minute test suite. A third part of this testing is the front-end which raises some problems due to it's interactive nature. The probable method we are going to use is based on JavaScript to do short tasks such as "click edit gallery, then fill in the name/description, then submit it, then check both the page and database (via AJAX) to make sure the new text has been applied". The same basic test can be run multiple times with different settings to test what that feature should and shouldn't be able to handle. A variant would be to use bookmarklets rather than a conditionally included .js file and keeps the tests away from the main codebase. Some features would still need testing by hand but this should help cut a lot of time off and let us get releases out faster once the code is done. It isn't going to be done fast though and will probably be slowly built up over the next few releases.
Progress on Moa 1.2.2 Bulk upload is working, just adding support to allow multiple folders to be imported with unique tags and descriptions. This is so you don't have to do them all to a single gallery then move them around afterwards or have to do multiple bulk uploads to fill more than one gallery. Also we will add a 'bulk upload to here' link to each gallery to fill in the tags automatically.
|