|
1 # Scansion - Automated XMPP Client |
|
2 |
|
3 Scansion is an automated scriptable XMPP client, useful for testing and |
|
4 automating tasks. It is primarily designed to be a handy tool in an XMPP |
|
5 developer's toolbox, however its scripting language is designed to be easy |
|
6 to read and write by non-programmers who understand basic XML and XMPP. |
|
7 |
|
8 An example Scansion script: |
|
9 |
|
10 ```xml |
|
11 # Pubsub: Test node creation |
|
12 |
|
13 [Client] Romeo |
|
14 jid: admin@localhost |
|
15 password: password |
|
16 |
|
17 [Client] Juliet |
|
18 jid: juliet@localhost |
|
19 password: password |
|
20 |
|
21 --------- |
|
22 |
|
23 Romeo connects |
|
24 |
|
25 # Create the node |
|
26 Romeo sends: |
|
27 <iq type='set' to='pubsub.localhost' id='create-node'> |
|
28 <pubsub xmlns='http://jabber.org/protocol/pubsub'> |
|
29 <create node='princely_musings'/> |
|
30 </pubsub> |
|
31 </iq> |
|
32 |
|
33 # Server acknowledges successful creation |
|
34 Romeo receives: |
|
35 <iq type='result' id='create-node'/> |
|
36 |
|
37 # Juliet sees the node appear in the node list |
|
38 |
|
39 Juliet connects |
|
40 |
|
41 Juliet sends: |
|
42 <iq type='get' id='list-nodes' to='pubsub.localhost'> |
|
43 <query xmlns='http://jabber.org/protocol/disco#items'/> |
|
44 </iq> |
|
45 |
|
46 Juliet receives: |
|
47 <iq type='result' id='list-nodes' from='pubsub.localhost'> |
|
48 <query xmlns='http://jabber.org/protocol/disco#items'> |
|
49 <item xmlns='http://jabber.org/protocol/disco#items' jid='pubsub.localhost' node='princely_musings'/> |
|
50 </query> |
|
51 </iq> |
|
52 |
|
53 # Yay! |
|
54 |
|
55 ``` |
|
56 |
|
57 This example demonstrates how Scansion: |
|
58 |
|
59 - Supports multiple characters in a script |
|
60 - Takes care of establishing a connection and authentication |
|
61 - Automatically verifies responses to stanzas |
|
62 |
|
63 This final point is what makes Scansion a great tool for testing - it |
|
64 has a flexible matching system that allows you to ensure a certain stanza |
|
65 receives the response you expect. |
|
66 |