Syspec: System Specifications & Tests using a Rake-like batch file
Posted by Mathew Abonyi Sat, 10 Feb 2007 21:45:43 GMT
Syspec lets you write a batch file a lot like a Rake file, but in common HTTP-style language, to test the existence and proper functioning of all the domains, subdomains, their pages and responses. This project is still very much in its infancy, but I decided to get it out there to get some feedback while I use it to track production servers. This is a sample Syspecfile:
check :"www.rubyonrails.org" do
accept 200
get "/"
accept 404
get "/syspec"
get "/lacrima"
endThe above will check that http://www.rubyonrails.org/ responds with 200 and http://www.rubyonrails.org/syspec and http://www.rubyonrails.org/lacrima respond with 404. You can have multiple checks with the same domain and it does not have to be a symbol, though I prefer it that way.
Currently, Syspec features the following:- accept(*codes) – response code should be among these codes
- get, post, delete, put (uses fetch(:request_method, url))
- login “username”, “password”
- body matching
- forms
svn co http://mabs29.googlecode.com/svn/trunk/gems/syspec . svn export http://mabs29.googlecode.com/svn/trunk/gems/syspec/versions/syspec-0.2.1.gem .Enjoy!
