3 ms·
I like to add automated tests for any application I write. These are mostly to prevent regression and to maintain sanity. Python makes this easy (as do the popu
by steamboiler 17y ago
I like to add automated tests for any application I write. These are mostly to prevent regression and to maintain sanity. Python makes this easy (as do the popular Python web frameworks such as Django). Do correct me if I am wrong, but I do not see the same importance given to automated unit testing in the PHP world. This leaves those who do want to automate tests with fewer choices of tools and accessories.
- agazso 17y agoWell, I admit that I don't make automated testing as part of the web development process, so I don't really know the options (neither in python, nor in php). But back when I worked on a quite big web application with the front-end developed in php, we did two things to detect errors early: - before building a package to be deployed, run a syntax check on all php files. - caught all runtime exceptions and sent an email to ourselves with a stack trace. Sure it generated a lot of traffic in the beginning, but it was quite rewarding after we filtered out the duplicates. Effectively our users tested the code paths for us :) I think these can be done in any web development language, additionally to the automated testing. The other thing came to my mind, that in php you can detect if you are running as a webserver process or from command line. This creates a handy option to write automated tests too.