JabberTest : Test Framework for Jabber Servers
JabberTest is a test framework for Jabber servers. Its goal is to check things such as :
- Does my server still listens to user connections ?
- Is my server is talking to the outside world ?
- Can users send/receive messages using the MSN/ICQ/AIM gateway ?
Such tests enable the administrator :
- To check easily that everything still works after a configuration change
- To discover problems earlier, before users start complaining
JabberTest is written in Python using xmpppy and Twisted librairies.
No version has been released yet. However, you can get the Subversion version of JabberTest (which is quite stable) :
svn co http://svn.gna.org/svn/jabbertest/trunk jabbertest
Installation and configuration
You need to install the python-xmpp package (that's for Debian, I don't know about other distributions). Or can can download and install xmpppy. If you need help with that part, contact me.
Then, copy testdata.py.example to testdata.py, edit the testdata.py file, and create and configure accounts on the Jabber server(s) and gateways.
Then, run the tests with ./runall.py. If some tests fails, try to find out why.
- Tests against the Jabber server (class JabberTest)
- testConnect : can users connect using the default (5222) port ?
- testConnectSSL : can users connect using the SSL (5223) port ?
- testSendMsgLocal : can a local user send a message to another local user ?
- testSendMsgRemote : can a local user send a message to a remote user ?
- testRecvMsgRemote : can a remote user send a message to a local user ?
- Tests against the ICQ and AIM transports (class OscarTest)
- testSendICQ : can a jabber user send an ICQ message to an ICQ account ?
- testRecvICQ : can a jabber user receive an ICQ message from an ICQ account ?
- testSendAIM : can a jabber user send an AIM message to an AIM account ?
- testRecvAIM : can a jabber user receive an AIM message from an AIM account ?
- Tests against the MSN transport (class MSNTest)
- testSendMSN : can a jabber user send a MSN message to a MSN account ?
- testRecvMSN : can a jabber user receive a MSN message from a MSN account ?
To run tests on a regular basis, you can use Nagios. See the nagios/ dir for an example nagios configuration. Of course, you will have to modify it.
Real world example
(Have you seen how some of my tests did actually succeed ?)
- Clean up, refactor, clean up, refactor, ...
- Rewrite Oscar tests using the Jabber Twisted Lib so there's no passive waits in the script.
- Move the Oscar code to oscartest.py, and fail as early as possible.
- Make test scripts more robust.
- Rewrite MSN tests using the Jabber Twisted Lib so there's no passive waits in the script.
- Move the MSN code to msntest.py, and fail as early as possible.
- Write tests for the Yahoo gateway (is there a Yahoo Messenger lib in python ?).
- Make a new screenshot of Nagios
Jabber ID : firstname.lastname@example.org
Email : lucas AT lucas-nussbaum.net