January 09, 2014
PhantomJS and Node.JS
I'm setting up a guide for contributing to PencilCode.
There are now integration tests. In about 20 seconds, the "grunt test" command starts a local development server, starts a headless webkit, and tests most of the core functionality on the website, including browsing users and directories, loading, editing, running, saving, and deleting programs, and using passwords to log in. You get this all for free by just installing node.js and the grunt build tool, and building the source.
Why Tests are Awesome
The test setup is designed to maximize developer productivity: the default test target runs tests very similar to production, with all the code compiled and minified, but the "devtest" target runs the same tests directly against unminified unoptimized source code, for easier debugging.
The beauty of a good integration test is that the code can now be aggressively changed without fear that the change will break something important. If some change breaks something, we can know in 20 seconds.
Right now my integration tests run quickly, because my test matrix is small. As the test matrix grows larger, many open source projects use jquery-turtle as well; then it will be time to refactor the code so some interesting features can be added.Posted by David at January 9, 2014 07:29 PM
HiPosted by: at November 22, 2014 10:08 AM
Post a comment
|Copyright 2014 © David Bau. All Rights Reserved.|