Acceptance testing and BDD with bash

berdea2
I’m working on a project that has some fairly weird acceptance criteria. I’d really like to automate the acceptance testing, but none of the tools I know of will cover all the requirements without a good amount of hoop dancing. So I wrote one … in bash. Truns out a few others have gone down this path as well.

While it’s currently quite limited and coarse, it might form the basis for a more comprehensive framework. Check the repo if you’re curious and/or interested.

Foray into TDD/BDD

laboratory-glassware-13792643839YO

I am starting a new programming project and have decided to use TDD and BDD as much as possible. Even though I currently suck at it, I think I am a convert. The confluence of testing automation, test writing, and spec writing is irresistible.

I only need to concern myself with JavaScript at the moment, so for my tooling I’m using Testem for test automation, Mocha for the testing framework, and Chai for the assertion library. I will probably have to delve into Sinon.js as well for mocks and other stuff. Personally, I’d be happy to use the the older and integrated Jasmine framework instead of the mix-and-match Mocha+Chai+Sinon.JS trinity, but Jasmine seems to be getting bad press lately for being stalled and for having clumsy async teset handling.

A Nettuts+ video on Testem helped make setting up easy. You should note that Testem has a "framework": "mocha+chai" option that makes it unnecessary to download chai.js.

So far, my code-to-test-code ratio is about 1 to 1.5. I have no idea if that’s typical.