Simon Willison’s Weblog

Subscribe
Atom feed for testing Random

87 posts tagged “testing”

2009

Continuous deployment in 5 easy steps. A classic case of a number in a title making the article look less interesting than it actually is. Lots of interesting information here from IMVU’s Eric Ries.

# 1st April 2009, 12:25 am / continuous-deployment, eric-ries, ivmu, testing

It may be hard to imagine writing rock solid one-in-a-million-or-better tests that drive Internet Explorer to click ajax frontend buttons executing backend apache, php, memcache, mysql, java and solr. I am writing this blog post to tell you that not only is it possible, it’s just one part of my day job.

Timothy Fitz

# 10th February 2009, 3:06 pm / timothy-fitz, continuous-deployment, selenium, testing

Changeset 9793: SMTP testing documentation. I didn’t know this trick: running “python -m smtpd -n -c DebuggingServer localhost:1025” will start up a simple SMTP server which dumps received e-mails to the terminal instead of forwarding them on.

# 29th January 2009, 1:35 pm / django, email, python, smtp, testing

Django now has fast tests. Changeset 9756 switched Django’s TestCase class to running tests inside a transaction and rolling back at the end (instead of doing a full dump and reload). “Ellington’s test suite, which was taking around 1.5-2 hours to run on Postgres, has been reduced to 10 minutes.”

# 16th January 2009, 11:40 am / django, ellington, eric-holscher, python, testing, transactions

Localbuilder. Gareth Rushgrove’s neat little Python continuous integration tool—it watches a directory for changes, then runs a command when it spots any.

# 14th January 2009, 10:57 pm / continuous-integration, gareth-rushgrove, localbuilder, python, testing

2008

Django snippets: RequestFactory. I’ve been wanting this for ages; when I finally got around to writing it it turned out to only be a dozen or so lines of code. Makes it easy to create mock request objects in Django, which you can then use for testing view functions directly (bypassing the current test client mechanism which requires views to be assigned to a URLconf before they can be tested).

# 12th August 2008, 12:40 pm / code, django, httprequest, python, requestfactory, testing

Django Unit Tests and Transactions. If you’re using a transactional database engine (MySQL with InnoDB, Postgres or SQLite) you can speed things up by running each of your unit tests inside a transaction and rolling back in tearDown().

# 7th July 2008, 2:14 pm / django, innodb, mysql, postgresql, python, sqlite, testing, transactions

ratproxy. “A semi-automated, largely passive web application security audit tool”—watches you browse and highlights potential XSS, CSRF and other vulnerabilities in your application. Created by Michal Zalewski at Google.

# 3rd July 2008, 2:35 pm / csrf, google, michal-zalewski, proxies, ratproxy, security, testing, xss

QUnit. The jQuery unit testing framework is now documented and supported as a separate project.

# 26th May 2008, 5:31 pm / javascript, jquery, qunit, testing

Debugging Django

I gave a talk on Debugging Django applications at Monday’s inaugural meeting of DJUGL, the London Django Users Group. I wanted to talk about something that wasn’t particularly well documented elsewhere, so I pitched the talk as “Bug Driven Development”—what happens when Test Driven Development goes the way of this unfortunate pony.

The slides [... 1,759 words]

Python one-liner of the day. I love the idea of publishing one-liners accompanied by one-line test suites.

# 26th April 2008, 10:24 am / python, testing

xPyUnit: Uniting in Python with XML reporting. Should be just the ticket for integrating Django’s testing framework with Cruise Control.

# 27th March 2008, 12:35 pm / cruisecontrol, django, python, pyunit, testing, xpyunit

queryset-refactor changeset 7126. Malcolm just checked model inheritance in to the queryset-refactor branch, with full documentation and unit tests. People have been requesting this for ages.

# 18th February 2008, 9:46 am / django, inheritance, python, querysetrefactor, testing

Django on Jython (via) Outstanding work from Jim Baker and the Jython team: Django now runs on the modern branch of Jython, with a couple of patches and some failed doctests due to dictionary order (a problem with Django’s test suite).

# 4th January 2008, 12:35 pm / django, doctest, jython, testing

2007

I definitely like Python 3K's Unicode support better [...] In fact, I think I prefer Ruby 1.8's non-support for Unicode over Ruby 1.9's "support". The problem is one that is all to familiar to Python programmers. You can have a fully unit tested library and have somebody pass you a bad string, and you will fall over.

Sam Ruby

# 28th December 2007, 7:05 pm / ruby, sam-ruby, unicode, python, ruby19, rubi18, testing

I can't help feel that BDD is a case of a bad idea spreading; the motivations for BDD are fine (a change in developer testing workflow), but the technique they use to try to reach the desired workflow is totally bizarre.

Ian Bicking

# 27th November 2007, 7:16 pm / bdd, testing, ian-bicking, java

Mock—Mocking and Test Utilities (via) New mocking library for Python based on the “action ... assertion” pattern (as opposed to the more common “record ... replay”).

# 20th November 2007, 11:30 pm / mocking, python, testing

Using the jQuery test suite for your own projects. jQuery’s test suite has clever start(), stop() and expect() methods for running assertions within asynchronous code.

# 12th October 2007, 12:56 pm / javascript, jquery, testing

nose 0.10.0 final! Nose is my favourite Python testing tool: it can auto-discover and execute tests in a directory hierarchy, which makes it easy to run just a sub-set of your test suite.

# 11th October 2007, 1:52 pm / nose, python, testing

YUI 2.3.0. New components are a rich text editor, dojo-style package loader, lazy ImageLoader, colour picker and unit test framework. Easier skinning as well.

# 1st August 2007, 8:20 am / dojo, javascript, skinning, testing, yui

Test stubbing httplib2. Nice demonstration of monkey-patching as part of unit testing in Python.

# 10th May 2007, 11:24 pm / httplib2, joe-gregorio, monkeypatching, python, testing

The joy of pdb.set_trace(). I use nosetests --pdb-failures as my main entrypoint for Python debugging—it starts the debugger at the first failing test.

# 25th April 2007, 11:37 pm / debugging, nose, pdb, python, testing

Internet Explorer Application Compatibility VPC Image (via) Microsoft have made free VPC images of IE 6 and IE 7 available for testing, but they expire in August.

# 20th April 2007, 4:47 pm / ie7, internet-explorer, microsoft, testing, virtualization

I don't do test driven development. I do stupidity driven testing... I wait until I do something stupid, and then write tests to avoid doing it again.

Titus Brown

# 25th February 2007, 2:44 pm / tdd, titusbrown, testing, pycon

Rails 1.2.1 Impression. I hadn’t seen assert_select before, which lets you unit test generated HTML using CSS selectors; a really neat idea.

# 15th February 2007, 9:14 am / assertselect, css, rails, testing

nose. Really nice Python unit testing tool—run ’nosetests somedir’ and it finds and executes every unittest (and test_like function) it can find in that directory tree.

# 1st February 2007, 2:20 am / nose, python, testing

2006

Dependency injection is the enterprisey name for trampling over namespaces with reckless abandon.

Ted Dziuba

# 16th December 2006, 1:05 am / python, testing