19👍
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.
3👍
in case someone is still visiting here,
Aloe, is a lettuce upgrade and has integration for django 1.8.
I’m starting to use it now.
- Django raises MultiValueDictKeyError in File Upload
- Django annotate and count: how to filter the ones to include in count
- Django command: How to insert newline in the help text?
- Django: Create and save a model using JSON data
1👍
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.
- How to make sure Django models match the database schema
- Is it possible to disable django related_name for a specific field?
- Styling django non-field errors on forms
- Passing an object created with SubFactory and LazyAttribute to a RelatedFactory in factory_boy
1👍
I’m working with Robot Test Framework http://code.google.com/p/robotframework/. It is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD).
It’s flexible and powerful and also allows BDD style in a similar way to lettuce/cucumber.
0👍
I had a good experience with TestBrowser, which allows you to write functional tests at a high level. See http://pypi.python.org/pypi/h*m*phony for integration of TestBrowser with Django.
- Tastypie Negation Filter
- How to output text from database with line breaks in a django template?
- Creating UTF-8 JsonResponse in Django
- What method attributes are used in Django?
- Django Rest Framework debug post and put requests