Does Django have BDD testing tools comparable to Rails' testing tools?

Chiron picture Chiron · Aug 5, 2010 · Viewed 7.6k times · Source

Ruby/Rails enjoy some really nice and powerful Behavior Driven Design/Development testing frameworks like Cucumber and RSpec.

Does Python/Django enjoy the same thing (I'm not talking about simple unit testing like PyUnit)?

Answer

Travis Swicegood picture Travis Swicegood · Aug 7, 2010

There is a new tools called Lettuce that promises to be a Pythonic version of Cucumber. It is starting with Django integration. That plus the existing testing tools in Django make it pretty good for unit testing.

There's also a tool called Windmill that provides a solid browser-based testing tool for building GUI tests. Couple that with a tool like Lettuce for writing acceptance tests and the straight unittest and nosetests and I'd say you're set.

The thing to remember, there's a slightly different culture between Ruby and Python. Ruby has a preference for tests above all else. In Python it's documentation. As such, there's not a million and one testing frameworks in Python, just a few really solid ones with the occasional outlier (like Lettuce).

Hope this helps.