View The Space is Hiring

Thursday, December 1, 2011

Running your still alive recipe as part of your build

For those of you not familiar with StillAlive, it's an awesome platform that monitors your web site using custom Gherkin recipes. Those comfortable with cucumber will be right at home with StillAlive as the recipes give you almost exactly what comes with the controversial web_steps.rb. The end result is that instead of simply pinging a page and getting back success or failure, StillAlive allows you to actually exercise the full stack of your application up to once a minute.

We started using StillAllive last month. One limitation with StillAlive and other intelligent monitoring solutions is that as your application changes with each deployment, your StillAlive monitoring recipe can break becoming incompatible with the latest version of your app. Our solution to this issue is including our StillAlive recipes as part of our cucumber suite. In this case our still_alive.feature file looks like:

Since we are being naughty and still using web_steps.rb, we just needed to add the following to our paths.rb which converts the absolute url to the relative /users/sign_in for testing within cucumber.

Once that test worked within our cucumber suite, we copied everything but the Background to our StillAlive recipe.

Now if something we change in development is incompatible with our StillAlive recipe, we'll find out about it before we release to production.

No comments:

Post a Comment