diff -r 0dab1dc183c1 -r 744c81c124b6 scripts/basic_message.scs --- a/scripts/basic_message.scs Tue Oct 27 23:08:48 2015 +0000 +++ b/scripts/basic_message.scs Tue Oct 27 23:09:08 2015 +0000 @@ -1,3 +1,5 @@ +# A script testing basic message routing and delivery + [Client] Romeo jid: user@localhost password: password @@ -6,18 +8,32 @@ jid: juliet@localhost password: password +[Client] Juliet's phone + jid: juliet@localhost + password: password + resource: mobile + --------- +# Act 1, scene 1 +# The clients connect + Romeo connects Juliet connects +Juliet's phone connects + +# Romeo publishes his presence. Juliet has not, and so does not receive presence. + Romeo sends: Romeo receives: +# Romeo sends a message to Juliet's full JID + Romeo sends: Hello Juliet! @@ -28,6 +44,115 @@ Hello Juliet! +# Romeo sends a message to Juliet's phone + +Romeo sends: + + Hello Juliet, on your phone. + + +Juliet's phone receives: + + Hello Juliet, on your phone. + + +# Scene 2 +# This requires the server to support offline messages (which is optional). + +# Romeo sends a message to Juliet's bare JID. This is not immediately delivered, as she +# has not published presence on either of her resources. + +Romeo sends: + + Hello Juliet, are you there? + + +# Juliet sends presence on her phone, and should receive the message there + +Juliet's phone sends: + + +Juliet's phone receives: + + +Juliet's phone receives: + + Hello Juliet, are you there? + + + +# Romeo sends another bare-JID message, it should be delivered +# instantly to Juliet's phone + +Romeo sends: + + Oh, hi! + + +Juliet's phone receives: + + Oh, hi! + + +# Juliet's laptop goes online, but with a negative priority + +Juliet sends: + + -1 + + +# Again, Romeo sends a message to her bare JID, but it should +# only get delivered to her phone: + +Romeo sends: + + How are you? + + +Juliet's phone receives: + + How are you? + + +# Romeo sends direct to Juliet's full JID, and she should receive it + +Romeo sends: + + Are you hiding? + + +Juliet receives: + + Are you hiding? + + +# Juliet publishes non-negative presence + +Juliet sends: + + +# And now Romeo's bare JID messages get delivered to both resources +# (server behaviour may vary here) + +Romeo sends: + + There! + + +Juliet receives: + + There! + + +Juliet's phone receives: + + There! + + +# The End + Romeo disconnects Juliet disconnects + +Juliet's phone disconnects