AppClientTest Update

Joe Gregorio

I've just checked in an updated version of the AppClientTest, a program for testing your AtomPub service. It has been updated to use the atompubbase module and also sports HTML output as an option. To make it easier to develop I've transcluded via svn:externals all the libraries you will need as long as you are running Python 2.5. You will need to install elementtree if you are on something older than 2.5. The transcluding means it is this easy to get up and running from svn:

$ svn co validator
$ python validator/ --output=results.html ";service_document" 
$ firefox results.html

Here is a sample report (looks better with JavaScript enabled) after running it against my APP Test Site. The icons are courtesy of Tango.

Here are the command line options:

$ python validator/ --help
usage: [options]

  -h, --help          show this help message and exit
  --credentials=FILE  FILE that contains a name and password on separate lines
                      with an optional third line with the authentication type
                      of 'ClientLogin <service>'.
  --output=FILE       FILE to store test results
  --verbose           Print extra information while running.
  --quiet             Do not print anything while running.
  --debug             Print low level HTTP information while running.
  --html              Output is formatted in HTML

The code is far from complete. It does most of the tests of Tim's APE (with the exception of categories), but there are many more tests to add. The next step for me is to add unit tests for, which should be fairly simple given the structure of atompubbase, and the use of MockHttp.

Hmm, with Python 2.5, credentials in a file (no third line), and a fresh WP 2.3.3, I get an internal error:
[junk stripped]
(most recent call last): File "validator/", line 345, in run test_member_function() File "validator/", line 549, in testEntry_Collection entry_collections = list(service.iter_match("application/atom+xml;type=entry"))

Posted by Morten Høybye Frederiksen on 2008-02-29

Typo: s/you/your/ in the first sentence. Also, nice redesign. :)

Posted by Noah Slater on 2008-02-29


Fixed, and thanks!

Posted by Joe on 2008-02-29


I will try a fresh install myself, but in case I can't get it to repeat can you send me the complete stack trace?

Posted by Joe on 2008-02-29

Thanks for keeping this up, Joe. It's been very helpful as I've been trying to work on a Ruby client library.

Posted by Keith Fahlgren on 2008-02-29

Fine, more tests. It caught some problems the ape didn't notice already.

The new script says that it's an error to omit the Content-Location header on creation, yet the spec says it's optional. Most examples in the spec don't include it either. I fixed it, but shouldn't it be a warning?

Also, it checks for an empty summary and author when uploading an image. Isn't it better to have an empty summary than a nonsensical summary, like the "djeihhjdga.gif" Wordpress fills in, given the recent discussion on the alt attribute in HTML? (I guess it's the feedvalidator that's reporting this, just like the namespace prefix warnings)

Posted by Jeroen Hoekx on 2008-03-01


You are correct that all of the format checks are being done by the feedvalidator code.

That check should be for the Location: header and not the Content-location: header. I will fix that, thanks!

Posted by Joe on 2008-03-01

comments powered by Disqus