I like BDD. I like cucumber.

I like python. I like django.

I don’t like lettuce, a commonly-used python port of cucumber, when used with django. They’ve chosen the completely daft option to use your main database when testing. I’d forgotten this, so when I discovered I’d torched my production database just because I wanted to write a test, I decided to not touch lettuce again…

And then I discovered behave, which works fine as a python BDD tool; except it doesn’t have an easy tie-up with django.

So I wrote one.

It’s a Work-in-Progress, but I’m using it for my developments, so its definitely usable. Comments, etc, very welcome – please use github for this.


5 thoughts on “django-behave”

  1. I’m trying to use django-behave!

    It’s not a vital project, but I like the idea and I’m trying to understand it.

    It could use a tutorial on how to set it up and test a feature with django, for example with selenium. I’ll think about it!

  2. So how do you setup behave + django + selenium so that you are using a test database behind the site you are testing? Are you spinning up a web server using a test_settings file as the DJANGO_SETTINGS_MODULE? If so, did you script that? Do you put that in your file in the before_all method?

Leave a Reply

Your email address will not be published. Required fields are marked *