1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/docs/wiki/Testing Wed Oct 28 00:38:45 2015 +0100
1.3 @@ -0,0 +1,72 @@
1.4 += Testing =
1.5 +
1.6 +To see how the software operates, you can run one of the agent programs
1.7 +provided in the distribution. For example:
1.8 +
1.9 +{{{
1.10 +./imip_resource.py -S xxx/store -P xxx/static -p xxx/prefs -d \
1.11 + < tests/templates/event-request.txt
1.12 +}}}
1.13 +
1.14 +This uses one of the test files, sending it to the agent program for
1.15 +resource entities, producing output resembling the following:
1.16 +
1.17 +{{{
1.18 +Outgoing parts for paul.boddie@example.com...
1.19 +From nobody Wed Oct 28 00:24:41 2015
1.20 +MIME-Version: 1.0
1.21 +Content-Transfer-Encoding: base64
1.22 +Content-Type: text/calendar; charset="utf-8"; method="REPLY"
1.23 +From: calendar@example.com
1.24 +To: paul.boddie@example.com
1.25 +Subject: Calendar system message
1.26 +
1.27 +QkVHSU46VkNBTEVOREFSDQpNRVRIT0Q6UkVQTFkNClZFUlNJT046Mi4wDQpCRUdJTjpWRlJFRUJV
1.28 +U1kNCk9SR0FOSVpFUjptYWlsdG86cGF1bC5ib2RkaWVAZXhhbXBsZS5jb20NCkFUVEVOREVFO1NF
1.29 +TlQtQlk9Im1haWx0bzpjYWxlbmRhckBleGFtcGxlLmNvbSI6bWFpbHRvOnJlc291cmNlLXJvb20t
1.30 +Y29uZnJvb20NCiBAZXhhbXBsZS5jb20NClVJRDpmYjFAZXhhbXBsZS5jb20NCkVORDpWRlJFRUJV
1.31 +U1kNCkVORDpWQ0FMRU5EQVINCg==
1.32 +}}}
1.33 +
1.34 +The rather opaque encoding can be inspected using the `tools/showmail.py`
1.35 +program, and thus the result of the script can be seen by piping the output
1.36 +through that program as follows:
1.37 +
1.38 +{{{
1.39 +./imip_resource.py -S xxx/store/ -P xxx/static/ -p xxx/prefs/ -d \
1.40 + < tests/templates/event-request.txt \
1.41 + | tools/showmail.py
1.42 +}}}
1.43 +
1.44 +The result should resemble the following:
1.45 +
1.46 +{{{
1.47 +Outgoing parts for paul.boddie@example.com...
1.48 +MIME-Version: 1.0
1.49 +Content-Type: text/calendar; charset="utf-8"; method="REPLY"
1.50 +From: calendar@example.com
1.51 +To: paul.boddie@example.com
1.52 +Subject: Calendar system message
1.53 +
1.54 +BEGIN:VCALENDAR
1.55 +METHOD:REPLY
1.56 +VERSION:2.0
1.57 +BEGIN:VEVENT
1.58 +DTSTAMP:20151027T232738Z
1.59 +UID:event1@example.com
1.60 +ATTENDEE;PARTSTAT=ACCEPTED;SENT-BY="mailto:calendar@example.com":mailto:reso
1.61 + urce-room-confroom@example.com
1.62 +SUMMARY:Meeting at 4pm
1.63 +ORGANIZER:mailto:paul.boddie@example.com
1.64 +DTSTART;TZID=Europe/Oslo:20141126T160000
1.65 +DTEND;TZID=Europe/Oslo:20141126T170000
1.66 +END:VEVENT
1.67 +END:VCALENDAR
1.68 +}}}
1.69 +
1.70 +What has happened here is the presentation of a request to the resource
1.71 +program in the form of an e-mail message containing an iCalendar event
1.72 +employing a scheduling method. The program interprets the request,
1.73 +consults its own records, makes a decision about scheduling the event,
1.74 +and indicates the kind of response it would like to send back to the
1.75 +requester.