O'Reilly logo

Beautiful Testing by Adam Goucher, Tim Riley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

XMPP 101

Before diving into the details of XMPP implementation testing, let’s first have a quick crash course about how XMPP works.

The XMPP network consists of a series of interconnected servers with clients connecting to them, as shown in Figure 7-1. The job of XMPP is to route small “packets” of XML between these entities on the network. For example, Alice, who is connected to the wonderland.lit server, may want to send a message to her sister, who is connected to the realworld.lit server. To do that, she puts her message into a small snippet of XML:

<message from="alice@wonderland.lit/RabbitHole"
         to="sister@realworld.lit">
  <body>Hi there</body>
</message>

She then delivers this message to her server, which forwards it to the realworld.lit server, which in turn delivers it to her sister’s client.

The decentralized architecture of the XMPP Network; clients connect to servers from different domains, which in turn connect to each other

Figure 7-1. The decentralized architecture of the XMPP Network; clients connect to servers from different domains, which in turn connect to each other

Every entity on the XMPP network is addressed using a Jabber ID (JID). A JID has the form username@domain/resource, where domain is the domain name of the XMPP server and username identifies an account on that server. One user can be connected to the server with multiple instances of a client; the resource part of the JID gives a unique name to every connected instance. In some cases, the resource part can be left out, which means the server ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required