Software /
code /
prosody
Comparison
spec/scansion/basic_message.scs @ 9266:c5267f5fd6e6
spec/scansion: Add scansion scripts used for testing
All past, except issue978-multi which fails randomly
based on ordering of elements - this is a scansion issue
to be resolved.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 06 Sep 2018 16:44:48 +0100 |
child | 9290:decdaaf78f32 |
comparison
equal
deleted
inserted
replaced
9265:585ef5c1b226 | 9266:c5267f5fd6e6 |
---|---|
1 # A script testing basic message routing and delivery | |
2 | |
3 [Client] Romeo | |
4 jid: user@localhost | |
5 password: password | |
6 | |
7 [Client] Juliet | |
8 jid: juliet@localhost | |
9 password: password | |
10 | |
11 [Client] Juliet's phone | |
12 jid: juliet@localhost | |
13 password: password | |
14 resource: mobile | |
15 | |
16 --------- | |
17 | |
18 # Act 1, scene 1 | |
19 # The clients connect | |
20 | |
21 Romeo connects | |
22 | |
23 Juliet connects | |
24 | |
25 Juliet's phone connects | |
26 | |
27 # Romeo publishes his presence. Juliet has not, and so does not receive presence. | |
28 | |
29 Romeo sends: | |
30 <presence/> | |
31 | |
32 Romeo receives: | |
33 <presence from="${Romeo's full JID}" /> | |
34 | |
35 # Romeo sends a message to Juliet's full JID | |
36 | |
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 | |
47 # Romeo sends a message to Juliet's phone | |
48 | |
49 Romeo sends: | |
50 <message to="${Juliet's phone's full JID}" type="chat"> | |
51 <body>Hello Juliet, on your phone.</body> | |
52 </message> | |
53 | |
54 Juliet's phone receives: | |
55 <message to="${Juliet's phone's full JID}" from="${Romeo's full JID}" type="chat"> | |
56 <body>Hello Juliet, on your phone.</body> | |
57 </message> | |
58 | |
59 # Scene 2 | |
60 # This requires the server to support offline messages (which is optional). | |
61 | |
62 # Romeo sends a message to Juliet's bare JID. This is not immediately delivered, as she | |
63 # has not published presence on either of her resources. | |
64 | |
65 Romeo sends: | |
66 <message to="juliet@localhost" type="chat"> | |
67 <body>Hello Juliet, are you there?</body> | |
68 </message> | |
69 | |
70 # Juliet sends presence on her phone, and should receive the message there | |
71 | |
72 Juliet's phone sends: | |
73 <presence/> | |
74 | |
75 Juliet's phone receives: | |
76 <presence/> | |
77 | |
78 Juliet's phone receives: | |
79 <message from="${Romeo's full JID}" type="chat"> | |
80 <body>Hello Juliet, are you there?</body> | |
81 <delay xmlns='urn:xmpp:delay' from='localhost' /> | |
82 </message> | |
83 | |
84 # Romeo sends another bare-JID message, it should be delivered | |
85 # instantly to Juliet's phone | |
86 | |
87 Romeo sends: | |
88 <message to="juliet@localhost" type="chat"> | |
89 <body>Oh, hi!</body> | |
90 </message> | |
91 | |
92 Juliet's phone receives: | |
93 <message from="${Romeo's full JID}" type="chat"> | |
94 <body>Oh, hi!</body> | |
95 </message> | |
96 | |
97 # Juliet's laptop goes online, but with a negative priority | |
98 | |
99 Juliet sends: | |
100 <presence> | |
101 <priority>-1</priority> | |
102 </presence> | |
103 | |
104 Juliet receives: | |
105 <presence from="${Juliet's full JID}"> | |
106 <priority>-1</priority> | |
107 </presence> | |
108 | |
109 Juliet's phone receives: | |
110 <presence from="${Juliet's full JID}"> | |
111 <priority>-1</priority> | |
112 </presence> | |
113 | |
114 # Again, Romeo sends a message to her bare JID, but it should | |
115 # only get delivered to her phone: | |
116 | |
117 Romeo sends: | |
118 <message to="juliet@localhost" type="chat"> | |
119 <body>How are you?</body> | |
120 </message> | |
121 | |
122 Juliet's phone receives: | |
123 <message from="${Romeo's full JID}" type="chat"> | |
124 <body>How are you?</body> | |
125 </message> | |
126 | |
127 # Romeo sends direct to Juliet's full JID, and she should receive it | |
128 | |
129 Romeo sends: | |
130 <message to="${Juliet's full JID}" type="chat"> | |
131 <body>Are you hiding?</body> | |
132 </message> | |
133 | |
134 Juliet receives: | |
135 <message from="${Romeo's full JID}" type="chat"> | |
136 <body>Are you hiding?</body> | |
137 </message> | |
138 | |
139 # Juliet publishes non-negative presence | |
140 | |
141 Juliet sends: | |
142 <presence/> | |
143 | |
144 Juliet receives: | |
145 <presence from="${Juliet's full JID}"/> | |
146 | |
147 Juliet's phone receives: | |
148 <presence from="${Juliet's full JID}"/> | |
149 | |
150 # And now Romeo's bare JID messages get delivered to both resources | |
151 # (server behaviour may vary here) | |
152 | |
153 Romeo sends: | |
154 <message to="juliet@localhost" type="chat"> | |
155 <body>There!</body> | |
156 </message> | |
157 | |
158 Juliet receives: | |
159 <message from="${Romeo's full JID}" type="chat"> | |
160 <body>There!</body> | |
161 </message> | |
162 | |
163 Juliet's phone receives: | |
164 <message from="${Romeo's full JID}" type="chat"> | |
165 <body>There!</body> | |
166 </message> | |
167 | |
168 # The End | |
169 | |
170 Romeo disconnects | |
171 | |
172 Juliet disconnects | |
173 | |
174 Juliet's phone disconnects |