TDD/BDD framework for use with Django?
I'm trying to decide which approach to take to testing a Django app I'm writing. I've seen Cucumber and that put me onto lettuce (URL is lettuce.it) and pycurracy. I like the look of these frameworks since hopefully non-technical people will be able to write definitions.
I want to be able to:
- run functional tests integrated with Django, so sometimes inspecting models,
- test behaviours via a web browser - pycurracy seems to make this easier since there are already Selenium bindings. But Selenium is slow, so I'd be happier using a headless, ideally Javascript-capable browser for testing.
It seems like Lettuce can do the first easily, but the second will require me to build a library of steps for actions like "I click button x", etc. Conversely开发者_开发百科, I can't see any specific mention of Django and Pycurracy, although it can handle the second point.
Lettuce has a lower version number, but that doesn't mean it's inferior.
Has anyone used either or both of these? Any advice?
How do these work out when you have a reasonably large/complex project?
It seems that at the moment, Lettuce can do a lot of what you want, and it has built-in support for Django.
But why not use a combination of the tools you like?
Aloe-django is a great tool and it plays well with django 1.8 its actually started as a fork from lettuce
from their docs:
Aloe-Django originally started life as part of the Python BDD tool Lettuce. Like so many succulents, it grew into so much more than that.
I use it in my django 1.7 soon to be 1.8 project and it's great
精彩评论