Hey,
Ruby/Rails enjoy some really nice and powerful testing frameworks like Cucumber and RSpec.
Does Python/Django enjoy the same thing (I'm not talking about simple unit testing like PyUnit)?
Thanks for help and time.
Hey,
Ruby/Rails enjoy some really nice and powerful testing frameworks like Cucumber and RSpec.
Does Python/Django enjoy the same thing (I'm not talking about simple unit testing like PyUnit)?
Thanks for help and time.
I had a good experience with TestBrowser, which allows you to write functional tests at a high level. See http://pypi.python.org/pypi/homophony for integration of TestBrowser with Django.
If you are referring to high level testing, and not unit testing, then you can still use Cucumber. Cucumber can be hooked up with Webrat and Mechanize, and you can use that setup to write stories to test your Django app. I have a setup like that. You can also hook up Cucumber with Watir, and do browser based testing.
There isn't something like FactoryGirl to auto generate data for your model, but you can use Django fixtures to create initial data for your model, and only have the fixtures installed when you are in testing mode. Then you can start a test, and have some data to test with.
With those things, you can setup a fairly comprehensive high level test suite. Then you can use Django unit test to do low level testing.
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.