[TIP] Web Application Testing Code of Ethics?

Nate Lowrie solodex2151 at gmail.com
Sat Nov 22 05:42:32 PST 2008


On Fri, Nov 21, 2008 at 9:27 PM, Noah Gift <noah.gift at gmail.com> wrote:
> This might be the time to figure out how this process could be integrated
> into something like buildout, paver, or virtualenv bootstrap, and with
> testing framework.  Of course it would be awesome if that framework tested
> not just python code but most language code.  That would be an interesting
> growth area for python, being the king of testing no matter what the
> language.

I thought I might chime in here.  I have been developing in Python for
over 4 years now.  2 years have been spent developing the Dabo
Framework and desktop apps.  Still the best framework for desktop
apps, but definitely room for improvement.  For web applications, I
have tried a lot of the Python frameworks including Django, Pylons,
Zope/Plone,  and CherryPy.  However, all said and done, if I am
writing a web application I actually do it in Ruby On Rails.  I am not
trying to be sacrilegious or convert anybody, but just wanted to point
out why I chose to learn an entirely new language and framework just
for web applications.

Rails makes it easy to develop web applications.  So easy it is almost
laughable.  But, specifically relating to the problems presented here
on deployment and testing, they seem to have come up with a system for
the former and have mastered the latter by integrating testing into
the framework.  For deployment, Rails recognizes that the number of
environments that people will deploy to are many and varied.  They
recommend setting up an early deployment environment that your
customer and other test users can access.  This gives you user
feedback in addition to being able to fix any problems that arise with
the database migrations, configuration, and anything else that can go
wrong.  In application it works quite well.

Testing is where Rails lured me away from the Python frameworks.
Rails has built testing into the framework, and will auto-generate the
infrastructure for any new testing.  In addition, the database setup
allows you to specify development, test, and deployment databases.
The test database can take on additional test data in the migrations.
Fixturing infrastructure is also automatically setup, the appdev just
needs to put in the details.  It just makes everything so easy to do
that coding, especially testing, became much more fun.  I don't have
deployment anxiety anymore and development is actually speedier.

As far as I see it, Ruby and specifically Rails is the king of testing
at the moment and their is a lot that the Python community can glean
from their methodologies.  I can say from experience that the Rails
way works far better than any Python framework out there.  Take this
as you will.  For me, until the necessary changes come along, I will
stick to Rails for web apps.

Nate Lowrie



More information about the testing-in-python mailing list