Mon, 10 Sep 2018 13:52:35 +0100
Revamp console output to be driven by log_data()
45
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
1 | # A script testing basic message routing and delivery |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
2 | |
31 | 3 | [Client] Romeo |
4 | jid: user@localhost | |
5 | password: password | |
6 | ||
7 | [Client] Juliet | |
8 | jid: juliet@localhost | |
9 | password: password | |
10 | ||
45
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
11 | [Client] Juliet's phone |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
12 | jid: juliet@localhost |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
13 | password: password |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
14 | resource: mobile |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
15 | |
31 | 16 | --------- |
17 | ||
45
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
18 | # Act 1, scene 1 |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
19 | # The clients connect |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
20 | |
31 | 21 | Romeo connects |
22 | ||
23 | Juliet connects | |
24 | ||
45
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
25 | Juliet's phone connects |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
26 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
27 | # Romeo publishes his presence. Juliet has not, and so does not receive presence. |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
28 | |
31 | 29 | Romeo sends: |
30 | <presence/> | |
31 | ||
32 | Romeo receives: | |
33 | <presence from="${Romeo's full JID}" /> | |
34 | ||
45
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
35 | # Romeo sends a message to Juliet's full JID |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
36 | |
31 | 37 | Romeo sends: |
38 | <message to="${Juliet's full JID}" type="chat"> | |
39 | <body>Hello Juliet!</body> | |
40 | </message> | |
41 | ||
42 | Juliet receives: | |
43 | <message to="${Juliet's full JID}" from="${Romeo's full JID}" type="chat"> | |
44 | <body>Hello Juliet!</body> | |
45 | </message> | |
46 | ||
45
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
47 | # Romeo sends a message to Juliet's phone |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
48 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
49 | Romeo sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
50 | <message to="${Juliet's phone's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
51 | <body>Hello Juliet, on your phone.</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
52 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
53 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
54 | Juliet's phone receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
55 | <message to="${Juliet's phone's full JID}" from="${Romeo's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
56 | <body>Hello Juliet, on your phone.</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
57 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
58 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
59 | # Scene 2 |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
60 | # This requires the server to support offline messages (which is optional). |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
61 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
62 | # Romeo sends a message to Juliet's bare JID. This is not immediately delivered, as she |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
63 | # has not published presence on either of her resources. |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
64 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
65 | Romeo sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
66 | <message to="juliet@localhost" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
67 | <body>Hello Juliet, are you there?</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
68 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
69 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
70 | # Juliet sends presence on her phone, and should receive the message there |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
71 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
72 | Juliet's phone sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
73 | <presence/> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
74 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
75 | Juliet's phone receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
76 | <presence/> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
77 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
78 | Juliet's phone receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
79 | <message from="${Romeo's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
80 | <body>Hello Juliet, are you there?</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
81 | <delay xmlns='urn:xmpp:delay' from='localhost' /> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
82 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
83 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
84 | # Romeo sends another bare-JID message, it should be delivered |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
85 | # instantly to Juliet's phone |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
86 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
87 | Romeo sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
88 | <message to="juliet@localhost" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
89 | <body>Oh, hi!</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
90 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
91 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
92 | Juliet's phone receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
93 | <message from="${Romeo's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
94 | <body>Oh, hi!</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
95 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
96 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
97 | # Juliet's laptop goes online, but with a negative priority |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
98 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
99 | Juliet sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
100 | <presence> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
101 | <priority>-1</priority> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
102 | </presence> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
103 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
104 | # Again, Romeo sends a message to her bare JID, but it should |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
105 | # only get delivered to her phone: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
106 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
107 | Romeo sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
108 | <message to="juliet@localhost" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
109 | <body>How are you?</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
110 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
111 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
112 | Juliet's phone receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
113 | <message from="${Romeo's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
114 | <body>How are you?</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
115 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
116 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
117 | # Romeo sends direct to Juliet's full JID, and she should receive it |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
118 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
119 | Romeo sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
120 | <message to="${Juliet's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
121 | <body>Are you hiding?</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
122 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
123 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
124 | Juliet receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
125 | <message from="${Romeo's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
126 | <body>Are you hiding?</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
127 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
128 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
129 | # Juliet publishes non-negative presence |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
130 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
131 | Juliet sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
132 | <presence/> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
133 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
134 | # And now Romeo's bare JID messages get delivered to both resources |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
135 | # (server behaviour may vary here) |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
136 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
137 | Romeo sends: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
138 | <message to="juliet@localhost" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
139 | <body>There!</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
140 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
141 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
142 | Juliet receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
143 | <message from="${Romeo's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
144 | <body>There!</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
145 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
146 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
147 | Juliet's phone receives: |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
148 | <message from="${Romeo's full JID}" type="chat"> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
149 | <body>There!</body> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
150 | </message> |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
151 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
152 | # The End |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
153 | |
31 | 154 | Romeo disconnects |
155 | ||
156 | Juliet disconnects | |
45
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
157 | |
744c81c124b6
Update basic_message.scs with more tests (passing)
Matthew Wild <mwild1@gmail.com>
parents:
31
diff
changeset
|
158 | Juliet's phone disconnects |