Saturday, 23 February 2013

XMPP Testing

Before proceeding to XMPP testing, it is better to get an idea about XMPP.
eXtensible Messaging and Presence Protocol is a;
  • Open source
  • XML based networking protocol
  • Used for real time communication
XMPP is applied in following ares.
  • Instant Messaging
  • Social Networking and Gaming
  • Multimedia (audio and video)
  • Micro Blogging
How XMPP works,

  • XMPP network consists of servers and clients 
  • The job of XMPP is to route small packets (stanzas) of XML between entities in the network.
  • Stanzas are of three types ;
                   Message Stanzas - For sending messages
                   Presence Stanzas - For Broadcasting
                   Info/ Query Stanzas - For inquiring. 
  • There is an ID called JabberID which is given for each entity in the XMPP network.
Testing XMPP

In testing XMPP what we are doing is testing the functionality of XMPP protocol. Some of the concerns  in functionality testing are as follows;
  • Testing whether the client can respond correctly to incoming requests.
  • Does client the send right request at the right time?
  • Can client handle a specific response on a request?

Testing Request Response Protocols

Unit testing is chosen as the most suitable type for testing the XMPP functionality. Because XMPP's request response rules are local to one class.

When a client creates an XML stanza then it is constructed a Structured document through DOM (Document Object Model) then it is serialized to a textual XML and sent through the network. 

As there can happen slightly varied serialization versions and if the serialized packets are analysed, then there is a possibility for this variations in serialization to break the tests. 

Therefore response is verified by checking the DOM form rather than the serialized textual XML.

No comments:

Post a Comment