My next check-in will have a substantially improved doc. Thanks for the
feedback.
Most of the main structures have already been ironed out, so it should be
fairly straightforward to describe how it works.
Unit testing is still a big problem though. Any recommendations for
automated API validation? Regression bugs in the API is the worst thing --
unlike a minor UI might not even get noticed, but a change in the API output
will likely cause problems in the client code. Anything like NUnit / JUnit
here?
I guess i could use the Test wiki for all tests - as long as noone changes
designated test pages. Does test wiki ever gets erased?
--Yuri
On 5/17/07, Nick Jenkins <nickpj(a)gmail.com> wrote:
> Can someone help with setting up an
automated unit testing for the
API?
My point is that
if we expect the API to be maintainable, then it might be great to
have some documentation on how it works - code documentation and class
diagrams would be a start.
Here's a rough API subsystem class diagram from late April :
http://files.nickj.org/MediaWiki/API-subsystem-late-April-2007-class-map.png
(creating a version with fewer crossing lines and getting it to Phil
Boswell to
work his magic on is still on my todo list).
If I could perhaps suggest the quickest / best bang-for-buck method
towards
documenting the API subsystem, my suggestion would be:
* 2 or 3 sentence top-level class descriptions for all API classes, in
JavaDoc comments
above the class declaration, to describe what the purpose or intent of
the class is.
* A handful of extra method comments here and there for 4 classes - the
ApiBase class
(already commented), the ApiQueryGeneratorBase class (semi-commented
currently), the
ApiQueryBase class (semi-commented currently), and the ApiFormatBase
class (already
commented apart from getNeedsRawData) - since those 4 are the parent
classes for the
whole API subsystem. Understand those and, I'm presuming, everything
else should fall
into place.
-- All the best,
Nick.
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l