views:

80

answers:

1

I have seen some mention of some form of TDD for Python with Google App Engine, however I've not really seen a discussion of a BDD approach. Is someone familiar with how to string this together properly with GAE? I'm hopeful that things may be in a better position for this now than they were from notes and articles I saw from about a year ago.

A: 

I did a little bit of development with GAE and the app engine.

BDD really is a development approach rather than a framework, so you can use any existing test tools. If you're happy switching to Ruby for your scenarios you can always use Cucumber with the Ruby-based web tool of your choice; otherwise you can use your unit-test framework and make yourself a little DSL (C# version of this just to show the principles of BDD DSLs is here). I honestly can't remember which approach we used, but Twill looks interesting.

For unit-level BDD, we used pytest. We wrapped the Google App Engine code in our own abstraction so that we could mock it out. That approach felt like overkill to start with, but started paying itself back very quickly; the BDD approach let us separate the descriptions of what we were doing from what the GAE was doing for us, which accelerated our learning and appreciation of the GAE as well as helping us understand what it didn't do. I can't remember whether pytest let us start the tests with "should"; we might have started them with "test_should".

Sorry this isn't more fleshed out. BDD is more to do with conversations and the mindset around the responsibilities of your code than it is to do with language and technology choices. I hope this encourages and helps you.

Lunivore