To Continuous Integration / Deployment add Continuous Testing

I’ve had good experiences with BDD (behavior directed development) based on the “behave” python implementation, and wanted to try a go version.

In the process of trying out tools, I discovered that the goConvey team had also provided a continuous-testing daemon that didn’t wait until I did a git push, but instead did a test in the background locally every time I did a save in my editor.

In the figure below, I’ve just pasted a test from an object server into one of its children, an image server. As soon as I did, goConvey ran the test.

If I didn’t care if it was right or not, I could merely ignore the yellow “fail” message, but as it happens, it illustrated a bug. The image server had a different result when I gave it the same data.  The requirements suggested it should be a 400, but that made it an improper superset of its parent.  Time to fix the specification!

using_convey_for_CI_CD.png

I could have got the same effect by being anal and rerunning the tests in the foreground after every change, but that’s a huge interruption to the normal development process. And I might forget to do it.

In addition, if a test that is unrelated to what I’m working on suddenly fails, I know I have a hidden dependency between that code and mine, and it’s in the last few lines I wrote.  That’s far more precise than knowing it’s in a particular commit.

All in all, this  is a lovely addition to my debugging process, one that all my languages should have.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s