Yesterday I released a new version of The atom protocol exerciser. We have been working in order to simplify its architecture and create a modular system that anyone may extend.
Now it works from the command line as well the web interface. We've added some rake tasks that you can use for exercise your server implementation and you can select the output format just invoking the correct option:
$ rake ape:go:text['service document uri']
$ rake ape:go:html['service document uri']
$ rake ape:go:atom['service document uri']
It allows some configuration options through its config file $APE_HOME/aperc:
Ape.conf[:REQUESTED_ENTRY_COLLECTION] = 'collection name'
Ape.conf[:REQUESTED_MEDIA_COLLECTION] = 'collection name'
And finally, this last release allows to create and add new tests easily. The test cases must to extend the Ape Validator class and override the validate method.
module Ape
class CustomValidator < Validator
def validate(opts = {}) end
end
end
We've implemented a little system for select the variables to use in your tests, just call the requires_presence_of method into the class declaration and pass the variable name that you require.
module Ape
class CustomValidator < Validator
requires_presence_of :entry_collection #OR
requires_presence_of :entry_collection => 'comments' #OR
requires_presence_of :media_collection => {:accept => 'image/png'}
#...
Once your custom validator is ready you just need to move it to $APE_HOME/validators.
But if you really want to learn how to write your custom validator you just need to take a look at the source code.
